|
@@ -71678,8 +71678,8 @@ var BABYLON;
|
|
else if (vrGamepad.id.toLowerCase().indexOf('openvr') !== -1) {
|
|
else if (vrGamepad.id.toLowerCase().indexOf('openvr') !== -1) {
|
|
return new BABYLON.ViveController(vrGamepad);
|
|
return new BABYLON.ViveController(vrGamepad);
|
|
}
|
|
}
|
|
- // Samsung/Oculus Gear VR
|
|
|
|
- else if (vrGamepad.id.indexOf(BABYLON.GearVRController.GAMEPAD_ID_PREFIX) === 0) {
|
|
|
|
|
|
+ // Samsung/Oculus Gear VR or Oculus Go
|
|
|
|
+ else if (vrGamepad.id.indexOf(BABYLON.GearVRController.GAMEPAD_ID_PREFIX) === 0 || vrGamepad.id.indexOf('Oculus Go') !== -1) {
|
|
return new BABYLON.GearVRController(vrGamepad);
|
|
return new BABYLON.GearVRController(vrGamepad);
|
|
}
|
|
}
|
|
// Google Daydream
|
|
// Google Daydream
|
|
@@ -72832,6 +72832,8 @@ var BABYLON;
|
|
'onTriggerStateChangedObservable' // Trigger
|
|
'onTriggerStateChangedObservable' // Trigger
|
|
];
|
|
];
|
|
_this.controllerType = BABYLON.PoseEnabledControllerType.GEAR_VR;
|
|
_this.controllerType = BABYLON.PoseEnabledControllerType.GEAR_VR;
|
|
|
|
+ // Initial starting position defaults to where hand would be (incase of only 3dof controller)
|
|
|
|
+ _this._calculatedPosition = new BABYLON.Vector3(_this.hand == "left" ? -0.15 : 0.15, -0.5, 0.4);
|
|
return _this;
|
|
return _this;
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -106682,8 +106684,9 @@ var BABYLON;
|
|
babylonTexture.wrapV = samplerData.wrapV;
|
|
babylonTexture.wrapV = samplerData.wrapV;
|
|
babylonTexture.coordinatesIndex = textureInfo.texCoord || 0;
|
|
babylonTexture.coordinatesIndex = textureInfo.texCoord || 0;
|
|
var image = GLTFLoader._GetProperty(context + "/source", this._gltf.images, texture.source);
|
|
var image = GLTFLoader._GetProperty(context + "/source", this._gltf.images, texture.source);
|
|
- promises.push(this._loadImageAsync("#/images/" + image._index, image).then(function (objectURL) {
|
|
|
|
- babylonTexture.updateURL(objectURL);
|
|
|
|
|
|
+ promises.push(this._loadImageAsync("#/images/" + image._index, image).then(function (blob) {
|
|
|
|
+ var dataUrl = "data:" + _this._rootUrl + (image.uri || "image" + image._index);
|
|
|
|
+ babylonTexture.updateURL(dataUrl, blob);
|
|
}));
|
|
}));
|
|
assign(babylonTexture);
|
|
assign(babylonTexture);
|
|
this.onTextureLoadedObservable.notifyObservers(babylonTexture);
|
|
this.onTextureLoadedObservable.notifyObservers(babylonTexture);
|
|
@@ -106702,8 +106705,8 @@ var BABYLON;
|
|
return sampler._data;
|
|
return sampler._data;
|
|
};
|
|
};
|
|
GLTFLoader.prototype._loadImageAsync = function (context, image) {
|
|
GLTFLoader.prototype._loadImageAsync = function (context, image) {
|
|
- if (image._objectURL) {
|
|
|
|
- return image._objectURL;
|
|
|
|
|
|
+ if (image._blob) {
|
|
|
|
+ return image._blob;
|
|
}
|
|
}
|
|
var promise;
|
|
var promise;
|
|
if (image.uri) {
|
|
if (image.uri) {
|
|
@@ -106713,10 +106716,10 @@ var BABYLON;
|
|
var bufferView = GLTFLoader._GetProperty(context + "/bufferView", this._gltf.bufferViews, image.bufferView);
|
|
var bufferView = GLTFLoader._GetProperty(context + "/bufferView", this._gltf.bufferViews, image.bufferView);
|
|
promise = this._loadBufferViewAsync("#/bufferViews/" + bufferView._index, bufferView);
|
|
promise = this._loadBufferViewAsync("#/bufferViews/" + bufferView._index, bufferView);
|
|
}
|
|
}
|
|
- image._objectURL = promise.then(function (data) {
|
|
|
|
- return URL.createObjectURL(new Blob([data], { type: image.mimeType }));
|
|
|
|
|
|
+ image._blob = promise.then(function (data) {
|
|
|
|
+ return new Blob([data], { type: image.mimeType });
|
|
});
|
|
});
|
|
- return image._objectURL;
|
|
|
|
|
|
+ return image._blob;
|
|
};
|
|
};
|
|
/** @hidden */
|
|
/** @hidden */
|
|
GLTFLoader.prototype._loadUriAsync = function (context, uri) {
|
|
GLTFLoader.prototype._loadUriAsync = function (context, uri) {
|
|
@@ -106923,17 +106926,6 @@ var BABYLON;
|
|
request.abort();
|
|
request.abort();
|
|
}
|
|
}
|
|
this._requests.length = 0;
|
|
this._requests.length = 0;
|
|
- if (this._gltf && this._gltf.images) {
|
|
|
|
- for (var _b = 0, _c = this._gltf.images; _b < _c.length; _b++) {
|
|
|
|
- var image = _c[_b];
|
|
|
|
- if (image._objectURL) {
|
|
|
|
- image._objectURL.then(function (value) {
|
|
|
|
- URL.revokeObjectURL(value);
|
|
|
|
- });
|
|
|
|
- image._objectURL = undefined;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
delete this._gltf;
|
|
delete this._gltf;
|
|
delete this._babylonScene;
|
|
delete this._babylonScene;
|
|
this._completePromises.length = 0;
|
|
this._completePromises.length = 0;
|