Constructor
new Renderer(handler, paramsopt)
Name | Type | Attributes | Description |
---|---|---|---|
handler | Handler | WebGL handler context. | |
params | Object | <optional> | Renderer parameters: |
- Source
- RendererEventsHandler
#event:draw - RendererEventsHandler
#event:resize - RendererEventsHandler
#event:mousemove - RendererEventsHandler
#event:mousestop - RendererEventsHandler
#event:lclick - RendererEventsHandler
#event:rclick - RendererEventsHandler
#event:mclick - RendererEventsHandler
#event:ldblclick - RendererEventsHandler
#event:rdblclick - RendererEventsHandler
#event:mdblclick - RendererEventsHandler
#event:lup - RendererEventsHandler
#event:rup - RendererEventsHandler
#event:mup - RendererEventsHandler
#event:ldown - RendererEventsHandler
#event:rdown - RendererEventsHandler
#event:mdown - RendererEventsHandler
#event:lhold - RendererEventsHandler
#event:rhold - RendererEventsHandler
#event:mhold - RendererEventsHandler
#event:mousewheel - RendererEventsHandler
#event:touchstart - RendererEventsHandler
#event:touchend - RendererEventsHandler
#event:touchcancel - RendererEventsHandler
#event:touchmove - RendererEventsHandler
#event:doubletouch - RendererEventsHandler
#event:touchleave - RendererEventsHandler
#event:touchenter
Members
billboardsTextureAtlas :TextureAtlas
Texture atlas for the billboards images. One atlas per node.
- Source
fontAtlas :FontAtlas
Texture font atlas for the font families and styles. One atlas per node.
- FontAtlas
- Source
geoObjectsTextureAtlas :TextureAtlas
Texture atlas for the billboards images. One atlas per node.
- Source
Methods
(protected) _drawEntityCollections()
- Source
addControl(control)
Add the given control to the renderer.
Name | Type | Description |
---|---|---|
control | Control | Control. |
- Source
addControls(cArr)
Add the given controls array to the planet node.
Name | Type | Description |
---|---|---|
cArr | Array.<Control> | Control array. |
- Source
addNode(renderNode)
Adds render node to the renderer.
Name | Type | Description |
---|---|---|
renderNode | RenderNode | Render node. |
- Source
addNodeBefore(renderNode, renderNodeBefore)
Adds render node to the renderer before specific node.
Name | Type | Description |
---|---|---|
renderNode | RenderNode | Render node. |
renderNodeBefore | RenderNode | Insert before the renderNodeBefore node. |
- Source
addNodes(nodesArr)
Adds render nodes array to the renderer.
Name | Type | Description |
---|---|---|
nodesArr | Array.<RenderNode> | Render nodes array. |
- Source
addPickingCallback(sender, callback) → {Number}
Adds picking rendering callback function.
Name | Type | Description |
---|---|---|
sender | object | Callback context. |
callback | function | Rendering callback. |
- Source
Handler id
- Type:
- Number
assignPickingColor(obj)
Assign picking color to the object.
Name | Type | Description |
---|---|---|
obj | Object | Object that presume to be picked. |
- Source
clearPickingColor(obj)
Removes picking color from object.
Name | Type | Description |
---|---|---|
obj | Object | Object to remove picking color. |
- Source
draw()
Draw nodes.
- Source
enqueueEntityCollectionsToDraw()
TODO: replace with cache friendly linked list by BillboardHandler, LabelHandler etc.
- Source
getCartesianFromPixel(px) → {Vec3|undefined}
Returns 3d coordinates from screen coordinates
Name | Type | Description |
---|---|---|
px | Vec2 | | Screen coordinates. |
- Source
- Type:
- Vec3 |
undefined
getCenter() → {Vec2}
Get center of the canvas
- Source
- Type:
- Vec2
getClientCenter() → {Vec2}
Get center of the screen viewport
- Source
- Type:
- Vec2
getDistanceFromPixel(px) → {number|undefined}
Returns the distance from the active (screen) camera to the 3d-surface using the defined screen coordinates
Name | Type | Description |
---|---|---|
px | Vec2 | | Screen coordinates. |
- Source
- Type:
- number |
undefined
getHeight() → {number}
Get the client height.
- Source
- Type:
- number
getWidth() → {number}
Get the client width.
- Source
- Type:
- number
initialize()
Renderer initialization.
- Source
removeControl(control)
Remove control from the renderer.
Name | Type | Description |
---|---|---|
control | Control | Control. |
- Source
removePickingCallback(id)
Removes picking rendering callback function.
Name | Type | Description |
---|---|---|
id | Number | Handler id to remove. |
- Source
setEventsActivity(activity)
Sets renderer events activity.
Name | Type | Description |
---|---|---|
activity | Boolean | Events activity. |
- Source
start()
Function starts renderer
- Source