Class

RenderCanvas

RenderCanvas(canvas, options)

A rendering canvas

Constructor

new RenderCanvas(canvas, options)

Constructor
Parameters:
Name Type Description
canvas string Id of the container
options Object Options

View Source Renderers/RenderCanvas.js, line 12

Extends

Members

null | RenderTask

protected activeTask

A reference to the active task
Inherited From:

View Source Renderers/RenderTarget.js, line 21

Context

protected context

Context instance
Inherited From:

View Source Renderers/RenderTarget.js, line 29

RenderAPI

protected renderApi

The render API to use: For now the renderer support WebGL 1.0.3 only
Overrides:

View Source Renderers/RenderCanvas.js, line 28

Array.<RenderTask>

protected tasks

Tasks to execute
Inherited From:

View Source Renderers/RenderTarget.js, line 37

Methods

clear(colornullable)

Clear the canvas
Parameters:
Name Type Attributes Description
color Color <nullable>
A Color instance
Overrides:

View Source Renderers/RenderCanvas.js, line 39

createTask() → {number}

Create a new task
Inherited From:

View Source Renderers/RenderTarget.js, line 60

RenderTask's index
number

getActiveTask() → (nullable) {RenderTask}

Get the active task
Inherited From:

View Source Renderers/RenderTarget.js, line 112

A RenderTask or null
RenderTask

getHeight() → (non-null) {number}

Get height
Inherited From:

View Source Renderers/RenderTarget.js, line 156

Height in pixels
number

getRenderAPI() → {RenderAPI}

Get the render API
Inherited From:

View Source Renderers/RenderTarget.js, line 129

A Render API instance
RenderAPI

getSize() → {Array.<number>}

Get size
Inherited From:

View Source Renderers/RenderTarget.js, line 138

A array with size on x and y
Array.<number>

getWidth() → (non-null) {number}

Get width
Inherited From:

View Source Renderers/RenderTarget.js, line 147

Width in pixels
number

removeTasks()

Remove all the tasks in memory
Inherited From:

View Source Renderers/RenderTarget.js, line 119

render(scene, camera)

Render the given scene
Parameters:
Name Type Description
scene Scene A Scene instance
camera Camera A Camera instance
Inherited From:

View Source Renderers/RenderTarget.js, line 80

setActiveTask(index)

Set the task with the given index active
Parameters:
Name Type Description
index number An integer representing task's index
Inherited From:

View Source Renderers/RenderTarget.js, line 101