|
@@ -1301,7 +1301,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold
|
|
|
* @hidden
|
|
|
* Defines the actions happening during the active mesh stage.
|
|
|
*/
|
|
|
- public _activeMeshStage = Stage.Create<ActiveMeshStageAction>();
|
|
|
+ public _preActiveMeshStage = Stage.Create<PreActiveMeshStageAction>();
|
|
|
/**
|
|
|
* @hidden
|
|
|
* Defines the actions happening during the per camera render target step.
|
|
@@ -3572,6 +3572,10 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold
|
|
|
meshToRender._activate(this._renderId, false);
|
|
|
}
|
|
|
|
|
|
+ for (let step of this._preActiveMeshStage) {
|
|
|
+ step.action(mesh);
|
|
|
+ }
|
|
|
+
|
|
|
if (mesh._activate(this._renderId, false)) {
|
|
|
if (!mesh.isAnInstance) {
|
|
|
meshToRender._internalAbstractMeshDataInfo._onlyForInstances = false;
|
|
@@ -3622,10 +3626,6 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- for (let step of this._activeMeshStage) {
|
|
|
- step.action(sourceMesh, mesh);
|
|
|
- }
|
|
|
-
|
|
|
if (
|
|
|
mesh !== undefined && mesh !== null
|
|
|
&& mesh.subMeshes !== undefined && mesh.subMeshes !== null && mesh.subMeshes.length > 0
|
|
@@ -4154,7 +4154,7 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold
|
|
|
this._isReadyForMeshStage.clear();
|
|
|
this._beforeEvaluateActiveMeshStage.clear();
|
|
|
this._evaluateSubMeshStage.clear();
|
|
|
- this._activeMeshStage.clear();
|
|
|
+ this._preActiveMeshStage.clear();
|
|
|
this._cameraDrawRenderTargetStage.clear();
|
|
|
this._beforeCameraDrawStage.clear();
|
|
|
this._beforeRenderTargetDrawStage.clear();
|