nape-js API
    Preparing search index...

    Interface ParticleSpawnState

    State snapshot passed to the onSpawn hook.

    interface ParticleSpawnState {
        angle: number;
        angularVelocity: number;
        lifetime: number;
        position: Vec2;
        userData: unknown;
        velocity: Vec2;
    }
    Index

    Properties

    angle: number

    Initial rotation (rad).

    angularVelocity: number

    Initial angular velocity (rad/s).

    lifetime: number

    Lifetime in seconds. <= 0 disables auto-death.

    position: Vec2

    World-space spawn position.

    userData: unknown

    Free-form per-particle payload (color, frame index, damage, etc.).

    velocity: Vec2

    Initial linear velocity.