Scene

Source: Scene.ts:17

Render node is a logical part of a render mechanism. Represents scene rendering. For example, one scene node for rendering the Earth, another one for rendering the Moon, another node for rendering stars etc. Each render node has its own model view space defined with matrices(scale, rotation, translation, transformation). There are collections of light sources, entities, and so on in the node. Access to the node is renderer.scenes[ "Earth"]


Constructor

new Scene(name: string): Scene

Parameters

  • name (string) — Node name.

Instance Methods

addNode()

Adds node to the current hierarchy.

assign(renderer: Renderer)

Assign render node with renderer.

Parameters

  • renderer (Renderer) — Render node's renderer.

destroy()

Destroy node.

_clear()

protected
Scene.ts:196

Clear current node.

addEntityCollection( entityCollection: EntityCollection, isHidden?: boolean, ): Scene

Adds an entity collection.

Parameters

  • entityCollection (EntityCollection) — Entity collection.
  • isHidden (boolean, optional) — If it's true that this collection has specific rendering.

Returns

removeEntityCollection(entityCollection: EntityCollection)

Removes entity collection.

Parameters

isActive(): Boolean

Gets render node activity.

Returns

  • Boolean

setActive(isActive: boolean)

Rendering activation.

Parameters

  • isActive (boolean) — Activation flag.

setDrawMode(mode: Number)

Sets draw mode

Parameters

  • mode (Number) — Draw mode, such as gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.LINES etc.

drawPickingEntityCollections(ec: Array.<EntityCollection>)

Draw entity collections picking frame.

Parameters