ControllerHost

Collects an array of Controller objects that can be registered with the scene to handle input events, camera animations, and other interactions.
Creates an instance of a ControllerHost. Typically, a ControllerHost is created by the Scene constructor and accessed via Scene#controllerHost.
See:

Members

readonly controllerCount : number

The number of controllers registered to this host.

Methods

registerController(controller, element, priority)

Registers a controller implementation with this host.
Name Type Default Description
controller Controller An implementation of the Controller interface to register with this host.
element HTMLElement The DOM element containing the Cesium scene.
priority number 0 optional An index, less than or equal to the current count of registed controllers, that defines the precedence of the new controller relative to those previously registered. A priority of 0 would mean the new controller would apply its updates before any other controller. As subsequent controllers are updated, their effects are applied on top of any previous update effects. If omitted, the new controller becomes the highest priority, i.e., its updates are applied after all other controllers.

unregisterController(controller, element)

Unregisters a controller implementation from this host.
Name Type Description
controller Controller An implementation of the Controller interface to unregister from this host.
element HTMLElement The DOM element containing the Cesium scene.
Invoked once per frame by the host scene. Updates all registered controllers in order of their priority.
Name Type Description
scene Scene The host scene.
time JulianDate The current simulation time.
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.