|
@@ -57407,8 +57407,21 @@ var BABYLON;
|
|
|
this.activeSubSystems = new Array();
|
|
|
}
|
|
|
if (this.preWarmCycles) {
|
|
|
- for (var index = 0; index < this.preWarmCycles; index++) {
|
|
|
- this.animate(true);
|
|
|
+ var noiseTextureAsProcedural_1 = this.noiseTexture;
|
|
|
+ if (noiseTextureAsProcedural_1 && noiseTextureAsProcedural_1.onGeneratedObservable) {
|
|
|
+ noiseTextureAsProcedural_1.onGeneratedObservable.addOnce(function () {
|
|
|
+ setTimeout(function () {
|
|
|
+ for (var index = 0; index < _this.preWarmCycles; index++) {
|
|
|
+ _this.animate(true);
|
|
|
+ noiseTextureAsProcedural_1.render();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ for (var index = 0; index < this.preWarmCycles; index++) {
|
|
|
+ this.animate(true);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -74640,6 +74653,10 @@ var BABYLON;
|
|
|
_this.isEnabled = true;
|
|
|
_this._currentRefreshId = -1;
|
|
|
_this._refreshRate = 1;
|
|
|
+ /**
|
|
|
+ * Event raised when the texture is generated
|
|
|
+ */
|
|
|
+ _this.onGeneratedObservable = new BABYLON.Observable();
|
|
|
_this._vertexBuffers = {};
|
|
|
_this._uniforms = new Array();
|
|
|
_this._samplers = new Array();
|
|
@@ -74942,6 +74959,7 @@ var BABYLON;
|
|
|
if (this.onGenerated) {
|
|
|
this.onGenerated();
|
|
|
}
|
|
|
+ this.onGeneratedObservable.notifyObservers(this);
|
|
|
};
|
|
|
ProceduralTexture.prototype.clone = function () {
|
|
|
var textureSize = this.getSize();
|