|
@@ -55315,8 +55315,10 @@ var BABYLON;
|
|
|
* automatic start to happen and let you decide when to start emitting particles.
|
|
|
*/
|
|
|
this.preventAutoStart = false;
|
|
|
+ /** Gets or sets the estimated area used by the system. It will be used to normalize the projection onto the noise texture (default is (1, 1)) */
|
|
|
this.noiseGridSize = new BABYLON.Vector2(1, 1);
|
|
|
- this.noiseStrength = 50;
|
|
|
+ /** Gets or sets the strength to apply to the noise value (default is (10, 10, 10)) */
|
|
|
+ this.noiseStrength = new BABYLON.Vector3(10, 10, 10);
|
|
|
/**
|
|
|
* Callback triggered when the particle animation is ending.
|
|
|
*/
|
|
@@ -55518,8 +55520,8 @@ var BABYLON;
|
|
|
var fetchedColorB = BABYLON.Tools.FetchR(particle.position.x / _this.noiseGridSize.x + 0.66, particle.position.y / _this.noiseGridSize.y + 0.33, noiseTextureSize.width, noiseTextureSize.height, noiseTextureData);
|
|
|
var force = BABYLON.Tmp.Vector3[0];
|
|
|
var scaledForce = BABYLON.Tmp.Vector3[1];
|
|
|
- force.copyFromFloats(2 * fetchedColorR - 1, 2 * fetchedColorG - 1, 2 * fetchedColorB - 1);
|
|
|
- force.scaleToRef(_this._scaledUpdateSpeed * _this.noiseStrength, scaledForce);
|
|
|
+ force.copyFromFloats((2 * fetchedColorR - 1) * _this.noiseStrength.x, (2 * fetchedColorG - 1) * _this.noiseStrength.x, (2 * fetchedColorB - 1) * _this.noiseStrength.x);
|
|
|
+ force.scaleToRef(_this._scaledUpdateSpeed, scaledForce);
|
|
|
particle.direction.addInPlace(scaledForce);
|
|
|
}
|
|
|
_this.gravity.scaleToRef(_this._scaledUpdateSpeed, _this._scaledGravity);
|