Right now, controllers are restricted to having one or zero active modes at a time. The name of the current mode, which can be active or inactive, is stored here.
Interaction mode map. Has a .modes property that maps mode names to AInteractionModes.
Go through the scenevis controller to access the application state.
Getter for the current interaction mode.
Get set sceneController
Get set sceneController
Add an interaction to the current mode.
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
If you provide a handle, then the action will not call so long as an existing subscription by that handle exists. This means that you won't duplicate the action before one has finished previously.
This is the drag end callback function. This function will be called when the mouse is let go after dragging.
This is the drag move callback function. This function will be called when the mouse is being dragged, so we want to determine which transformations to use and then apply them to the shape.
This is the drag start callback function. This function will be called when the mouse is pressed down, so we'll want to store the interaction's initial state.
We treat the parent of supplemental controllers to be the scenevis controller. This is to make supplemental controllers compatable with the scenevis node controller interface.
Generated using TypeDoc
WARNING: You should never call init() inside of the constructor! This is dangerous due to a weird TypeScript quirk where subclasses can easily overwrite properties set by parent constructors.