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

    Type Alias CollisionPlaneConfig

    Configuration for a collision plane that constrains particle positions. Collision planes define infinite planes in 3D space. When a particle crosses from the front side (positive normal direction) to the back side, the configured response mode is triggered.

    // Water surface — kill bubbles when they reach y=5
    const waterSurface: CollisionPlaneConfig = {
    position: { x: 0, y: 5, z: 0 },
    normal: { x: 0, y: -1, z: 0 },
    mode: CollisionPlaneMode.KILL,
    };

    // Bouncy floor
    const floor: CollisionPlaneConfig = {
    position: { x: 0, y: 0, z: 0 },
    normal: { x: 0, y: 1, z: 0 },
    mode: CollisionPlaneMode.BOUNCE,
    dampen: 0.6,
    };

    // Invisible wall clamp
    const wall: CollisionPlaneConfig = {
    position: { x: 5, y: 0, z: 0 },
    normal: { x: -1, y: 0, z: 0 },
    mode: CollisionPlaneMode.CLAMP,
    };
    type CollisionPlaneConfig = {
        dampen?: number;
        isActive?: boolean;
        lifetimeLoss?: number;
        mode?: CollisionPlaneMode;
        normal?: Point3D;
        position?: Point3D;
    }
    Index

    Properties

    dampen?: number

    Energy retention factor for BOUNCE mode (0–1). 0 = no bounce (all energy absorbed), 1 = perfect bounce (no energy loss).

    0.5
    
    isActive?: boolean

    Whether this collision plane is active.

    true
    
    lifetimeLoss?: number

    Fraction of the particle's start lifetime to subtract on collision (0–1). Applied on each collision for BOUNCE mode; ignored for KILL and CLAMP.

    0
    
    mode?: CollisionPlaneMode

    The collision response mode.

    CollisionPlaneMode.KILL
    
    normal?: Point3D

    The plane normal vector (will be normalized internally). Defines the "front" side of the plane. Particles crossing from front to back trigger the collision response.

    (0,1,0)
    
    position?: Point3D

    A point on the plane surface.

    (0,0,0)