TransformControls constructor

TransformControls(
  1. dynamic camera,
  2. dynamic domKey
)

Implementation

TransformControls(camera, domKey) : super() {
  scope = this;

  this.visible = false;
  this.domKey = domKey;
  this.domElement = domKey.currentState;
  // this.domElement.style.touchAction = 'none'; // disable touch scroll

  _gizmo = TransformControlsGizmo(this);
  _gizmo.name = "TransformControlsGizmo";

  _plane = TransformControlsPlane(this);
  _plane.name = "TransformControlsPlane";

  this.camera = camera;

  this.add(_gizmo);
  this.add(_plane);

  this.domElement.addEventListener('pointerdown', this._onPointerDown, false);
  this
      .domElement
      .addEventListener('pointermove', this._onPointerHover, false);
  this.domElement.addEventListener('pointerup', this._onPointerUp, false);
}