new Viewer(options)
A Viewer can be used to render an interactive 3D scene to a HTML5 canvas.
Parameters:
Name | Type | Description |
---|---|---|
options |
object with following keys:
|
- Source:
Methods
addObject(object, selectable)
Add the given THREE Object3D to the global scene in the viewer.
Parameters:
Name | Type | Description |
---|---|---|
object |
the THREE Object3D to add |
|
selectable |
(optional) - if the object should be added to the selectable list |
- Source:
draw()
Renders the associated scene to the viewer.
- Source:
resize(width, height)
Resize 3D viewer
Parameters:
Name | Type | Description |
---|---|---|
width |
new width value |
|
height |
new height value |
- Source:
start()
Start the render loop
- Source:
stop()
Stop the render loop
- Source: