pointerDown method

dynamic pointerDown(
  1. Pointer pointer
)

Implementation

pointerDown(Pointer pointer) {
  _pointer0 = pointer;


  if (this.object == null || this.dragging == true || pointer.button != 1)
    return;

  if (this.axis != null) {
    _raycaster.setFromCamera(Vector2(pointer.x, pointer.y), this.camera);

    var planeIntersect =
        intersectObjectWithRay(this._plane, _raycaster, true);

    if (planeIntersect != null && planeIntersect != false) {
      this.object.updateMatrixWorld(false);
      this.object.parent.updateMatrixWorld(false);

      this._positionStart.copy(this.object.position);
      this._quaternionStart.copy(this.object.quaternion);
      this._scaleStart.copy(this.object.scale);

      this.object.matrixWorld.decompose(this.worldPositionStart,
          this.worldQuaternionStart, this._worldScaleStart);

      this.pointStart.copy(planeIntersect.point).sub(this.worldPositionStart);
    }

    this.dragging = true;
    _mouseDownEvent.mode = this.mode;
    this.dispatchEvent(_mouseDownEvent);
  }
}