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 |
this get was deprecated. Use blurPass.enabled instead.
Indicates whether the outlines should be blurred. |
|
public set |
|
|
public |
A blur pass. |
|
public get |
this get was deprecated.
Indicates whether dithering is enabled. |
|
public set |
|
|
public get |
The edge strength. |
|
public set |
|
|
public get |
this get was deprecated. Use resolution.height instead.
The current height of the internal render targets. |
|
public set |
|
|
public get |
hiddenEdgeColor: Color The hidden edge color. |
|
public set |
|
|
public get |
this get was deprecated. Use blurPass.kernelSize instead.
The blur kernel size. |
|
public set |
|
|
public set |
|
|
public set |
|
|
public get |
this get is experimental. Requires three >= r138.
The amount of MSAA samples. |
|
public set |
|
|
public get |
The pattern scale. |
|
public set |
|
|
public get |
patternTexture: Texture The pattern texture. |
|
public set |
|
|
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.
The selection layer. |
|
public set |
|
|
public get |
visibleEdgeColor: Color The visible edge color. |
|
public set |
|
|
public get |
this get was deprecated. Use resolution.width instead.
The current width of the internal render targets. |
|
public set |
|
|
public get |
Indicates whether X-ray mode is enabled. |
|
public set |
|
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. Use blurPass instead.
Returns the blur pass. |
|
public |
this method was deprecated. Use pulseSpeed instead.
Returns the pulse speed. |
|
public |
getResolution(): Resizer Returns the resolution. |
|
public |
this method was deprecated. Use resolution instead.
Returns the current resolution scale. |
|
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 xRay instead.
Indicates whether X-ray mode is enabled. |
|
public |
selectObject(object: Object3D): OutlinePass this method was deprecated. Use selection.add() instead.
Selects an object. |
|
public |
setPatternTexture(value: Texture) this method was deprecated. Use patternTexture instead.
Sets the pattern texture. |
|
public |
setPulseSpeed(value: Number) this method was deprecated. Use pulseSpeed instead.
Sets the pulse speed. |
|
public |
setResolutionScale(scale: Number) this method was deprecated. Use resolution 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 |
setXRayEnabled(value: Boolean) this method was deprecated. Use xRay instead.
Enables or disables X-ray outlines. |
|
public |
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 |
Shader uniforms. |
|
protected |
renderer: WebGLRenderer this member was deprecated.
The renderer. |
|
public |
dispose() 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 |
getDefines(): Map<String, String> 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 |
Updates the size of this effect. |
|
public |
Updates this effect by performing supporting operations. |
|
protected |
setAttributes(attributes: EffectAttribute) 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. |
Public Constructors
public constructor(scene: Scene, camera: Camera, options: Object) source
Constructs a new outline effect.
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. Use |
options.patternTexture | Texture |
|
A pattern texture. |
options.patternScale | Number |
|
The pattern scale. |
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.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. |
options.multisampling | Number |
|
The number of samples used for multisample antialiasing. Requires WebGL 2. |
options.resolutionScale | Number |
|
The resolution scale. |
options.resolutionX | Number |
|
The horizontal resolution. |
options.resolutionY | Number |
|
The vertical resolution. |
options.width | Number |
|
Deprecated. Use resolutionX instead. |
options.height | Number |
|
Deprecated. Use resolutionY instead. |
Public Members
public get blur: Boolean source
Indicates whether the outlines should be blurred.
public set blur source
public get dithering: Boolean source
Indicates whether dithering is enabled.
public set dithering source
public set edgeStrength source
public get height: Number source
The current height of the internal render targets.
public set height source
public set hiddenEdgeColor source
public get kernelSize: KernelSize source
The blur kernel size.
public set kernelSize source
public get multisampling: Number source
The amount of MSAA samples.
Requires WebGL 2. Set to zero to disable multisampling.
public set multisampling source
public set patternScale source
public set patternTexture source
public get selectionLayer: Number source
The selection layer.
public set selectionLayer source
public set visibleEdgeColor source
public get width: Number source
The current width of the internal render targets.
public set width source
public set xRay source
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 getBlurPass(): KawaseBlurPass source
Returns the blur pass.
public getPulseSpeed(): Number source
Returns the pulse speed.
public getResolutionScale(): Number source
Returns the current resolution scale.
public getSelection(): Selection source
Returns the selection.
public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source
Performs initialization tasks.
Override:
Effect#initializepublic isXRayEnabled(): Boolean source
Indicates whether X-ray mode is enabled.
public 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(value: Texture) source
Sets the pattern texture.
Params:
Name | Type | Attribute | Description |
value | Texture | The new texture. |
public setPulseSpeed(value: Number) source
Sets the pulse speed. Set to zero to disable.
Params:
Name | Type | Attribute | Description |
value | Number | The speed. |
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 setXRayEnabled(value: Boolean) source
Enables or disables X-ray outlines.
Params:
Name | Type | Attribute | Description |
value | Boolean | Whether X-ray should be enabled. |
public 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. |