|
@@ -898,11 +898,6 @@
|
|
* Gets or sets a boolean indicating if procedural textures are enabled on this scene
|
|
* Gets or sets a boolean indicating if procedural textures are enabled on this scene
|
|
*/
|
|
*/
|
|
public proceduralTexturesEnabled = true;
|
|
public proceduralTexturesEnabled = true;
|
|
- /**
|
|
|
|
- * The list of procedural textures added to the scene
|
|
|
|
- * @see http://doc.babylonjs.com/how_to/how_to_use_procedural_textures
|
|
|
|
- */
|
|
|
|
- public proceduralTextures = new Array<ProceduralTexture>();
|
|
|
|
|
|
|
|
// Sound Tracks
|
|
// Sound Tracks
|
|
private _mainSoundTrack: SoundTrack;
|
|
private _mainSoundTrack: SoundTrack;
|
|
@@ -1103,7 +1098,6 @@
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* @hidden
|
|
* @hidden
|
|
* Defines the actions happening before camera updates.
|
|
* Defines the actions happening before camera updates.
|
|
@@ -1111,6 +1105,11 @@
|
|
public _beforeCameraUpdateStage = Stage.Create<SimpleStageAction>();
|
|
public _beforeCameraUpdateStage = Stage.Create<SimpleStageAction>();
|
|
/**
|
|
/**
|
|
* @hidden
|
|
* @hidden
|
|
|
|
+ * Defines the actions happening before clear the canvas.
|
|
|
|
+ */
|
|
|
|
+ public _beforeClearStage = Stage.Create<SimpleStageAction>();
|
|
|
|
+ /**
|
|
|
|
+ * @hidden
|
|
* Defines the actions happening before camera updates.
|
|
* Defines the actions happening before camera updates.
|
|
*/
|
|
*/
|
|
public _gatherRenderTargetsStage = Stage.Create<RenderTargetsStageAction>();
|
|
public _gatherRenderTargetsStage = Stage.Create<RenderTargetsStageAction>();
|
|
@@ -4548,16 +4547,8 @@
|
|
this.onAfterRenderTargetsRenderObservable.notifyObservers(this);
|
|
this.onAfterRenderTargetsRenderObservable.notifyObservers(this);
|
|
this.activeCamera = currentActiveCamera;
|
|
this.activeCamera = currentActiveCamera;
|
|
|
|
|
|
- // Procedural textures
|
|
|
|
- if (this.proceduralTexturesEnabled) {
|
|
|
|
- Tools.StartPerformanceCounter("Procedural textures", this.proceduralTextures.length > 0);
|
|
|
|
- for (var proceduralIndex = 0; proceduralIndex < this.proceduralTextures.length; proceduralIndex++) {
|
|
|
|
- var proceduralTexture = this.proceduralTextures[proceduralIndex];
|
|
|
|
- if (proceduralTexture._shouldRender()) {
|
|
|
|
- proceduralTexture.render();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- Tools.EndPerformanceCounter("Procedural textures", this.proceduralTextures.length > 0);
|
|
|
|
|
|
+ for (let step of this._beforeClearStage) {
|
|
|
|
+ step.action();
|
|
}
|
|
}
|
|
|
|
|
|
// Clear
|
|
// Clear
|
|
@@ -4809,6 +4800,7 @@
|
|
this._afterRenderingGroupDrawStage.clear();
|
|
this._afterRenderingGroupDrawStage.clear();
|
|
this._afterCameraDrawStage.clear();
|
|
this._afterCameraDrawStage.clear();
|
|
this._beforeCameraUpdateStage.clear();
|
|
this._beforeCameraUpdateStage.clear();
|
|
|
|
+ this._beforeClearStage.clear();
|
|
this._gatherRenderTargetsStage.clear();
|
|
this._gatherRenderTargetsStage.clear();
|
|
this._rebuildGeometryStage.clear();
|
|
this._rebuildGeometryStage.clear();
|
|
this._pointerMoveStage.clear();
|
|
this._pointerMoveStage.clear();
|