Capítulo 468 de 859
RTTNode takes another node and uses it with a QuadMesh to render into a texture (RTT). This module is especially relevant in context of post processing where certain nodes require texture input for their effects. With the helper function convertToTexture() which is based on this module, the node system can automatically ensure texture input if required.
updateBeforeType is set to NodeUpdateType.RENDER since the node updates the texture once per render in its [RTTNode#updateBefore](R…Constructor
| Signature |
|---|
new RTTNode( node : Node, width : number, height : number, options : Object ) |
Properties
| Property | Description |
|---|---|
.autoResize : boolean (readonly) | Whether the internal render target should automatically be resized or not. |
.autoUpdate : boolean | Whether the texture should automatically be updated or not. |
.height : number | The height of the internal render target. |
.isRTTNode : boolean (readonly) | This flag can be used for type testing. |
.node : Node | The node to render a texture with. |
.renderTarget : RenderTarget | The render target |
.textureNeedsUpdate : boolean | Whether the texture requires an update or not. |
.updateBeforeType : string | The updateBeforeType is set to NodeUpdateType.RENDER since the node updates the texture once per render in its RTTNode#updateBefore method. |
.width : number | The width of the internal render target. If not width is applied, the render target is automatically resized. |
Methods
| Method | Description |
|---|---|
.getResolutionScale() : number | Gets 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. |
.setSize( width : number, height : number ) | Sets the size of the internal render target |