tsParticles - v4.1.1
    Preparing search index...

    Data passed to shape and effect draw callbacks.

    interface IShapeDrawData<TParticle extends Particle = Particle> {
        context: OffscreenCanvasRenderingContext2D;
        delta: IDelta;
        drawPosition: ICoordinates;
        drawRadius: number;
        drawScale: number;
        fill: boolean;
        opacity: number;
        particle: TParticle;
        pixelRatio: number;
        position: { x: number; y: number };
        radius: number;
        stroke: boolean;
        transformData: { a: number; b: number; c: number; d: number };
    }

    Type Parameters

    Index

    Properties

    the canvas context for drawing

    delta: IDelta

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

    drawPosition: ICoordinates

    the position used for drawing (already scaled)

    drawRadius: number

    the particle radius used for drawing (already scaled)

    drawScale: number

    the scale applied for drawing

    fill: boolean

    the particle fill status

    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

    position: { x: number; y: number }

    the original position of the particle (before zoom transformations)

    Type Declaration

    • x: number

      x coordinate

    • y: number

      y coordinate

    radius: number

    the particle radius

    stroke: boolean

    the particle stroke status

    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