@newkrok/three-particles - v2.1.0
    Preparing search index...

    Type Alias VelocityOverLifetime

    Defines the velocity of particles over their lifetime, allowing for linear and orbital velocity (in degrees) adjustments. Supports constant values, random ranges, or curves (Bézier or easing) for each axis.

    isActive: false
    linear: { x: 0.0, y: 0.0, z: 0.0 }
    orbital: { x: 0.0, y: 0.0, z: 0.0 }
    // Linear velocity with a constant value
    linear: { x: 1, y: 0, z: -0.5 };

    // Linear velocity with random ranges
    linear: {
    x: { min: -1, max: 1 },
    y: { min: 0, max: 2 }
    };

    // Linear velocity using a Bézier curve
    linear: {
    z: {
    type: 'bezier',
    bezierPoints: [
    { x: 0, y: 0, percentage: 0 },
    { x: 0.5, y: 2 },
    { x: 1, y: 10, percentage: 1 }
    ],
    scale: 2
    }
    };

    // Orbital velocity with a constant value
    orbital: { x: 3, y: 5, z: 0 };

    // Orbital velocity using an easing curve
    orbital: {
    x: {
    type: 'easing',
    curveFunction: (time) => Math.sin(time * Math.PI),
    scale: 1.5
    }
    };
    type VelocityOverLifetime = {
        isActive: boolean;
        linear: {
            x?: Constant | RandomBetweenTwoConstants | LifetimeCurve;
            y?: Constant | RandomBetweenTwoConstants | LifetimeCurve;
            z?: Constant | RandomBetweenTwoConstants | LifetimeCurve;
        };
        orbital: {
            x?: Constant
            | RandomBetweenTwoConstants
            | LifetimeCurve;
            y?: Constant | RandomBetweenTwoConstants | LifetimeCurve;
            z?: Constant | RandomBetweenTwoConstants | LifetimeCurve;
        };
    }
    Index

    Properties

    isActive: boolean