Constructor
(abstract) new RenderTargetBase()
Extends
Members
clearColor :boolean
Whether to clear the color buffer before rendering to this render target.
- boolean
- Default Value
- true
clearDepth :boolean
Whether to clear the depth buffer before rendering to this render target.
- boolean
- Default Value
- true
clearStencil :boolean
Whether to clear the stencil buffer before rendering to this render target.
- boolean
- Default Value
- true
colorClearValue :Color4
Clear color value.
depthClearValue :number
Clear depth value.
- number
- Default Value
- 1
height :number
The height of the render target.
- number
(readonly) isRenderTarget :boolean
This flag can be used for type testing.
- boolean
- Default Value
- true
occlusionQuerySet :QuerySet|null
A querySet that will store the occlusion query results. If null, occlusion queries are disabled.
- QuerySet |
null
- Default Value
- null
stencilClearValue :number
Clear stencil value.
- number
- Default Value
- 0
timestampWrites :object
An array of objects defining where and when timestamp query values will be written.
- object
Name | Type | Description |
---|---|---|
querySet | QuerySet | | A timestamp querySet. If null, timestamp queries are disabled. |
beginningOfPassWriteIndex | number | A number specifying the query index in querySet where the timestamp at the beginning of the render pass will be written. |
endOfPassWriteIndex | number | A number specifying the query index in querySet where the timestamp at the end of the render pass will be written. |
width :number
The width of the render target.
- number
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
dispatchEvent(event)
Fire an event.
Name | Type | Description |
---|---|---|
event | object | The event that gets fired. |
- Overrides
(abstract) dispose()
Dispose the render target.
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
(abstract) resize()
Resize the render target to the specified dimensions.
setClear(coloropt, depthopt, stencilopt) → {RenderTargetBase}
Sets the clear state.
Name | Type | Attributes | Description |
---|---|---|---|
color | boolean | <optional> | Whether to clear the color buffer. |
depth | boolean | <optional> | Whether to clear the depth buffer. |
stencil | boolean | <optional> | Whether to clear the stencil buffer. |
A reference to this render target.
- Type:
- RenderTargetBase
setColorClearValue(r, g, b, a) → {RenderTargetBase}
Sets the clear values.
Name | Type | Description |
---|---|---|
r | number | Red channel value between 0.0 and 1.0. |
g | number | Green channel value between 0.0 and 1.0. |
b | number | Blue channel value between 0.0 and 1.0. |
a | number | Alpha channel value between 0.0 and 1.0. |
A reference to this render target.
- Type:
- RenderTargetBase
setDepthClearValue(depth) → {RenderTargetBase}
Sets the clear depth value.
Name | Type | Description |
---|---|---|
depth | number | The depth value. |
A reference to this render target.
- Type:
- RenderTargetBase
setOcclusionQuerySet(querySet) → {RenderTargetBase}
Sets the occlusion query set.
Name | Type | Description |
---|---|---|
querySet | QuerySet | | The occlusion query set. If null, occlusion queries are disabled. |
A reference to this render target.
- Type:
- RenderTargetBase
setStencilClearValue(stencil) → {RenderTargetBase}
Sets the clear stencil value.
Name | Type | Description |
---|---|---|
stencil | number | The stencil value. |
A reference to this render target.
- Type:
- RenderTargetBase
setTimestampWrites(querySet, beginIndexopt, endIndexopt) → {RenderTargetBase}
Sets the timestamp query set and the query indices.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
querySet | QuerySet | | The timestamp query set. If null, timestamp queries are disabled. | ||
beginIndex | number | <optional> | 0 | The query index in querySet where the timestamp at the beginning of the render pass will be written. |
endIndex | number | <optional> | 1 | The query index in querySet where the timestamp at the end of the render pass will be written. |
A reference to this render target.
- Type:
- RenderTargetBase