Constructor
new RenderTexture(width, height, textureCount, useDepthBufferopt, useStencilBufferopt)
Constructor
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
width |
number | Texture's width | ||
height |
number | Texture's height | ||
textureCount |
number | Texture count | ||
useDepthBuffer |
boolean |
<optional> |
true | True to use a depth buffer |
useStencilBuffer |
boolean |
<optional> |
false | True to use a stencil buffer |
Extends
Members
Methods
clear(colornullable)
Clear the texture
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
color |
Color |
<nullable> |
A Color instance |
createTask() → {number}
Create a new task
- Inherited From:
RenderTask's index
number
getHeight() → (non-null) {number}
Get height
- Inherited From:
Height in pixels
number
getSize() → {Array.<number>}
Get size
- Inherited From:
A array with size on x and y
Array.<number>
getWidth() → (non-null) {number}
Get width
- Inherited From:
Width in pixels
number
removeTasks()
Remove all the tasks in memory
- Inherited From:
render(scene, camera)
Render the given scene
Parameters:
Name | Type | Description |
---|---|---|
scene |
Scene | A Scene instance |
camera |
Camera | A Camera instance |
- Inherited From:
setActiveTask(index)
Set the task with the given index active
Parameters:
Name | Type | Description |
---|---|---|
index |
number | An integer representing task's index |
- Inherited From: