interface IEffectDrawer<TParticle> {
    destroy?: ((container: Container) => void);
    draw: ((data: IShapeDrawData<TParticle>) => void);
    init?: ((container: Container) => Promise<void>);
    loadEffect?: ((particle: TParticle) => void);
    particleInit?: ((container: Container, particle: TParticle) => void);
}

Type Parameters

Properties

destroy?: ((container: Container) => void)

Shape destroy function

Type declaration

    • (container): void
    • Parameters

      • container: Container

        the container initializing the shape

      Returns void

draw: ((data: IShapeDrawData<TParticle>) => void)

Shape draw function

Type declaration

init?: ((container: Container) => Promise<void>)

Shape init function

Type declaration

    • (container): Promise<void>
    • Parameters

      • container: Container

        the container initializing the shape

      Returns Promise<void>

loadEffect?: ((particle: TParticle) => void)

Effect load function

Type declaration

    • (particle): void
    • Parameters

      • particle: TParticle

        the particle using the shape

      Returns void

particleInit?: ((container: Container, particle: TParticle) => void)

Shape particle init function

Type declaration

    • (container, particle): void
    • Parameters

      • container: Container

        the container containing the shape

      • particle: TParticle

        the particle using the shape

      Returns void