|
@@ -5,6 +5,7 @@ import { FreeCamera } from "../Cameras/freeCamera";
|
|
import { TargetCamera } from "../Cameras/targetCamera";
|
|
import { TargetCamera } from "../Cameras/targetCamera";
|
|
import { WebXRSessionManager } from "./webXRSessionManager";
|
|
import { WebXRSessionManager } from "./webXRSessionManager";
|
|
import { Viewport } from "../Maths/math.viewport";
|
|
import { Viewport } from "../Maths/math.viewport";
|
|
|
|
+import { Observable } from '../Misc/observable';
|
|
|
|
|
|
/**
|
|
/**
|
|
* WebXR Camera which holds the views for the xrSession
|
|
* WebXR Camera which holds the views for the xrSession
|
|
@@ -18,6 +19,16 @@ export class WebXRCamera extends FreeCamera {
|
|
private _xrInvQuaternionCache = Quaternion.Identity();
|
|
private _xrInvQuaternionCache = Quaternion.Identity();
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * Observable raised before camera teleportation
|
|
|
|
+ */
|
|
|
|
+ public onBeforeCameraTeleport = new Observable<Vector3>();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Observable raised after camera teleportation
|
|
|
|
+ */
|
|
|
|
+ public onAfterCameraTeleport = new Observable<Vector3>();
|
|
|
|
+
|
|
|
|
+ /**
|
|
* Should position compensation execute on first frame.
|
|
* Should position compensation execute on first frame.
|
|
* This is used when copying the position from a native (non XR) camera
|
|
* This is used when copying the position from a native (non XR) camera
|
|
*/
|
|
*/
|