|
@@ -15789,6 +15789,7 @@ var BABYLON;
|
|
|
excludeLoaders.push(loader);
|
|
|
BABYLON.Tools.Warn(loader.constructor.name + " failed when trying to load " + texture.url + ", falling back to the next supported loader");
|
|
|
_this.createTexture(urlArg, noMipmap, invertY, scene, samplingMode, null, onError, buffer, texture, undefined, undefined, excludeLoaders);
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
if (!customFallback) {
|
|
@@ -15797,6 +15798,7 @@ var BABYLON;
|
|
|
}
|
|
|
if (BABYLON.Tools.UseFallbackTexture) {
|
|
|
_this.createTexture(BABYLON.Tools.fallbackTexture, noMipmap, invertY, scene, samplingMode, null, onError, buffer, texture);
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
if (onError) {
|
|
@@ -16953,6 +16955,7 @@ var BABYLON;
|
|
|
if (fallbackUrl) {
|
|
|
excludeLoaders.push(loader);
|
|
|
_this.createCubeTexture(fallbackUrl, scene, files, noMipmap, onLoad, onError, format, extension, createPolynomials, lodScale, lodOffset, texture, excludeLoaders);
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
if (onError && request) {
|
|
@@ -60818,6 +60821,23 @@ var BABYLON;
|
|
|
this.id = name;
|
|
|
this.name = name;
|
|
|
}
|
|
|
+ Object.defineProperty(BaseParticleSystem.prototype, "noiseTexture", {
|
|
|
+ /**
|
|
|
+ * Gets or sets a texture used to add random noise to particle positions
|
|
|
+ */
|
|
|
+ get: function () {
|
|
|
+ return this._noiseTexture;
|
|
|
+ },
|
|
|
+ set: function (value) {
|
|
|
+ if (this._noiseTexture === value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this._noiseTexture = value;
|
|
|
+ this._reset();
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
Object.defineProperty(BaseParticleSystem.prototype, "isAnimationSheetEnabled", {
|
|
|
/**
|
|
|
* Gets or sets whether an animation sprite sheet is enabled or not on the particle system
|
|
@@ -61451,7 +61471,7 @@ var BABYLON;
|
|
|
}
|
|
|
particle.position.addInPlace(_this._scaledDirection);
|
|
|
// Noise
|
|
|
- if (noiseTextureData && noiseTextureSize) {
|
|
|
+ if (noiseTextureData && noiseTextureSize && particle._randomNoiseCoordinates1) {
|
|
|
var fetchedColorR = _this._fetchR(particle._randomNoiseCoordinates1.x, particle._randomNoiseCoordinates1.y, noiseTextureSize.width, noiseTextureSize.height, noiseTextureData);
|
|
|
var fetchedColorG = _this._fetchR(particle._randomNoiseCoordinates1.z, particle._randomNoiseCoordinates2.x, noiseTextureSize.width, noiseTextureSize.height, noiseTextureData);
|
|
|
var fetchedColorB = _this._fetchR(particle._randomNoiseCoordinates2.y, particle._randomNoiseCoordinates2.z, noiseTextureSize.width, noiseTextureSize.height, noiseTextureData);
|
|
@@ -70566,12 +70586,10 @@ var BABYLON;
|
|
|
var vertexData = BABYLON.VertexData.CreatePlane(options);
|
|
|
vertexData.applyToMesh(plane, options.updatable);
|
|
|
if (options.sourcePlane) {
|
|
|
- plane.translate(options.sourcePlane.normal, options.sourcePlane.d);
|
|
|
- var product = Math.acos(BABYLON.Vector3.Dot(options.sourcePlane.normal, BABYLON.Axis.Z));
|
|
|
- var vectorProduct = BABYLON.Vector3.Cross(BABYLON.Axis.Z, options.sourcePlane.normal);
|
|
|
- if (vectorProduct.lengthSquared() > BABYLON.Epsilon) {
|
|
|
- plane.rotate(vectorProduct, product);
|
|
|
- }
|
|
|
+ plane.translate(options.sourcePlane.normal, -options.sourcePlane.d);
|
|
|
+ var dot = BABYLON.Vector3.Dot(plane.position, options.sourcePlane.normal);
|
|
|
+ var flip = dot >= 0;
|
|
|
+ plane.lookAt(BABYLON.Vector3.Zero(), 0, flip ? Math.PI : 0, 0);
|
|
|
}
|
|
|
return plane;
|
|
|
};
|