new RenderNode(name)
Name | Type | Description |
---|---|---|
name |
string | Node name. |
Extends
Members
-
entityCollectionsArray.<EntityCollection>
-
Entity collection array.
-
lightEnabledboolean
-
Lighting calculations.
-
rendererRenderer
-
Renderer that calls frame() callback.
-
show
-
Show rendering.
Methods
-
addEntityCollection(entityCollection, isHidden){RenderNode}
-
Adds entity collection.
Name Type Description entityCollection
EntityCollection Entity collection. isHidden
boolean optional If it's true that this collection has specific rendering. Returns:
Type Description RenderNode - -
addLight(light){RenderNode}
-
Adds point light source.
Name Type Description light
LightSource Light source. Returns:
Type Description RenderNode -
addNode()
-
Adds node to the current hierarchy.
-
assign(renderer)
-
Assign render node with renderer.
Name Type Description renderer
Renderer Redner node's renderer. -
drawNode()
-
Calls render frame node's callback. Used in renderer.
-
drawPickingEntityCollections(ec)
-
Draw entity collections picking frame.
Name Type Description ec
Array.<og.EntityCollection> Entity collection array. -
getLightByName(name){LightSource}
-
Gets light object by its name.
Name Type Description name
string Point light name. Returns:
Type Description LightSource -
isActive(){Boolean}
-
Gets render node activity.
Returns:
Type Description Boolean - -
removeEntityCollection(entityCollection)
-
Removes entity collection.
Name Type Description entityCollection
EntityCollection Entity collection for remove. -
removeLight(light)
-
Removes light source.
Name Type Description light
LightSource Light source object. -
setActive(isActive)
-
Rendering activation.
Name Type Description isActive
boolean Activation flag. -
setDrawMode(mode)
-
Sets draw mode
Name Type Description mode
Number Draw mode, such as gl.TRIANGLES, gl.TRIANGLE_STRIP, gl.LINES etc. -
transformLights()
-
IMPORTANT: This function have to be called manualy in each render node frame callback, before drawing scene geometry.