|
@@ -1,7 +1,7 @@
|
|
module BABYLON {
|
|
module BABYLON {
|
|
// We're mainly based on the logic defined into the FreeCamera code
|
|
// We're mainly based on the logic defined into the FreeCamera code
|
|
/**
|
|
/**
|
|
- * This is a camera specifically designed to react to device orientation events such as a modern mobile device
|
|
|
|
|
|
+ * This is a camera specifically designed to react to device orientation events such as a modern mobile device
|
|
* being tilted forward or back and left or right.
|
|
* being tilted forward or back and left or right.
|
|
*/
|
|
*/
|
|
export class DeviceOrientationCamera extends FreeCamera {
|
|
export class DeviceOrientationCamera extends FreeCamera {
|
|
@@ -12,7 +12,7 @@ module BABYLON {
|
|
/**
|
|
/**
|
|
* Creates a new device orientation camera. @see DeviceOrientationCamera
|
|
* Creates a new device orientation camera. @see DeviceOrientationCamera
|
|
* @param name The name of the camera
|
|
* @param name The name of the camera
|
|
- * @param position The starts position camera
|
|
|
|
|
|
+ * @param position The start position camera
|
|
* @param scene The scene the camera belongs to
|
|
* @param scene The scene the camera belongs to
|
|
*/
|
|
*/
|
|
constructor(name: string, position: Vector3, scene: Scene) {
|
|
constructor(name: string, position: Vector3, scene: Scene) {
|
|
@@ -46,6 +46,7 @@ module BABYLON {
|
|
* @param axis The axis to reset
|
|
* @param axis The axis to reset
|
|
*/
|
|
*/
|
|
public resetToCurrentRotation(axis: Axis = Axis.Y): void {
|
|
public resetToCurrentRotation(axis: Axis = Axis.Y): void {
|
|
|
|
+
|
|
//can only work if this camera has a rotation quaternion already.
|
|
//can only work if this camera has a rotation quaternion already.
|
|
if (!this.rotationQuaternion) return;
|
|
if (!this.rotationQuaternion) return;
|
|
|
|
|
|
@@ -67,4 +68,4 @@ module BABYLON {
|
|
this._initialQuaternion.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion);
|
|
this._initialQuaternion.multiplyToRef(this.rotationQuaternion, this.rotationQuaternion);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+}
|