|
@@ -72087,7 +72087,12 @@ var BABYLON;
|
|
|
}
|
|
|
if (this._btnVR) {
|
|
|
this._btnVR.addEventListener("click", function () {
|
|
|
- _this.enterVR();
|
|
|
+ if (!_this.isInVRMode) {
|
|
|
+ _this.enterVR();
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ _this.exitVR();
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
window.addEventListener("resize", function () {
|
|
@@ -72302,7 +72307,7 @@ var BABYLON;
|
|
|
this.updateButtonVisibility();
|
|
|
};
|
|
|
VRExperienceHelper.prototype.updateButtonVisibility = function () {
|
|
|
- if (!this._btnVR) {
|
|
|
+ if (!this._btnVR || this._useCustomVRButton) {
|
|
|
return;
|
|
|
}
|
|
|
this._btnVR.className = "babylonVRicon";
|
|
@@ -83716,7 +83721,7 @@ var BABYLON;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- else {
|
|
|
+ else if (mesh.material) {
|
|
|
remaining++;
|
|
|
}
|
|
|
}
|
|
@@ -83738,7 +83743,7 @@ var BABYLON;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- else if (mesh.material !== null) {
|
|
|
+ else if (mesh.material) {
|
|
|
this._compileMaterialAsync(mesh.material, mesh, function () {
|
|
|
if (--remaining === 0) {
|
|
|
onSuccess();
|