Constructor
new RenderTarget3D(width, height, depth)
Name | Type | Description |
---|---|---|
width | number | The width of the render target. |
height | number | The height of the render target. |
depth | number | The depth of the render target. |
Extends
Members
activeLayer :number
Specifies the layer. This is only available in WebGL2.
- number
- Default Value
- 0
activeMipmapLevel :number
Specifies the active mipmap level. This is only available in WebGL2.
- number
- Default Value
- 0
height :number
The height of the render target.
- number
- Overrides
(readonly) isRenderTarget :boolean
- boolean
- Overrides
- Default Value
- true
(readonly) isRenderTarget3D :boolean
- boolean
- Default Value
- true
width :number
The width of the render target.
- number
- Overrides
Methods
addEventListener(type, listener)
Adds a listener to an event type.
Name | Type | Description |
---|---|---|
type | string | The type of event to listen to. |
listener | function | The function that gets called when the event is fired. |
- Overrides
attach(target, attachmentopt)
Attach a texture(RTT) or renderbuffer to the framebuffer. Notice: For now, dynamic Attachment during rendering is not supported.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
target | Texture3D | | |||
attachment | ATTACHMENT | <optional> | ATTACHMENT.COLOR_ATTACHMENT0 |
detach(attachmentopt)
Detach a texture(RTT) or renderbuffer.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
attachment | ATTACHMENT | <optional> | ATTACHMENT.COLOR_ATTACHMENT0 |
dispatchEvent(event)
Fire an event.
Name | Type | Description |
---|---|---|
event | object | The event that gets fired. |
- Overrides
dispose(disposeAttachmentsopt)
Dispose the render target.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
disposeAttachments | boolean | <optional> | true | whether to dispose textures and render buffers attached on this render target. |
- Overrides
removeEventListener(type, listener)
Removes a listener from an event type.
Name | Type | Description |
---|---|---|
type | string | The type of the listener that gets removed. |
listener | function | The listener function that gets removed. |
- Overrides
resize(width, height, depth) → {boolean}
Resize the render target.
Name | Type | Description |
---|---|---|
width | number | The width of the render target. |
height | number | The height of the render target. |
depth | number | The depth of the render target. |
- Overrides
- If size changed.
- Type:
- boolean