Renderer: {
    backgroundColor: Rgb;
    backgroundColorTolerance: number;
    blending: THREE.Blending;
    depthTest: boolean;
    depthWrite: boolean;
    discardBackgroundColor: boolean;
    transparent: boolean;
}

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

Type declaration

  • backgroundColor: Rgb
  • backgroundColorTolerance: number
  • blending: THREE.Blending
  • depthTest: boolean
  • depthWrite: boolean
  • discardBackgroundColor: boolean
  • transparent: boolean
// 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,
};