|
@@ -13753,8 +13753,9 @@ var BaseCameraMouseWheelInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- BaseCameraMouseWheelInput.prototype.detachControl = function () {
|
|
|
+ BaseCameraMouseWheelInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._observer) {
|
|
|
this.camera.getScene().onPointerObservable.remove(this._observer);
|
|
|
this._observer = null;
|
|
@@ -14012,8 +14013,9 @@ var BaseCameraPointersInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- BaseCameraPointersInput.prototype.detachControl = function () {
|
|
|
+ BaseCameraPointersInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._onLostFocus) {
|
|
|
var hostWindow = this.camera.getScene().getEngine().getHostWindow();
|
|
|
if (hostWindow) {
|
|
@@ -14178,9 +14180,9 @@ var ArcRotateCameraGamepadInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
- * @param element Defines the element to stop listening the inputs from
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- ArcRotateCameraGamepadInput.prototype.detachControl = function () {
|
|
|
+ ArcRotateCameraGamepadInput.prototype.detachControl = function (ignored) {
|
|
|
this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);
|
|
|
this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);
|
|
|
this.gamepad = null;
|
|
@@ -14364,8 +14366,9 @@ var ArcRotateCameraKeyboardMoveInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- ArcRotateCameraKeyboardMoveInput.prototype.detachControl = function () {
|
|
|
+ ArcRotateCameraKeyboardMoveInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._scene) {
|
|
|
if (this._onKeyboardObserver) {
|
|
|
this._scene.onKeyboardObservable.remove(this._onKeyboardObserver);
|
|
@@ -14585,8 +14588,9 @@ var ArcRotateCameraMouseWheelInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- ArcRotateCameraMouseWheelInput.prototype.detachControl = function () {
|
|
|
+ ArcRotateCameraMouseWheelInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._observer) {
|
|
|
this.camera.getScene().onPointerObservable.remove(this._observer);
|
|
|
this._observer = null;
|
|
@@ -14966,8 +14970,9 @@ var ArcRotateCameraVRDeviceOrientationInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- ArcRotateCameraVRDeviceOrientationInput.prototype.detachControl = function () {
|
|
|
+ ArcRotateCameraVRDeviceOrientationInput.prototype.detachControl = function (ignored) {
|
|
|
window.removeEventListener("deviceorientation", this._deviceOrientationHandler);
|
|
|
};
|
|
|
/**
|
|
@@ -15099,8 +15104,9 @@ var FlyCameraKeyboardInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FlyCameraKeyboardInput.prototype.detachControl = function () {
|
|
|
+ FlyCameraKeyboardInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._scene) {
|
|
|
if (this._onKeyboardObserver) {
|
|
|
this._scene.onKeyboardObservable.remove(this._onKeyboardObserver);
|
|
@@ -15282,8 +15288,9 @@ var FlyCameraMouseInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FlyCameraMouseInput.prototype.detachControl = function () {
|
|
|
+ FlyCameraMouseInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._observer) {
|
|
|
this.camera.getScene().onPointerObservable.remove(this._observer);
|
|
|
this.camera.getScene().onBeforeRenderObservable.remove(this._rollObserver);
|
|
@@ -15625,8 +15632,9 @@ var FollowCameraKeyboardMoveInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FollowCameraKeyboardMoveInput.prototype.detachControl = function () {
|
|
|
+ FollowCameraKeyboardMoveInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._scene) {
|
|
|
if (this._onKeyboardObserver) {
|
|
|
this._scene.onKeyboardObservable.remove(this._onKeyboardObserver);
|
|
@@ -15895,8 +15903,9 @@ var FollowCameraMouseWheelInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FollowCameraMouseWheelInput.prototype.detachControl = function () {
|
|
|
+ FollowCameraMouseWheelInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._observer) {
|
|
|
this.camera.getScene().onPointerObservable.remove(this._observer);
|
|
|
this._observer = null;
|
|
@@ -16225,7 +16234,7 @@ var FreeCameraDeviceOrientationInput = /** @class */ (function () {
|
|
|
*/
|
|
|
this._onDeviceOrientationChangedObservable = new _Misc_observable__WEBPACK_IMPORTED_MODULE_4__["Observable"]();
|
|
|
this._orientationChanged = function () {
|
|
|
- _this._screenOrientationAngle = (window.orientation !== undefined ? +window.orientation : (window.screen.orientation && (window.screen.orientation)['angle'] ? (window.screen.orientation).angle : 0));
|
|
|
+ _this._screenOrientationAngle = window.orientation !== undefined ? +window.orientation : window.screen.orientation && window.screen.orientation["angle"] ? window.screen.orientation.angle : 0;
|
|
|
_this._screenOrientationAngle = -_Misc_tools__WEBPACK_IMPORTED_MODULE_2__["Tools"].ToRadians(_this._screenOrientationAngle / 2);
|
|
|
_this._screenQuaternion.copyFromFloats(0, Math.sin(_this._screenOrientationAngle), 0, Math.cos(_this._screenOrientationAngle));
|
|
|
};
|
|
@@ -16262,10 +16271,11 @@ var FreeCameraDeviceOrientationInput = /** @class */ (function () {
|
|
|
}
|
|
|
}, timeout);
|
|
|
}
|
|
|
- if (typeof (DeviceOrientationEvent) !== "undefined" && typeof DeviceOrientationEvent.requestPermission === 'function') {
|
|
|
- DeviceOrientationEvent.requestPermission()
|
|
|
+ if (typeof DeviceOrientationEvent !== "undefined" && typeof DeviceOrientationEvent.requestPermission === "function") {
|
|
|
+ DeviceOrientationEvent
|
|
|
+ .requestPermission()
|
|
|
.then(function (response) {
|
|
|
- if (response == 'granted') {
|
|
|
+ if (response == "granted") {
|
|
|
window.addEventListener("deviceorientation", eventHandler);
|
|
|
}
|
|
|
else {
|
|
@@ -16317,10 +16327,11 @@ var FreeCameraDeviceOrientationInput = /** @class */ (function () {
|
|
|
//So this is needed.
|
|
|
_this._orientationChanged();
|
|
|
};
|
|
|
- if (typeof (DeviceOrientationEvent) !== "undefined" && typeof DeviceOrientationEvent.requestPermission === 'function') {
|
|
|
- DeviceOrientationEvent.requestPermission()
|
|
|
+ if (typeof DeviceOrientationEvent !== "undefined" && typeof DeviceOrientationEvent.requestPermission === "function") {
|
|
|
+ DeviceOrientationEvent
|
|
|
+ .requestPermission()
|
|
|
.then(function (response) {
|
|
|
- if (response === 'granted') {
|
|
|
+ if (response === "granted") {
|
|
|
eventHandler_1();
|
|
|
}
|
|
|
else {
|
|
@@ -16338,8 +16349,9 @@ var FreeCameraDeviceOrientationInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FreeCameraDeviceOrientationInput.prototype.detachControl = function () {
|
|
|
+ FreeCameraDeviceOrientationInput.prototype.detachControl = function (ignored) {
|
|
|
window.removeEventListener("orientationchange", this._orientationChanged);
|
|
|
window.removeEventListener("deviceorientation", this._deviceOrientation);
|
|
|
this._alpha = 0;
|
|
@@ -16466,8 +16478,9 @@ var FreeCameraGamepadInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FreeCameraGamepadInput.prototype.detachControl = function () {
|
|
|
+ FreeCameraGamepadInput.prototype.detachControl = function (ignored) {
|
|
|
this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);
|
|
|
this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);
|
|
|
this.gamepad = null;
|
|
@@ -16609,12 +16622,7 @@ var FreeCameraKeyboardMoveInput = /** @class */ (function () {
|
|
|
var evt = info.event;
|
|
|
if (!evt.metaKey) {
|
|
|
if (info.type === _Events_keyboardEvents__WEBPACK_IMPORTED_MODULE_3__["KeyboardEventTypes"].KEYDOWN) {
|
|
|
- if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysDown.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysRight.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysUpward.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysDownward.indexOf(evt.keyCode) !== -1) {
|
|
|
+ if (_this.keysUp.indexOf(evt.keyCode) !== -1 || _this.keysDown.indexOf(evt.keyCode) !== -1 || _this.keysLeft.indexOf(evt.keyCode) !== -1 || _this.keysRight.indexOf(evt.keyCode) !== -1 || _this.keysUpward.indexOf(evt.keyCode) !== -1 || _this.keysDownward.indexOf(evt.keyCode) !== -1) {
|
|
|
var index = _this._keys.indexOf(evt.keyCode);
|
|
|
if (index === -1) {
|
|
|
_this._keys.push(evt.keyCode);
|
|
@@ -16625,12 +16633,7 @@ var FreeCameraKeyboardMoveInput = /** @class */ (function () {
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- if (_this.keysUp.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysDown.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysLeft.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysRight.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysUpward.indexOf(evt.keyCode) !== -1 ||
|
|
|
- _this.keysDownward.indexOf(evt.keyCode) !== -1) {
|
|
|
+ if (_this.keysUp.indexOf(evt.keyCode) !== -1 || _this.keysDown.indexOf(evt.keyCode) !== -1 || _this.keysLeft.indexOf(evt.keyCode) !== -1 || _this.keysRight.indexOf(evt.keyCode) !== -1 || _this.keysUpward.indexOf(evt.keyCode) !== -1 || _this.keysDownward.indexOf(evt.keyCode) !== -1) {
|
|
|
var index = _this._keys.indexOf(evt.keyCode);
|
|
|
if (index >= 0) {
|
|
|
_this._keys.splice(index, 1);
|
|
@@ -16645,8 +16648,9 @@ var FreeCameraKeyboardMoveInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FreeCameraKeyboardMoveInput.prototype.detachControl = function () {
|
|
|
+ FreeCameraKeyboardMoveInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._scene) {
|
|
|
if (this._onKeyboardObserver) {
|
|
|
this._scene.onKeyboardObservable.remove(this._onKeyboardObserver);
|
|
@@ -16917,8 +16921,9 @@ var FreeCameraMouseInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FreeCameraMouseInput.prototype.detachControl = function () {
|
|
|
+ FreeCameraMouseInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._observer) {
|
|
|
this.camera.getScene().onPointerObservable.remove(this._observer);
|
|
|
if (this.onContextMenu) {
|
|
@@ -17514,9 +17519,9 @@ var FreeCameraTouchInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
- * @param element Defines the element to stop listening the inputs from
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FreeCameraTouchInput.prototype.detachControl = function () {
|
|
|
+ FreeCameraTouchInput.prototype.detachControl = function (ignored) {
|
|
|
if (this._pointerInput) {
|
|
|
if (this._observer) {
|
|
|
this.camera.getScene().onPointerObservable.remove(this._observer);
|
|
@@ -17668,8 +17673,9 @@ var FreeCameraVirtualJoystickInput = /** @class */ (function () {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FreeCameraVirtualJoystickInput.prototype.detachControl = function () {
|
|
|
+ FreeCameraVirtualJoystickInput.prototype.detachControl = function (ignored) {
|
|
|
this._leftjoystick.releaseCanvas();
|
|
|
this._rightjoystick.releaseCanvas();
|
|
|
};
|
|
@@ -21344,9 +21350,10 @@ var WebVRFreeCamera = /** @class */ (function (_super) {
|
|
|
}
|
|
|
};
|
|
|
/**
|
|
|
- * Detaches the camera from the html element and disables VR
|
|
|
+ * Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- WebVRFreeCamera.prototype.detachControl = function () {
|
|
|
+ WebVRFreeCamera.prototype.detachControl = function (ignored) {
|
|
|
this.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver);
|
|
|
this.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver);
|
|
|
_super.prototype.detachControl.call(this);
|
|
@@ -22344,13 +22351,16 @@ var ArcRotateCamera = /** @class */ (function (_super) {
|
|
|
if (useCtrlForPanning === void 0) { useCtrlForPanning = true; }
|
|
|
if (panningMouseButton === void 0) { panningMouseButton = 2; }
|
|
|
noPreventDefault = _Misc_tools__WEBPACK_IMPORTED_MODULE_13__["Tools"].BackCompatCameraNoPreventDefault(arguments);
|
|
|
+ this._useCtrlForPanning = useCtrlForPanning;
|
|
|
+ this._panningMouseButton = panningMouseButton;
|
|
|
+ // backwards compatibility
|
|
|
if (typeof arguments[0] === "boolean") {
|
|
|
- this._useCtrlForPanning = arguments[1];
|
|
|
- this._panningMouseButton = arguments[2];
|
|
|
- }
|
|
|
- else {
|
|
|
- this._useCtrlForPanning = useCtrlForPanning;
|
|
|
- this._panningMouseButton = panningMouseButton;
|
|
|
+ if (arguments.length > 1) {
|
|
|
+ this._useCtrlForPanning = arguments[1];
|
|
|
+ }
|
|
|
+ if (arguments.length > 2) {
|
|
|
+ this._panningMouseButton = arguments[2];
|
|
|
+ }
|
|
|
}
|
|
|
this.inputs.attachElement(noPreventDefault);
|
|
|
this._reset = function () {
|
|
@@ -22362,10 +22372,10 @@ var ArcRotateCamera = /** @class */ (function (_super) {
|
|
|
};
|
|
|
};
|
|
|
/**
|
|
|
- * Detach the current controls from the camera.
|
|
|
- * The camera will stop reacting to inputs.
|
|
|
+ * Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- ArcRotateCamera.prototype.detachControl = function () {
|
|
|
+ ArcRotateCamera.prototype.detachControl = function (ignored) {
|
|
|
this.inputs.detachElement();
|
|
|
if (this._reset) {
|
|
|
this._reset();
|
|
@@ -23226,8 +23236,9 @@ var Camera = /** @class */ (function (_super) {
|
|
|
};
|
|
|
/**
|
|
|
* Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- Camera.prototype.detachControl = function () {
|
|
|
+ Camera.prototype.detachControl = function (ignored) {
|
|
|
};
|
|
|
/**
|
|
|
* Update the camera state according to the different inputs gathered during the frame.
|
|
@@ -24684,10 +24695,11 @@ var FlyCamera = /** @class */ (function (_super) {
|
|
|
configurable: true
|
|
|
});
|
|
|
/**
|
|
|
- * Attach a control to the HTML DOM element.
|
|
|
- * @param noPreventDefault Defines whether events caught by the controls should call preventdefault(). https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault
|
|
|
+ * Attached controls to the current camera.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
+ * @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
|
|
|
*/
|
|
|
- FlyCamera.prototype.attachControl = function (noPreventDefault) {
|
|
|
+ FlyCamera.prototype.attachControl = function (ignored, noPreventDefault) {
|
|
|
noPreventDefault = _Misc_tools__WEBPACK_IMPORTED_MODULE_6__["Tools"].BackCompatCameraNoPreventDefault(arguments);
|
|
|
this.inputs.attachElement(noPreventDefault);
|
|
|
};
|
|
@@ -25019,19 +25031,20 @@ var FollowCamera = /** @class */ (function (_super) {
|
|
|
};
|
|
|
/**
|
|
|
* Attached controls to the current camera.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
* @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
|
|
|
*/
|
|
|
- FollowCamera.prototype.attachControl = function (noPreventDefault) {
|
|
|
+ FollowCamera.prototype.attachControl = function (ignored, noPreventDefault) {
|
|
|
noPreventDefault = _Misc_tools__WEBPACK_IMPORTED_MODULE_2__["Tools"].BackCompatCameraNoPreventDefault(arguments);
|
|
|
this.inputs.attachElement(noPreventDefault);
|
|
|
this._reset = function () {
|
|
|
};
|
|
|
};
|
|
|
/**
|
|
|
- * Detach the current controls from the camera.
|
|
|
- * The camera will stop reacting to inputs.
|
|
|
+ * Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FollowCamera.prototype.detachControl = function () {
|
|
|
+ FollowCamera.prototype.detachControl = function (ignored) {
|
|
|
this.inputs.detachElement();
|
|
|
if (this._reset) {
|
|
|
this._reset();
|
|
@@ -25489,17 +25502,18 @@ var FreeCamera = /** @class */ (function (_super) {
|
|
|
});
|
|
|
/**
|
|
|
* Attached controls to the current camera.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
* @param noPreventDefault Defines whether event caught by the controls should call preventdefault() (https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault)
|
|
|
*/
|
|
|
- FreeCamera.prototype.attachControl = function (noPreventDefault) {
|
|
|
+ FreeCamera.prototype.attachControl = function (ignored, noPreventDefault) {
|
|
|
noPreventDefault = _Misc_tools__WEBPACK_IMPORTED_MODULE_6__["Tools"].BackCompatCameraNoPreventDefault(arguments);
|
|
|
this.inputs.attachElement(noPreventDefault);
|
|
|
};
|
|
|
/**
|
|
|
- * Detach the current controls from the camera.
|
|
|
- * The camera will stop reacting to inputs.
|
|
|
+ * Detach the current controls from the specified dom element.
|
|
|
+ * @param ignored defines an ignored parameter kept for backward compatibility. If you want to define the source input element, you can set engine.inputElement before calling camera.attachControl
|
|
|
*/
|
|
|
- FreeCamera.prototype.detachControl = function () {
|
|
|
+ FreeCamera.prototype.detachControl = function (ignored) {
|
|
|
this.inputs.detachElement();
|
|
|
this.cameraDirection = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__["Vector3"](0, 0, 0);
|
|
|
this.cameraRotation = new _Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__["Vector2"](0, 0);
|