Scene

Scene

Holds an array of transforms to make updating and drawing a large number of transforms more convenient.

Constructor

new Scene()

Source:

Methods

addTransform(obj)

Source:
Add Transform to scene objects list. If added transform is camera it is set as the active camera of the scene.
Parameters:
Name Type Description
obj Transform

draw(gl, camera)

Source:
Sets up the camera and. Calls Transform#draw on each transform.
Parameters:
Name Type Description
gl WebGLRenderingContext
camera Camera If camera is undefined, Scene#activeCamera is used instead.

update()

Source:
Calls Transform#update on each transform.