Skip to content

NgtsCameraControls

Credits: Drei camera controls

NgtsCameraControls is a port of Drei’s CameraControls that is a wrapper around CameraControls which allows you to control the camera with mouse and touch events.

Usage

import { NgtsCameraControls } from 'angular-three-soba/controls';
<ngts-camera-controls />

Outputs

name type description
changed any The event object that is emitted when the camera is changed.
started any The event object that is emitted when the camera starts moving.
ended any The event object that is emitted when the camera stops moving.

Options

options input accepts any properties from CameraControls in addition to the following:

Properties

name type description
camera NgtCamera The camera to control. If not provided, the default camera will be used.
domElement HTMLElement The DOM element to attach the controls to. If not provided, the current connected element will be used.
makeDefault boolean Whether to make this control the default one. Default: false
regress boolean Whether to regress performance. Default: false