OutlineEffect
Extends:
Indirect Implements:
An outline effect.
Constructor Summary
Public Constructor | ||
public |
constructor(scene: Scene, camera: Camera, options: Object) Constructs a new outline effect. |
Member Summary
Public Members | ||
public get |
Indicates whether the outlines should be blurred. |
|
public set |
|
|
public |
A blur pass. |
|
public get |
this get was deprecated. Set the frameBufferType of the EffectComposer to HalfFloatType instead.
Indicates whether dithering is enabled. |
|
public set |
this set was deprecated. Set the frameBufferType of the EffectComposer to HalfFloatType instead.
Enables or disables dithering. |
|
public get |
this get was deprecated. Use resolution.height instead.
The current height of the internal render targets. |
|
public set |
this set was deprecated. Use resolution.height instead.
Sets the render height. |
|
public get |
this get was deprecated. Use blurPass.kernelSize instead.
The blur kernel size. |
|
public set |
this set was deprecated. Use blurPass.kernelSize instead.
Sets the kernel size. |
|
public |
The pulse speed. |
|
public get |
The resolution of this effect. |
|
public |
A selection of objects that will be outlined. |
|
public get |
this get was deprecated. Use selection.layer instead.
|
|
public set |
this set was deprecated. Use selection.layer instead.
|
|
public get |
this get was deprecated. Use resolution.width instead.
The current width of the internal render targets. |
|
public set |
this set was deprecated. Use resolution.width instead.
Sets the render width. |
|
public get |
Indicates whether X-Ray outlines are enabled. |
|
public set |
Enables or disables X-Ray outlines. |
Method Summary
Public Methods | ||
public |
clearSelection(): OutlinePass this method was deprecated. Use selection.clear instead.
Clears the list of selected objects. |
|
public |
deselectObject(object: Object3D): OutlinePass this method was deprecated. Use selection.delete instead.
Deselects an object. |
|
public |
this method was deprecated. Adjust the fixed resolution width or height instead.
Returns the current resolution scale. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) Performs initialization tasks. |
|
public |
selectObject(object: Object3D): OutlinePass this method was deprecated. Use selection.add instead.
Selects an object. |
|
public |
setPatternTexture(texture: Texture) Sets the pattern texture. |
|
public |
setResolutionScale(scale: Number) this method was deprecated. Adjust the fixed resolution width or height instead.
Sets the resolution scale. |
|
public |
setSelection(objects: Object3D[]): OutlinePass this method was deprecated. Use selection.set instead.
Clears the current selection and selects a list of objects. |
|
public |
Updates the size of internal render targets. |
|
public |
Updates this effect. |
Inherited Summary
From class Effect | ||
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 |
Shader uniforms. |
|
public |
dispose() Performs a shallow search for properties that define a dispose method and deletes them. |
|
public |
Returns the effect attributes. |
|
public |
Returns the fragment shader. |
|
public |
Returns the vertex shader. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) Performs initialization tasks. |
|
public |
setDepthTexture(depthTexture: Texture, depthPacking: Number) Sets the depth texture. |
|
public |
Updates the size of this effect. |
|
public |
Updates the effect by performing supporting operations. |
|
protected |
setAttributes(attributes: EffectAttribute) Sets the effect attributes. |
|
protected |
Informs the associated EffectPass that this effect has changed in a way that requires a shader recompilation. |
|
protected |
setFragmentShader(fragmentShader: String) Sets the fragment shader. |
|
protected |
setVertexShader(vertexShader: String) Sets the vertex shader. |
Public Constructors
public constructor(scene: Scene, camera: Camera, options: Object) source
Constructs a new outline effect.
If you want dark outlines, remember to use an appropriate blend function.
Override:
Effect#constructorParams:
Name | Type | Attribute | Description |
scene | Scene | The main scene. |
|
camera | Camera | The main camera. |
|
options | Object |
|
The options. |
options.blendFunction | BlendFunction |
|
The blend function. Set this to |
options.patternTexture | Number |
|
A pattern texture. |
options.edgeStrength | Number |
|
The edge strength. |
options.pulseSpeed | Number |
|
The pulse speed. A value of zero disables the pulse effect. |
options.visibleEdgeColor | Number |
|
The color of visible edges. |
options.hiddenEdgeColor | Number |
|
The color of hidden edges. |
options.resolutionScale | Number |
|
Deprecated. Use height or width instead. |
options.width | Number |
|
The render width. |
options.height | Number |
|
The render height. |
options.kernelSize | KernelSize |
|
The blur kernel size. |
options.blur | Boolean |
|
Whether the outline should be blurred. |
options.xRay | Boolean |
|
Whether occluded parts of selected objects should be visible. |
Public Members
public get dithering: Boolean source
Indicates whether dithering is enabled.
public set dithering: Boolean source
Enables or disables dithering.
public get height: Number source
The current height of the internal render targets.
public set height: Number source
Sets the render height.
public get kernelSize: KernelSize source
The blur kernel size.
public set kernelSize: KernelSize source
Sets the kernel size.
public get width: Number source
The current width of the internal render targets.
Public Methods
public clearSelection(): OutlinePass source
Clears the list of selected objects.
Return:
OutlinePass | This pass. |
public deselectObject(object: Object3D): OutlinePass source
Deselects an object.
Params:
Name | Type | Attribute | Description |
object | Object3D | The object that should no longer be outlined. |
Return:
OutlinePass | This pass. |
public getResolutionScale(): Number source
Returns the current resolution scale.
public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source
Performs initialization tasks.
Override:
Effect#initializepublic selectObject(object: Object3D): OutlinePass source
Selects an object.
Params:
Name | Type | Attribute | Description |
object | Object3D | The object that should be outlined. |
Return:
OutlinePass | This pass. |
public setPatternTexture(texture: Texture) source
Sets the pattern texture.
Params:
Name | Type | Attribute | Description |
texture | Texture | The new texture. |
public setResolutionScale(scale: Number) source
Sets the resolution scale.
Params:
Name | Type | Attribute | Description |
scale | Number | The new resolution scale. |
public setSelection(objects: Object3D[]): OutlinePass source
Clears the current selection and selects a list of objects.
Params:
Name | Type | Attribute | Description |
objects | Object3D[] | The objects that should be outlined. This array will be copied. |
Return:
OutlinePass | This pass. |
public setSize(width: Number, height: Number) source
Updates the size of internal render targets.
Override:
Effect#setSizepublic update(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, deltaTime: Number) source
Updates this effect.
Override:
Effect#updateParams:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
inputBuffer | WebGLRenderTarget | A frame buffer that contains the result of the previous pass. |
|
deltaTime | Number |
|
The time between the last frame and the current one in seconds. |