ArcballControls constructor
ArcballControls(
- dynamic camera,
- dynamic listenableKey, [
- dynamic scene = null,
- dynamic devicePixelRatio = 1.0,
Implementation
ArcballControls(camera, listenableKey, [scene = null, devicePixelRatio = 1.0])
: super() {
this.camera = camera;
this.listenableKey = listenableKey;
this.scene = scene;
//FSA
this._state = STATE2.IDLE;
this.setCamera(camera);
if (this.scene != null) {
this.scene!.add(this._gizmos);
}
// this.domElement.style.touchAction = 'none';
this._devPxRatio = devicePixelRatio;
this.initializeMouseActions();
this.domElement.addEventListener('contextmenu', this.onContextMenu);
this.domElement.addEventListener('wheel', this.onWheel);
this.domElement.addEventListener('pointerdown', this.onPointerDown);
this.domElement.addEventListener('pointercancel', this.onPointerCancel);
// window.addEventListener( 'resize', this.onWindowResize );
}