Home Reference Source
import {SelectiveBloomEffect} from 'postprocessing'
public class | source

SelectiveBloomEffect

Extends:

three~EventDispatcherEffectBloomEffect → SelectiveBloomEffect

Indirect Implements:

A selective bloom effect.

This effect applies bloom to selected objects only.

Constructor Summary

Public Constructor
public

constructor(scene: Scene, camera: Camera, options: Object)

Constructs a new selective bloom effect.

Member Summary

Public Members
public get

Indicates whether the background colors will be ignored.

public set
public get

Indicates whether the selection should be considered inverted.

public set
public set
public set
public

A selection of objects.

Method Summary

Public Methods
public
this method was deprecated. Use selection instead.

Returns the selection.

public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public
this method was deprecated. Use ignoreBackground instead.

Indicates whether the background is disabled.

public
this method was deprecated. Use inverted instead.

Indicates whether the mask is inverted.

public
this method was deprecated. Use ignoreBackground instead.

Enables or disables the background.

public

setDepthTexture(depthTexture: Texture, depthPacking: DepthPackingStrategies)

Sets the depth texture.

public
this method was deprecated. Use inverted instead.

Enables or disable mask inversion.

public

setSize(width: Number, height: Number)

Updates the size of internal render targets.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates this effect.

Inherited Summary

From class Effect
public get

inputColorSpace: ColorSpace

this get is experimental.

The input color space.

public set

mainCamera: Camera

Sets the main camera.

public set

mainScene: Scene

Sets the main scene.

public get

outputColorSpace: ColorSpace

this get is experimental.

The output color space.

protected set

inputColorSpace: ColorSpace

this set is experimental.
protected set

outputColorSpace: ColorSpace

this set is experimental.
public

The blend mode of this effect.

public

Preprocessor macro definitions.

public

WebGL extensions that are required by this effect.

public

The name of this effect.

public

uniforms: Map<String, Uniform>

Shader uniforms.

protected

renderer: WebGLRenderer

this member was deprecated.

The renderer.

public

Performs a shallow search for properties that define a dispose method and deletes them.

public

Returns the effect attributes.

public
this method was deprecated. Use blendMode instead.

Returns the blend mode.

public
this method was deprecated. Use defines instead.

Returns the preprocessor macro definitions.

public
this method was deprecated. Use extensions instead.

Returns the WebGL extensions that are required by this effect.

public

Returns the fragment shader.

public
this method was deprecated. Use name instead.

Returns the name of this effect.

public

getUniforms(): Map<String, Uniform>

this method was deprecated. Use uniforms instead.

Returns the uniforms of this effect.

public

Returns the vertex shader.

public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public

setDepthTexture(depthTexture: Texture, depthPacking: DepthPackingStrategies)

Sets the depth texture.

public

setRenderer(renderer: WebGLRenderer)

this method was deprecated.

Sets the renderer.

public

setSize(width: Number, height: Number)

Updates the size of this effect.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates this effect by performing supporting operations.

protected

Sets the effect attributes.

protected

Informs the associated EffectPass that this effect requires a shader recompilation.

protected

setFragmentShader(fragmentShader: String)

Sets the fragment shader.

protected

setVertexShader(vertexShader: String)

Sets the vertex shader.

From class BloomEffect
public get
this get was deprecated.
public set
public get
this get was deprecated. Use EffectPass.dithering instead.

Indicates whether dithering is enabled.

public set
public get
this get was deprecated.

The current height of the internal render targets.

public set
public get

The bloom intensity.

public set
public get
this get was deprecated.

The blur kernel size.

public set
public get

The luminance material.

public get

texture: Texture

A texture that contains the intermediate result of this effect.

public get
this get was deprecated.

The current width of the internal render targets.

public set
public

A blur pass.

public

A luminance pass.

public
this method was deprecated.

Returns the blur pass.

public
this method was deprecated. Use intensity instead.

The bloom intensity.

public
this method was deprecated. Use luminanceMaterial instead.

Returns the luminance material.

public
this method was deprecated. Use luminancePass instead.

Returns the luminance pass.

public
this method was deprecated. Use resolution instead.

Returns the resolution settings.

public
this method was deprecated.

Returns the current resolution scale.

public

getTexture(): Texture

this method was deprecated. Use texture instead.

Returns the generated bloom texture.

public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public
this method was deprecated. Use intensity instead.

Sets the bloom intensity.

public
this method was deprecated.

Sets the resolution scale.

public

setSize(width: Number, height: Number)

Updates the size of internal render targets.

public

update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number)

Updates this effect.

Public Constructors

public constructor(scene: Scene, camera: Camera, options: Object) source

Constructs a new selective bloom effect.

Override:

BloomEffect#constructor

Params:

NameTypeAttributeDescription
scene Scene

The main scene.

camera Camera

The main camera.

options Object
  • optional

The options. See BloomEffect for details.

Public Members

public get ignoreBackground: Boolean source

Indicates whether the background colors will be ignored.

public set ignoreBackground source

public get inverted: Boolean source

Indicates whether the selection should be considered inverted.

public set inverted source

public set mainCamera source

Sets the main camera.

Override:

Effect#mainCamera

public set mainScene source

Sets the main scene.

Override:

Effect#mainScene

public selection: Selection source

A selection of objects.

The default layer of this selection is 11.

Public Methods

public getSelection(): Selection source

this method was deprecated. Use selection instead.

Returns the selection.

Return:

Selection

The selection.

public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source

Performs initialization tasks.

Override:

BloomEffect#initialize

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

alpha Boolean

Whether the renderer uses the alpha channel.

frameBufferType Number

The type of the main frame buffers.

public isBackgroundDisabled(): Boolean source

this method was deprecated. Use ignoreBackground instead.

Indicates whether the background is disabled.

Return:

Boolean

Whether the background is disabled.

public isInverted(): Boolean source

this method was deprecated. Use inverted instead.

Indicates whether the mask is inverted.

Return:

Boolean

Whether the mask is inverted.

public setBackgroundDisabled(value: Boolean) source

this method was deprecated. Use ignoreBackground instead.

Enables or disables the background.

Params:

NameTypeAttributeDescription
value Boolean

Whether the background should be disabled.

public setDepthTexture(depthTexture: Texture, depthPacking: DepthPackingStrategies) source

Sets the depth texture.

Override:

Effect#setDepthTexture

Params:

NameTypeAttributeDescription
depthTexture Texture

A depth texture.

depthPacking DepthPackingStrategies
  • optional
  • default: BasicDepthPacking

The depth packing.

public setInverted(value: Boolean) source

this method was deprecated. Use inverted instead.

Enables or disable mask inversion.

Params:

NameTypeAttributeDescription
value Boolean

Whether the mask should be inverted.

public setSize(width: Number, height: Number) source

Updates the size of internal render targets.

Override:

BloomEffect#setSize

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source

Updates this effect.

Override:

BloomEffect#update

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

inputBuffer WebGLRenderTarget

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

deltaTime Number
  • optional

The time between the last frame and the current one in seconds.