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

    Type Alias Renderer

    Configuration for the particle system renderer, controlling blending, transparency, depth, and background color behavior.

    // A renderer configuration with additive blending and transparent particles
    const renderer: Renderer = {
    blending: THREE.AdditiveBlending,
    discardBackgroundColor: true,
    backgroundColorTolerance: 0.1,
    backgroundColor: { r: 0, g: 0, b: 0 },
    transparent: true,
    depthTest: true,
    depthWrite: false,
    };
    // Default values for the renderer configuration
    const renderer: Renderer = {
    blending: THREE.NormalBlending,
    discardBackgroundColor: false,
    backgroundColorTolerance: 1.0,
    backgroundColor: { r: 0, g: 0, b: 0 },
    transparent: false,
    depthTest: true,
    depthWrite: true,
    };
    type Renderer = {
        backgroundColor: Rgb;
        backgroundColorTolerance: number;
        blending: THREE.Blending;
        depthTest: boolean;
        depthWrite: boolean;
        discardBackgroundColor: boolean;
        mesh?: MeshConfig;
        rendererType?: RendererType;
        softParticles?: SoftParticlesConfig;
        trail?: TrailConfig;
        transparent: boolean;
    }
    Index

    Properties

    backgroundColor: Rgb

    The background color as an RGB value, used when discardBackgroundColor is enabled.

    backgroundColorTolerance: number

    The tolerance for matching the background color when discardBackgroundColor is true.

    blending: THREE.Blending

    Defines the blending mode for the particle system (e.g., additive blending).

    depthTest: boolean

    Whether to enable depth testing for particles (determines if particles are rendered behind or in front of other objects).

    depthWrite: boolean

    Whether to write depth information for the particles (affects sorting and rendering order).

    discardBackgroundColor: boolean

    Whether to discard particles that match the background color.

    mesh?: MeshConfig

    Mesh particle renderer configuration. Only used when rendererType is RendererType.MESH.

    MeshConfig

    rendererType?: RendererType

    Selects the rendering technique for particles.

    • RendererType.POINTS (default) — classic point-sprite renderer using THREE.Points.
    • RendererType.INSTANCED — camera-facing quads via InstancedBufferGeometry, removing the gl_PointSize hardware limit and enabling stretched billboards.
    RendererType.POINTS
    
    softParticles?: SoftParticlesConfig

    Soft particles configuration. When enabled, particles fade smoothly near opaque geometry instead of producing a hard intersection line. Requires a depth texture from a WebGLRenderTarget.

    SoftParticlesConfig

    trail?: TrailConfig

    Trail/ribbon renderer configuration. Only used when rendererType is RendererType.TRAIL.

    TrailConfig

    transparent: boolean

    Whether the particle system uses transparency.