|
@@ -113,6 +113,16 @@ module BABYLON {
|
|
private _circleEase: CircleEase;
|
|
private _circleEase: CircleEase;
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * Observable raised before camera teleportation
|
|
|
|
+ */
|
|
|
|
+ public onBeforeCameraTeleport = new Observable<Vector3>();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Observable raised after camera teleportation
|
|
|
|
+ */
|
|
|
|
+ public onAfterCameraTeleport = new Observable<Vector3>();
|
|
|
|
+
|
|
|
|
+ /**
|
|
* Observable raised when current selected mesh gets unselected
|
|
* Observable raised when current selected mesh gets unselected
|
|
*/
|
|
*/
|
|
public onSelectedMeshUnselected = new Observable<AbstractMesh>();
|
|
public onSelectedMeshUnselected = new Observable<AbstractMesh>();
|
|
@@ -1223,6 +1233,8 @@ module BABYLON {
|
|
this._workingVector.y += this._defaultHeight;
|
|
this._workingVector.y += this._defaultHeight;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ this.onBeforeCameraTeleport.notifyObservers(this._workingVector);
|
|
|
|
+
|
|
// Create animation from the camera's position to the new location
|
|
// Create animation from the camera's position to the new location
|
|
this.currentVRCamera.animations = [];
|
|
this.currentVRCamera.animations = [];
|
|
var animationCameraTeleportation = new Animation("animationCameraTeleportation", "position", 90, Animation.ANIMATIONTYPE_VECTOR3, Animation.ANIMATIONLOOPMODE_CONSTANT);
|
|
var animationCameraTeleportation = new Animation("animationCameraTeleportation", "position", 90, Animation.ANIMATIONTYPE_VECTOR3, Animation.ANIMATIONLOOPMODE_CONSTANT);
|
|
@@ -1289,7 +1301,9 @@ module BABYLON {
|
|
this._scene.beginAnimation(this._postProcessMove, 0, 11, false, 1, () => {
|
|
this._scene.beginAnimation(this._postProcessMove, 0, 11, false, 1, () => {
|
|
this._webVRCamera.detachPostProcess(this._postProcessMove)
|
|
this._webVRCamera.detachPostProcess(this._postProcessMove)
|
|
});
|
|
});
|
|
- this._scene.beginAnimation(this.currentVRCamera, 0, 11, false, 1);
|
|
|
|
|
|
+ this._scene.beginAnimation(this.currentVRCamera, 0, 11, false, 1, () => {
|
|
|
|
+ this.onAfterCameraTeleport.notifyObservers(this._workingVector);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
private _castRayAndSelectObject() {
|
|
private _castRayAndSelectObject() {
|