Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SelectiveBloomEffect

A selective bloom effect.

This effect applies bloom to selected objects only.

Hierarchy

Index

Constructors

  • new SelectiveBloomEffect(scene?: Scene, camera?: Camera, options?: BloomEffectOptions): SelectiveBloomEffect
  • Constructs a new selective bloom effect.

    Parameters

    • Optional scene: Scene

      The main scene.

    • Optional camera: Camera

      The main camera.

    • Optional options: BloomEffectOptions

    Returns SelectiveBloomEffect

Properties

blendMode: BlendMode

The blend mode of this effect.

blurPass: KawaseBlurPass

A blur pass.

defines: Map<string, string>

Preprocessor macro definitions.

Call Effect.setChanged after changing macro definitions.

extensions: Set<WebGLExtension>

WebGL extensions that are required by this effect.

Call Effect.setChanged after adding or removing extensions.

luminancePass: LuminancePass

A luminance shader pass.

This pass can be disabled to skip luminance filtering.

name: string

The name of this effect.

renderer: WebGLRenderer

The renderer.

deprecated
selection: Selection

A selection of objects.

The default layer of this selection is 11.

uniforms: Map<string, Uniform<any>>

Shader uniforms.

Call Effect.setChanged after adding or removing uniforms.

Accessors

  • get distinction(): number
  • set distinction(arg: number): void
  • deprecated

    Use luminanceMaterial instead.

    Returns number

  • Parameters

    • arg: number

    Returns void

  • get dithering(): boolean
  • set dithering(arg: boolean): void
  • Indicates whether dithering is enabled.

    deprecated

    Use EffectPass.fullscreenMaterial.dithering instead.

    Returns boolean

  • Parameters

    • arg: boolean

    Returns void

  • get height(): number
  • set height(arg: number): void
  • The current height of the internal render targets.

    deprecated

    Use resolution.height instead.

    Returns number

  • Parameters

    • arg: number

    Returns void

  • get ignoreBackground(): boolean
  • set ignoreBackground(arg: boolean): void
  • Indicates whether the background colors will be ignored.

    Returns boolean

  • Parameters

    • arg: boolean

    Returns void

  • get inputColorSpace(): ColorSpace
  • set inputColorSpace(arg: ColorSpace): void
  • The input color space.

    experimental

    Returns ColorSpace

  • The input color space.

    experimental

    Parameters

    • arg: ColorSpace

    Returns void

  • get intensity(): number
  • set intensity(arg: number): void
  • The bloom intensity.

    Returns number

  • Parameters

    • arg: number

    Returns void

  • get inverted(): boolean
  • set inverted(arg: boolean): void
  • Indicates whether the selection should be considered inverted.

    Returns boolean

  • Parameters

    • arg: boolean

    Returns void

  • The blur kernel size.

    deprecated

    Use blurPass.kernelSize instead.

    Returns KernelSize

  • Parameters

    Returns void

  • get luminanceMaterial(): LuminanceMaterial
  • The luminance material.

    Returns LuminanceMaterial

  • set mainCamera(arg: Camera): void
  • Sets the main camera.

    Parameters

    • arg: Camera

    Returns void

  • set mainScene(arg: Scene): void
  • Sets the main scene.

    Parameters

    • arg: Scene

    Returns void

  • get outputColorSpace(): ColorSpace
  • set outputColorSpace(arg: ColorSpace): void
  • The output color space.

    Should only be changed if this effect converts the input colors to a different color space.

    experimental

    Returns ColorSpace

  • The output color space.

    Should only be changed if this effect converts the input colors to a different color space.

    experimental

    Parameters

    • arg: ColorSpace

    Returns void

  • The resolution of this effect.

    Returns Resolution

  • get texture(): Texture
  • A texture that contains the intermediate result of this effect.

    Returns Texture

  • get width(): number
  • set width(arg: number): void
  • The current width of the internal render targets.

    deprecated

    Use resolution.width instead.

    Returns number

  • Parameters

    • arg: number

    Returns void

Methods

  • Adds a listener to an event type.

    Type Parameters

    • T extends keyof Event<string, unknown>

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<Event<string, unknown>[T], T, SelectiveBloomEffect>

      The function that gets called when the event is fired.

    Returns void

  • Type Parameters

    • T extends string

    Parameters

    Returns void

  • dispatchEvent<T>(event: BaseEvent<T> & Event<string, unknown>[T]): void
  • Fire an event type.

    Type Parameters

    • T extends keyof Event<string, unknown>

    Parameters

    • event: BaseEvent<T> & Event<string, unknown>[T]

      The event that gets fired.

    Returns void

  • dispose(): void
  • Performs a shallow search for properties that define a dispose method and deletes them.

    The EffectComposer calls this method when it is being destroyed.

    Returns void

  • getAttributes(): EffectAttribute
  • getBlendMode(): BlendMode
  • Returns the blend mode.

    The result of this effect will be blended with the result of the previous effect using this blend mode.

    deprecated

    Use blendMode instead.

    Returns BlendMode

    The blend mode.

  • getBlurPass(): KawaseBlurPass
  • Returns the blur pass.

    deprecated

    Use blurPass instead.

    Returns KawaseBlurPass

    The blur pass.

  • getDefines(): Map<string, string>
  • Returns the preprocessor macro definitions.

    deprecated

    Use defines instead.

    Returns Map<string, string>

    The extensions.

  • getExtensions(): Set<WebGLExtension>
  • Returns the WebGL extensions that are required by this effect.

    deprecated

    Use extensions instead.

    Returns Set<WebGLExtension>

    The extensions.

  • getFragmentShader(): string
  • getIntensity(): number
  • The bloom intensity.

    deprecated

    Use intensity instead.

    Returns number

    The intensity.

  • getLuminanceMaterial(): LuminanceMaterial
  • Returns the luminance material.

    deprecated

    Use luminanceMaterial instead.

    Returns LuminanceMaterial

    The material.

  • getLuminancePass(): LuminancePass
  • Returns the luminance pass.

    deprecated

    Use luminancePass instead.

    Returns LuminancePass

    The luminance pass.

  • getName(): string
  • Returns the name of this effect.

    deprecated

    Use name instead.

    Returns string

    The name.

  • getResolutionScale(): number
  • Returns the current resolution scale.

    deprecated

    Use resolution instead.

    Returns number

    The resolution scale.

  • getSelection(): Selection
  • Returns the selection.

    deprecated

    Use selection instead.

    Returns Selection

    The selection.

  • getTexture(): Texture
  • Returns the generated bloom texture.

    deprecated

    Use texture instead.

    Returns Texture

    The texture.

  • getUniforms(): Map<string, Uniform<any>>
  • Returns the uniforms of this effect.

    deprecated

    Use uniforms instead.

    Returns Map<string, Uniform<any>>

    The extensions.

  • getVertexShader(): string
  • hasEventListener<T>(type: T, listener: EventListener<Event<string, unknown>[T], T, SelectiveBloomEffect>): boolean
  • hasEventListener<T>(type: T, listener: EventListener<{}, T, SelectiveBloomEffect>): boolean
  • Checks if listener is added to an event type.

    Type Parameters

    • T extends keyof Event<string, unknown>

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<Event<string, unknown>[T], T, SelectiveBloomEffect>

      The function that gets called when the event is fired.

    Returns boolean

  • Type Parameters

    • T extends string

    Parameters

    Returns boolean

  • initialize(renderer: WebGLRenderer, alpha: boolean, frameBufferType: number): void
  • Performs initialization tasks.

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    • alpha: boolean

      Whether the renderer uses the alpha channel.

    • frameBufferType: number

      The type of the main frame buffers.

    Returns void

  • isBackgroundDisabled(): boolean
  • Indicates whether the background is disabled.

    deprecated

    Use ignoreBackground instead.

    Returns boolean

    Whether the background is disabled.

  • isInverted(): boolean
  • Indicates whether the mask is inverted.

    deprecated

    Use inverted instead.

    Returns boolean

    Whether the mask is inverted.

  • removeEventListener<T>(type: T, listener: EventListener<Event<string, unknown>[T], T, SelectiveBloomEffect>): void
  • removeEventListener<T>(type: T, listener: EventListener<{}, T, SelectiveBloomEffect>): void
  • setAttributes(attributes: EffectAttribute): void
  • Sets the effect attributes.

    Effects that have the same attributes will be executed in the order in which they were registered. Some attributes imply a higher priority.

    Parameters

    • attributes: EffectAttribute

      The attributes.

    Returns void

  • setBackgroundDisabled(value: boolean): void
  • Enables or disables the background.

    deprecated

    Use ignoreBackground instead.

    Parameters

    • value: boolean

      Whether the background should be disabled.

    Returns void

  • setChanged(): void
  • Informs the associated {@link EffectPass} that this effect requires a shader recompilation.

    Should be called after changing macros or extensions and after adding/removing uniforms.

    Returns void

  • setDepthTexture(depthTexture: Texture, depthPacking?: DepthPackingStrategies): void
  • Sets the depth texture.

    Parameters

    • depthTexture: Texture

      A depth texture.

    • Optional depthPacking: DepthPackingStrategies

    Returns void

  • setFragmentShader(fragmentShader: string): void
  • setIntensity(value: number): void
  • Sets the bloom intensity.

    deprecated

    Use intensity instead.

    Parameters

    • value: number

      The intensity.

    Returns void

  • setInverted(value: boolean): void
  • Enables or disable mask inversion.

    deprecated

    Use inverted instead.

    Parameters

    • value: boolean

      Whether the mask should be inverted.

    Returns void

  • setRenderer(renderer: WebGLRenderer): void
  • Sets the renderer.

    deprecated

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    Returns void

  • setResolutionScale(scale: number): void
  • Sets the resolution scale.

    deprecated

    Use resolution instead.

    Parameters

    • scale: number

      The new resolution scale.

    Returns void

  • setSize(width: number, height: number): void
  • Updates the size of internal render targets.

    Parameters

    • width: number

      The width.

    • height: number

      The height.

    Returns void

  • setVertexShader(vertexShader: string): void
  • update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget<Texture>, deltaTime: number): void
  • Updates this effect.

    Parameters

    • renderer: WebGLRenderer

      The renderer.

    • inputBuffer: WebGLRenderTarget<Texture>

      A frame buffer that contains the result of the previous pass.

    • deltaTime: number

    Returns void