interface IShapeDrawer {
    afterDraw?: ((data) => void);
    destroy?: ((container) => void);
    draw: ((data) => void);
    getSidesCount?: ((particle) => number);
    init?: ((container) => Promise<void>);
    loadShape?: ((particle) => void);
    particleDestroy?: ((particle) => void);
    particleInit?: ((container, particle) => void);
}

Type Parameters

Properties

afterDraw?: ((data) => void)

Type declaration

    • (data): void
    • Shape after draw effect function

      Parameters

      Returns void

destroy?: ((container) => void)

Type declaration

    • (container): void
    • Shape destroy function

      Parameters

      • container: Container

        the container initializing the shape

      Returns void

draw: ((data) => void)

Type declaration

    • (data): void
    • Shape draw function

      Parameters

      Returns void

getSidesCount?: ((particle) => number)

Type declaration

    • (particle): number
    • Shape sides count function

      Parameters

      • particle: TParticle

        the particle using the shape

      Returns number

      the number of sides for the used shape

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

Type declaration

    • (container): Promise<void>
    • Shape init function

      Parameters

      • container: Container

        the container initializing the shape

      Returns Promise<void>

loadShape?: ((particle) => void)

Type declaration

    • (particle): void
    • Shape load function

      Parameters

      • particle: TParticle

        the particle using the shape

      Returns void

particleDestroy?: ((particle) => void)

Type declaration

    • (particle): void
    • Shape particle destroy function

      Parameters

      • particle: TParticle

        the particle being destroyed

      Returns void

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

Type declaration

    • (container, particle): void
    • Shape particle init function

      Parameters

      • container: Container

        the container containing the shape

      • particle: TParticle

        the particle using the shape

      Returns void