tsParticles - v0.0.0
    Preparing search index...
    interface IShapeDrawer<TParticle extends Particle = Particle> {
        afterDraw?: (data: IShapeDrawData<TParticle>) => void;
        beforeDraw?: (data: IShapeDrawData<TParticle>) => void;
        destroy?: (container: Container) => void;
        draw: (data: IShapeDrawData<TParticle>) => void;
        getSidesCount?: (particle: TParticle) => number;
        init?: (container: Container) => Promise<void>;
        loadShape?: (particle: TParticle) => void;
        particleDestroy?: (particle: TParticle) => void;
        particleInit?: (container: Container, particle: TParticle) => void;
        validTypes: readonly string[];
    }

    Type Parameters

    Index

    Properties

    afterDraw?: (data: IShapeDrawData<TParticle>) => void

    Shape after draw effect function

    Type Declaration

    beforeDraw?: (data: IShapeDrawData<TParticle>) => void

    Shape before draw effect function

    Type Declaration

    destroy?: (container: Container) => void

    Shape destroy function

    Type Declaration

      • (container: Container): void
      • Parameters

        • container: Container

          the container initializing the shape

        Returns void

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

    Shape draw function

    Type Declaration

    getSidesCount?: (particle: TParticle) => number

    Shape sides count function

    Type Declaration

      • (particle: TParticle): number
      • Parameters

        • particle: TParticle

          the particle using the shape

        Returns number

        the number of sides for the used shape

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

    Shape init function

    Type Declaration

      • (container: Container): Promise<void>
      • Parameters

        • container: Container

          the container initializing the shape

        Returns Promise<void>

    loadShape?: (particle: TParticle) => void

    Shape load function

    Type Declaration

      • (particle: TParticle): void
      • Parameters

        • particle: TParticle

          the particle using the shape

        Returns void

    particleDestroy?: (particle: TParticle) => void

    Shape particle destroy function

    Type Declaration

      • (particle: TParticle): void
      • Parameters

        • particle: TParticle

          the particle being destroyed

        Returns void

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

    Shape particle init function

    Type Declaration

    validTypes: readonly string[]