new ThreeJsRenderer()
Renderer class for Three.js
Please do not instantiate this class on your own. Use the
Please do not instantiate this class on your own. Use the
RendererFactory
instead.
Extends
Methods
-
addCallback(type, callbackFn)
-
Adds a callback function that will be called during specific events
Parameters:
Name Type Description type
string Type of callback: 'render' (only choice available now) callbackFn
function Callback function to call - Inherited From:
- Source:
-
getMainMarkerId() → {number}
-
Returns the designated main marker ID
- Inherited From:
- Source:
Returns:
main marker ID- Type
- number
-
hideAllModels()
-
Hides all models that have been loaded
-
init()
-
Initializes the instance
- Inherited From:
- Source:
-
initCameraProjMatrix(camProjMatrixArray)
-
Initializes the camera projection matrix
Parameters:
Name Type Description camProjMatrixArray
Three.Matrix4 Camera projection matrix -
setLocalAxisVisible(isVisible)
-
Sets visibility of local axis
Parameters:
Name Type Description isVisible
boolean Visibility of local axis -
setWireframeVisible(isVisible)
-
Sets visibility of wireframe
Parameters:
Name Type Description isVisible
boolean Visibility of wireframe -
showChildrenOfMarker(markerId, visible)
-
Shows all children of marker
Parameters:
Name Type Description markerId
number ID of marker visible
boolean Whether to show or hide the children - Inherited From:
- Source:
-
update(dt)
-
Updates the renderer
Parameters:
Name Type Description dt
number Time elapsed since previous frame