new Simulation(configopt)
Simulation is a helper class that lets you quickly setup a three.js app with support for AltspaceVR. It creates a basic scene for you and starts the render and behavior loop.
If all of your application logic is in behaviors, you do not need to create any additional requestAnimationFrame loops.
It also automatically uses the WebGL renderer when running in a desktop browser and emulates cursor events with mouse clicks.
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object |
<optional> |
Optional parameters. Properties
|
Members
(readonly) camera :Three.Camera
The camera being used by the WebGL renderer.
(readonly) renderer :THREE.WebGLRenderer|AltRenderer
The renderer being used.
(readonly) scene :THREE.Scene
The simulation scene.