tsParticles - v4.0.0-beta.12
    Preparing search index...

    Cannon mode options

    interface ICannon {
        drawVector: boolean;
        maxDragDistance: number;
        maxParticles: number;
        minParticles: number;
        particleFactor: number;
        spread: number;
        vectorColor: string;
        velocityFactor: number;
    }

    Implemented by

    Index

    Properties

    drawVector: boolean

    Whether to render the dashed aim line and power circle while dragging.

    maxDragDistance: number

    Maximum drag distance in canvas pixels. The drag vector is clamped to this length for both visual feedback and force calculation.

    maxParticles: number

    Maximum number of particles spawned per shot.

    minParticles: number

    Minimum number of particles spawned per shot, regardless of drag length.

    particleFactor: number

    How many particles to spawn per pixel of drag. The final count is clamped between minParticles and maxParticles.

    spread: number

    Half-angle spread around the launch direction, in degrees. A value of 30 means particles can spread ±30° from the aim angle.

    vectorColor: string

    CSS color string for the aim line and power circle.

    velocityFactor: number

    Multiplier applied to the drag length (in canvas pixels) to produce the base particle speed. Larger values = faster particles.