The three.js object for this view. Should be a subclass of THREE.Object3D
Sets a callback function to be called whenever the state specified in state_key changes. The return value callbackSwitch is a callback switch. You can activate the listener with callbackSwitch.activate() and deactive with callbackSwitch.deactivate(). Example Usage:
var callbackswitch = model.addStateKeyListener('name',()=>{
n_name_changes = n_name_changes+1;
})
the name of the state to listen to
the callback to be executed when state changes
the handle / unique identifier for
whether callbacks should happen synchronously or allow for batching
Adds the threejs object to its parent in the scenegraph This function should also initialize threejs graphics in subclasses: initGraphics(){ super.initGraphics(); // initialize other threejs objects and add them to this.threejs }
Generated using TypeDoc
The contructor should always work without arguments