interface IShapeDrawData<TParticle> {
    context: CanvasRenderingContext2D;
    delta: IDelta;
    opacity: number;
    particle: TParticle;
    pixelRatio: number;
    radius: number;
    transformData: {
        a: number;
        b: number;
        c: number;
        d: number;
    };
}

Type Parameters

Properties

context: CanvasRenderingContext2D

the canvas context for drawing

delta: IDelta

this variable contains the delta between the current frame and the previous frame

opacity: number

the particle opacity

particle: TParticle

the particle to be drawn using the shape

pixelRatio: number

the device pixel ratio, used for retina displays

radius: number

the particle radius

transformData: {
    a: number;
    b: number;
    c: number;
    d: number;
}

the transform data of the particle

Type declaration

  • a: number

    the horizontal scale of the particle

  • b: number

    the horizontal skew of the particle

  • c: number

    the vertical skew of the particle

  • d: number

    the vertical scale of the particle