ui5-snowflakes

1.0.2 • Public • Published

Snowy Fiori

The original idea for this plugin came from Meli Lauber.

I just added some CSS tweaks.

A point for improvement is the performance. Everything is calculated on the CPU now. Ideally, the calculations would be done on the GPU instead.

Class Diagram

classDiagram
    class Component{
        -Flake Flakes[]
        +constructor()
        +destroy()
        +init()
        -render()
    }

    class Flake{
        -int x
        -int y
        -int r
        -int a
        -int aStep
        -int weight
        -float alpha
        -int speed
        +constructor()
        +init(int x, int y)
        -randomBetween( int min, int max, bool round )
        -distanceBetween( Vector vector1, Vector vector2 )
        +update(canvas)
        -_render(canvas)
    }

    class Vector{
        +int x
        +int Y
    }

    Component "1" --> "1..*" Flake : Contains
    Flake -- Vector

Preview

snowflake

Package Sidebar

Install

npm i ui5-snowflakes

Weekly Downloads

0

Version

1.0.2

License

none

Unpacked Size

946 kB

Total Files

17

Last publish

Collaborators

  • fiddlebe