Constructor
new RTTNode( node : Node, width : number, height : number, options : Object )
Constructs a new RTT node.
| node |
The node to render a texture with. |
||||||
| width |
The width of the internal render target. If no width is applied, the render target is automatically resized. Default is |
||||||
| height |
The height of the internal render target. Default is |
||||||
| options |
The options for the internal render target. Default is
|
Properties
.autoResize : boolean (readonly)
Whether the internal render target should automatically be resized or not.
Default is true.
.autoUpdate : boolean
Whether the texture should automatically be updated or not.
Default is true.
.height : number
The height of the internal render target.
Default is null.
.isRTTNode : boolean (readonly)
This flag can be used for type testing.
Default is true.
.renderTarget : RenderTarget
The render target
.textureNeedsUpdate : boolean
Whether the texture requires an update or not.
Default is true.
.updateBeforeType : string
The updateBeforeType is set to NodeUpdateType.FRAME since the node updates
the texture once per frame in its RTTNode#updateBefore method.
Default is 'frame'.
- Overrides: TextureNode#updateBeforeType
.value
Overwritten since the value is defined by the internal render target.
- Overrides: TextureNode#value
.width : number
The width of the internal render target. If not width is applied, the render target is automatically resized.
Default is null.
Methods
.dispose()
Frees internal resources. Should be called when the node is no longer in use.
- Overrides: TextureNode#dispose
.getResolutionScale() : number
Gets the resolution scale.
- Returns: The resolution scale.
.setResolutionScale( resolutionScale : number ) : RTTNode
Sets the resolution scale. The resolution scale is a factor that is multiplied with the renderer's width and height.
| resolutionScale |
The resolution scale to set. A value of |
- Returns: A reference to this node.
.setSize( width : number, height : number )
Sets the size of the internal render target.
| width |
The width to set. |
| height |
The height to set. |
.updateBefore( frame : NodeFrame )
Renders the node's output into the internal render target before the main render pass.
Handles automatic resizing of the render target when autoResize is enabled,
and skips rendering if neither textureNeedsUpdate nor autoUpdate is true.
| frame |
The current node frame, providing access to the renderer and other frame data. |
- Overrides: TextureNode#updateBefore