addController

fun addController(controller: Controller)(source)

Adds a controller— an implementation of the Controller interface used to handle input events, camera animations, and other interactions— to the widget's scene.

widget.scene.screenSpaceCameraController.enableInputs = false;
widget.scene.screenSpaceCameraController.enableCollisionDetection = false;

const tiltOrbitController = new ScreenSpaceTiltOrbitCameraController();
widget.addController(tiltOrbitController);

Parameters

controller

An implementation of the Controller interface.

See also