|
@@ -8102,10 +8102,10 @@ var BABYLON;
|
|
|
if (!options.disableWebGL2Support) {
|
|
|
if (navigator && navigator.userAgent) {
|
|
|
var ua = navigator.userAgent;
|
|
|
- for (var _i = 0, _a = Engine.WebGL2ExceptionList; _i < _a.length; _i++) {
|
|
|
+ for (var _i = 0, _a = Engine.WebGL2UniformBuffersExceptionList; _i < _a.length; _i++) {
|
|
|
var exception = _a[_i];
|
|
|
if (ua.indexOf(exception) > -1) {
|
|
|
- options.disableWebGL2Support = true;
|
|
|
+ this.disableUniformBuffers = true;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -12303,8 +12303,8 @@ var BABYLON;
|
|
|
return false;
|
|
|
}
|
|
|
};
|
|
|
- /** Use this array to turn off WebGL2 on known buggy browsers version */
|
|
|
- Engine.WebGL2ExceptionList = ["Chrome/63"];
|
|
|
+ /** Use this array to turn off some WebGL2 features on known buggy browsers version */
|
|
|
+ Engine.WebGL2UniformBuffersExceptionList = ["Chrome/63"];
|
|
|
Engine.Instances = new Array();
|
|
|
// Const statics
|
|
|
Engine._ALPHA_DISABLE = 0;
|
|
@@ -26878,7 +26878,7 @@ var BABYLON;
|
|
|
this._program = engine.createShaderProgram(this._vertexSourceCode, this._fragmentSourceCode, defines, undefined, this._transformFeedbackVaryings);
|
|
|
}
|
|
|
this._program.__SPECTOR_rebuildProgram = this._rebuildProgram.bind(this);
|
|
|
- if (engine.webGLVersion > 1) {
|
|
|
+ if (engine.supportsUniformBuffers) {
|
|
|
for (var name in this._uniformBuffersNames) {
|
|
|
this.bindUniformBlock(name, this._uniformBuffersNames[name]);
|
|
|
}
|
|
@@ -72325,6 +72325,7 @@ var BABYLON;
|
|
|
this._interactionsRequested = false;
|
|
|
this._displayGaze = true;
|
|
|
this._displayLaserPointer = true;
|
|
|
+ this._dpadPressed = true;
|
|
|
this._onResize = function () {
|
|
|
_this.moveButtonToBottomRight();
|
|
|
if (_this._fullscreenVRpresenting && _this._webVRready) {
|
|
@@ -72978,7 +72979,7 @@ var BABYLON;
|
|
|
VRExperienceHelper.prototype._checkTeleportWithRay = function (stateObject, webVRController) {
|
|
|
if (webVRController === void 0) { webVRController = null; }
|
|
|
if (!this._teleportationRequestInitiated) {
|
|
|
- if (stateObject.y < -this._padSensibilityUp) {
|
|
|
+ if (stateObject.y < -this._padSensibilityUp && this._dpadPressed) {
|
|
|
if (webVRController) {
|
|
|
// If laser pointer wasn't enabled yet
|
|
|
if (this._displayLaserPointer && webVRController.hand === "left" && this._leftLaserPointer) {
|
|
@@ -73030,7 +73031,7 @@ var BABYLON;
|
|
|
return;
|
|
|
}
|
|
|
if (!this._rotationLeftAsked) {
|
|
|
- if (stateObject.x < -this._padSensibilityUp) {
|
|
|
+ if (stateObject.x < -this._padSensibilityUp && this._dpadPressed) {
|
|
|
this._rotationLeftAsked = true;
|
|
|
if (this._rotationAllowed) {
|
|
|
this._rotateCamera(false);
|
|
@@ -73043,7 +73044,7 @@ var BABYLON;
|
|
|
}
|
|
|
}
|
|
|
if (!this._rotationRightAsked) {
|
|
|
- if (stateObject.x > this._padSensibilityUp) {
|
|
|
+ if (stateObject.x > this._padSensibilityUp && this._dpadPressed) {
|
|
|
this._rotationRightAsked = true;
|
|
|
if (this._rotationAllowed) {
|
|
|
this._rotateCamera(true);
|
|
@@ -73062,7 +73063,7 @@ var BABYLON;
|
|
|
return;
|
|
|
}
|
|
|
// Teleport backwards
|
|
|
- if (stateObject.y > this._padSensibilityUp) {
|
|
|
+ if (stateObject.y > this._padSensibilityUp && this._dpadPressed) {
|
|
|
if (!this._teleportationBackRequestInitiated) {
|
|
|
if (!this.currentVRCamera) {
|
|
|
return;
|
|
@@ -73112,6 +73113,17 @@ var BABYLON;
|
|
|
}
|
|
|
this._teleportationEnabledOnRightController = true;
|
|
|
}
|
|
|
+ if (webVRController.controllerType === BABYLON.PoseEnabledControllerType.VIVE) {
|
|
|
+ this._dpadPressed = false;
|
|
|
+ webVRController.onPadStateChangedObservable.add(function (stateObject) {
|
|
|
+ _this._dpadPressed = stateObject.pressed;
|
|
|
+ if (!_this._dpadPressed) {
|
|
|
+ _this._rotationLeftAsked = false;
|
|
|
+ _this._rotationRightAsked = false;
|
|
|
+ _this._teleportationBackRequestInitiated = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
webVRController.onPadValuesChangedObservable.add(function (stateObject) {
|
|
|
_this._checkTeleportBackwards(stateObject);
|
|
|
_this._checkTeleportWithRay(stateObject, webVRController);
|