|
@@ -84000,6 +84000,9 @@ var BABYLON;
|
|
|
if (engine && engine.premultipliedAlpha) {
|
|
|
return Promise.reject("Env texture can only be created when the engine is created with the premultipliedAlpha option set to false.");
|
|
|
}
|
|
|
+ if (texture.textureType === BABYLON.Engine.TEXTURETYPE_UNSIGNED_INT) {
|
|
|
+ return Promise.reject("The cube texture should allow HDR (Full Float or Half Float).");
|
|
|
+ }
|
|
|
var canvas = engine.getRenderingCanvas();
|
|
|
if (!canvas) {
|
|
|
return Promise.reject("Env texture can only be created when the engine is associated to a canvas.");
|
|
@@ -88020,12 +88023,14 @@ var BABYLON;
|
|
|
var checkWithEpsilon_1 = function (value) {
|
|
|
return Math.max(value, BABYLON.PhysicsEngine.Epsilon);
|
|
|
};
|
|
|
+ var globalQuaternion_1 = new BABYLON.Quaternion();
|
|
|
impostors.forEach(function (i) {
|
|
|
if (!i.object.rotationQuaternion) {
|
|
|
return;
|
|
|
}
|
|
|
//get the correct bounding box
|
|
|
var oldQuaternion = i.object.rotationQuaternion;
|
|
|
+ globalQuaternion_1 = oldQuaternion.clone();
|
|
|
var rot = oldQuaternion.toEulerAngles();
|
|
|
var extendSize = i.getObjectExtendSize();
|
|
|
var radToDeg = 57.295779513082320876;
|
|
@@ -88039,9 +88044,9 @@ var BABYLON;
|
|
|
bodyConfig.pos.push(center.z);
|
|
|
bodyConfig.posShape.push(0, 0, 0);
|
|
|
//tmp solution
|
|
|
- bodyConfig.rot.push(rot.x * radToDeg);
|
|
|
- bodyConfig.rot.push(rot.y * radToDeg);
|
|
|
- bodyConfig.rot.push(rot.z * radToDeg);
|
|
|
+ bodyConfig.rot.push(0);
|
|
|
+ bodyConfig.rot.push(0);
|
|
|
+ bodyConfig.rot.push(0);
|
|
|
bodyConfig.rotShape.push(0, 0, 0);
|
|
|
}
|
|
|
else {
|
|
@@ -88102,6 +88107,10 @@ var BABYLON;
|
|
|
i.object.rotationQuaternion = oldQuaternion;
|
|
|
});
|
|
|
impostor.physicsBody = this.world.add(bodyConfig);
|
|
|
+ // set the quaternion, ignoring the previously defined (euler) rotation
|
|
|
+ impostor.physicsBody.resetQuaternion(globalQuaternion_1);
|
|
|
+ // update with delta 0, so the body will reveive the new rotation.
|
|
|
+ impostor.physicsBody.updatePosition(0);
|
|
|
}
|
|
|
else {
|
|
|
this._tmpPositionVector.copyFromFloats(0, 0, 0);
|
|
@@ -89523,6 +89532,7 @@ var BABYLON;
|
|
|
}
|
|
|
else {
|
|
|
PointerDragBehavior._planeScene = new BABYLON.Scene(this._scene.getEngine());
|
|
|
+ PointerDragBehavior._planeScene.detachControl();
|
|
|
this._scene.getEngine().scenes.pop();
|
|
|
}
|
|
|
}
|
|
@@ -89585,7 +89595,7 @@ var BABYLON;
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- this._scene.onBeforeRenderObservable.add(function () {
|
|
|
+ this._beforeRenderObserver = this._scene.onBeforeRenderObservable.add(function () {
|
|
|
if (_this._moving && _this.moveAttached) {
|
|
|
// Slowly move mesh to avoid jitter
|
|
|
targetPosition.subtractToRef(_this._attachedNode.absolutePosition, _this._tmpVector);
|
|
@@ -89679,6 +89689,9 @@ var BABYLON;
|
|
|
if (this._pointerObserver) {
|
|
|
this._scene.onPointerObservable.remove(this._pointerObserver);
|
|
|
}
|
|
|
+ if (this._beforeRenderObserver) {
|
|
|
+ this._scene.onBeforeRenderObservable.remove(this._beforeRenderObserver);
|
|
|
+ }
|
|
|
};
|
|
|
return PointerDragBehavior;
|
|
|
}());
|
|
@@ -93348,7 +93361,6 @@ var BABYLON;
|
|
|
};
|
|
|
VRExperienceHelperControllerGazer.prototype._setLaserPointerParent = function (mesh) {
|
|
|
var makeNotPick = function (root) {
|
|
|
- root.name += " laserPointer";
|
|
|
root.isPickable = false;
|
|
|
root.getChildMeshes().forEach(function (c) {
|
|
|
makeNotPick(c);
|
|
@@ -94145,8 +94157,7 @@ var BABYLON;
|
|
|
this._raySelectionPredicate = function (mesh) {
|
|
|
if (_this._isTeleportationFloor(mesh) || (mesh.name.indexOf("gazeTracker") === -1
|
|
|
&& mesh.name.indexOf("teleportationTarget") === -1
|
|
|
- && mesh.name.indexOf("torusTeleportation") === -1
|
|
|
- && mesh.name.indexOf("laserPointer") === -1)) {
|
|
|
+ && mesh.name.indexOf("torusTeleportation") === -1)) {
|
|
|
return _this.raySelectionPredicate(mesh);
|
|
|
}
|
|
|
return false;
|