Constructor
new GrWorld(params)
Construct an empty world
Parameters:
| Name | Type | Description |
|---|---|---|
params |
GrWorldProperties |
- Source:
Members
active_object :GrObject
Type:
- GrObject
- Source:
animCount :Number
Type:
- Number
- Source:
autoUIGUI :Object|undefined
Type:
- Object | undefined
- Source:
autoUIOptions :GrWorldAutoUIOptions
Type:
- GrWorldAutoUIOptions
- Source:
camera :T.PerspectiveCamera
Type:
- T.PerspectiveCamera
- Source:
chkSolo :HTMLInputElement|undefined
Type:
- HTMLInputElement | undefined
- Source:
gui :any
Type:
- any
- Source:
objCount :Number
Type:
- Number
- Source:
objNames :Object
Type:
- Object
- Source:
objects :Array.<GrObject>
Type:
- Array.<GrObject>
- Source:
renderer :T.WebGLRenderer
Type:
- T.WebGLRenderer
- Source:
runbutton :Object|undefined
Type:
- Object | undefined
- Source:
selectLook :HTMLSelectElement|undefined
Type:
- HTMLSelectElement | undefined
- Source:
selectRideable :HTMLSelectElement|undefined
Type:
- HTMLSelectElement | undefined
- Source:
selectViewMode :HTMLSelectElement|undefined
Type:
- HTMLSelectElement | undefined
- Source:
speedcontrol :Object|undefined
Type:
- Object | undefined
- Source:
Methods
add(grobj)
Add an object to the world - this takes care of putting everything into the scene, as well as assigning IDs
Parameters:
| Name | Type | Description |
|---|---|---|
grobj |
GrObject |
- Source:
animate(callbacksopt)
perform a cycle of the animation loop - this measures the time since the last redraw and advances that much before redrawing
because draw is part of animate, the callbacks are handled here
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
callbacks |
WorldCallbacks |
<optional> |
- Source:
draw()
draw the default camera to the default renderer
- Source:
enableVR()
adds VR capability
- Source:
getAutoUIOptions() → {GrWorldAutoUIOptions}
Get the AutoUI defaults for this world.
- Source:
Returns:
- Type
- GrWorldAutoUIOptions
go(callbacks)
start an (endless) animation loop - this just keeps going
Parameters:
| Name | Type | Description |
|---|---|---|
callbacks |
WorldCallbacks |
- Source:
setAutoUIOptions(options)
Set defaults for AutoUI controls in this world.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
GrWorldAutoUIOptions |
- Source:
stepWorld()
advance all of the objects
- Source:
viewStats()
adds performance stats to the DOM
- Source: