|
@@ -104448,11 +104448,15 @@ var BABYLON;
|
|
|
else {
|
|
|
_this._useDirectMapping = options.useDirectMapping;
|
|
|
}
|
|
|
+ _this._setReady(false);
|
|
|
// create
|
|
|
var tempOptions = { loop: options.loop, autoPlay: options.autoPlay, autoUpdateTexture: true, poster: options.poster };
|
|
|
var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
|
|
|
var texture = _this._videoTexture = new BABYLON.VideoTexture(name + "_texture", urlsOrVideo, scene, false, _this._useDirectMapping, BABYLON.Texture.TRILINEAR_SAMPLINGMODE, tempOptions);
|
|
|
_this._mesh = BABYLON.Mesh.CreateSphere(name + "_mesh", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
|
|
|
+ texture.onLoadObservable.addOnce(function () {
|
|
|
+ _this._setReady(true);
|
|
|
+ });
|
|
|
// configure material
|
|
|
material.useEquirectangularFOV = true;
|
|
|
material.fovMultiplier = 1.0;
|
|
@@ -104551,6 +104555,7 @@ var BABYLON;
|
|
|
else {
|
|
|
_this._useDirectMapping = options.useDirectMapping;
|
|
|
}
|
|
|
+ _this._setReady(false);
|
|
|
// create
|
|
|
var material = _this._material = new BABYLON.BackgroundMaterial(name + "_material", scene);
|
|
|
_this._mesh = BABYLON.Mesh.CreateSphere(name + "_mesh", options.resolution, options.size, scene, false, BABYLON.Mesh.BACKSIDE);
|
|
@@ -104559,6 +104564,9 @@ var BABYLON;
|
|
|
material.useEquirectangularFOV = true;
|
|
|
material.fovMultiplier = 1.0;
|
|
|
_this.photoTexture = new BABYLON.Texture(urlOfPhoto, scene, true, !_this._useDirectMapping);
|
|
|
+ _this.photoTexture.onLoadObservable.addOnce(function () {
|
|
|
+ _this._setReady(true);
|
|
|
+ });
|
|
|
// configure mesh
|
|
|
_this._mesh.material = material;
|
|
|
_this._mesh.parent = _this;
|