|
@@ -53476,6 +53476,10 @@ var EffectLayer = /** @class */ (function () {
|
|
*/
|
|
*/
|
|
this.isEnabled = true;
|
|
this.isEnabled = true;
|
|
/**
|
|
/**
|
|
|
|
+ * Specifies if the bounding boxes should be rendered normally or if they should undergo the effect of the layer
|
|
|
|
+ */
|
|
|
|
+ this.disableBoundingBoxesFromEffectLayer = false;
|
|
|
|
+ /**
|
|
* An event triggered when the effect layer has been disposed.
|
|
* An event triggered when the effect layer has been disposed.
|
|
*/
|
|
*/
|
|
this.onDisposeObservable = new _Misc_observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]();
|
|
this.onDisposeObservable = new _Misc_observable__WEBPACK_IMPORTED_MODULE_3__["Observable"]();
|
|
@@ -53637,6 +53641,13 @@ var EffectLayer = /** @class */ (function () {
|
|
this._mainTexture.onClearObservable.add(function (engine) {
|
|
this._mainTexture.onClearObservable.add(function (engine) {
|
|
engine.clear(_this.neutralColor, true, true, true);
|
|
engine.clear(_this.neutralColor, true, true, true);
|
|
});
|
|
});
|
|
|
|
+ var boundingBoxRendererEnabled = this._scene.getBoundingBoxRenderer().enabled;
|
|
|
|
+ this._mainTexture.onBeforeBindObservable.add(function () {
|
|
|
|
+ _this._scene.getBoundingBoxRenderer().enabled = !_this.disableBoundingBoxesFromEffectLayer && boundingBoxRendererEnabled;
|
|
|
|
+ });
|
|
|
|
+ this._mainTexture.onAfterUnbindObservable.add(function () {
|
|
|
|
+ _this._scene.getBoundingBoxRenderer().enabled = boundingBoxRendererEnabled;
|
|
|
|
+ });
|
|
};
|
|
};
|
|
/**
|
|
/**
|
|
* Adds specific effects defines.
|
|
* Adds specific effects defines.
|
|
@@ -54077,6 +54088,9 @@ var EffectLayer = /** @class */ (function () {
|
|
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
|
|
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
|
|
Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
|
|
Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
|
|
], EffectLayer.prototype, "renderingGroupId", null);
|
|
], EffectLayer.prototype, "renderingGroupId", null);
|
|
|
|
+ Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
|
|
|
|
+ Object(_Misc_decorators__WEBPACK_IMPORTED_MODULE_1__["serialize"])()
|
|
|
|
+ ], EffectLayer.prototype, "disableBoundingBoxesFromEffectLayer", void 0);
|
|
return EffectLayer;
|
|
return EffectLayer;
|
|
}());
|
|
}());
|
|
|
|
|
|
@@ -178157,6 +178171,10 @@ var BoundingBoxRenderer = /** @class */ (function () {
|
|
*/
|
|
*/
|
|
this.onAfterBoxRenderingObservable = new _Misc_observable__WEBPACK_IMPORTED_MODULE_13__["Observable"]();
|
|
this.onAfterBoxRenderingObservable = new _Misc_observable__WEBPACK_IMPORTED_MODULE_13__["Observable"]();
|
|
/**
|
|
/**
|
|
|
|
+ * When false, no bounding boxes will be rendered
|
|
|
|
+ */
|
|
|
|
+ this.enabled = true;
|
|
|
|
+ /**
|
|
* @hidden
|
|
* @hidden
|
|
*/
|
|
*/
|
|
this.renderList = new _Misc_smartArray__WEBPACK_IMPORTED_MODULE_5__["SmartArray"](32);
|
|
this.renderList = new _Misc_smartArray__WEBPACK_IMPORTED_MODULE_5__["SmartArray"](32);
|
|
@@ -178171,7 +178189,7 @@ var BoundingBoxRenderer = /** @class */ (function () {
|
|
*/
|
|
*/
|
|
BoundingBoxRenderer.prototype.register = function () {
|
|
BoundingBoxRenderer.prototype.register = function () {
|
|
this.scene._beforeEvaluateActiveMeshStage.registerStep(_sceneComponent__WEBPACK_IMPORTED_MODULE_6__["SceneComponentConstants"].STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER, this, this.reset);
|
|
this.scene._beforeEvaluateActiveMeshStage.registerStep(_sceneComponent__WEBPACK_IMPORTED_MODULE_6__["SceneComponentConstants"].STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER, this, this.reset);
|
|
- this.scene._activeMeshStage.registerStep(_sceneComponent__WEBPACK_IMPORTED_MODULE_6__["SceneComponentConstants"].STEP_ACTIVEMESH_BOUNDINGBOXRENDERER, this, this._activeMesh);
|
|
|
|
|
|
+ this.scene._preActiveMeshStage.registerStep(_sceneComponent__WEBPACK_IMPORTED_MODULE_6__["SceneComponentConstants"].STEP_PREACTIVEMESH_BOUNDINGBOXRENDERER, this, this._preActiveMesh);
|
|
this.scene._evaluateSubMeshStage.registerStep(_sceneComponent__WEBPACK_IMPORTED_MODULE_6__["SceneComponentConstants"].STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER, this, this._evaluateSubMesh);
|
|
this.scene._evaluateSubMeshStage.registerStep(_sceneComponent__WEBPACK_IMPORTED_MODULE_6__["SceneComponentConstants"].STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER, this, this._evaluateSubMesh);
|
|
this.scene._afterRenderingGroupDrawStage.registerStep(_sceneComponent__WEBPACK_IMPORTED_MODULE_6__["SceneComponentConstants"].STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER, this, this.render);
|
|
this.scene._afterRenderingGroupDrawStage.registerStep(_sceneComponent__WEBPACK_IMPORTED_MODULE_6__["SceneComponentConstants"].STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER, this, this.render);
|
|
};
|
|
};
|
|
@@ -178184,9 +178202,9 @@ var BoundingBoxRenderer = /** @class */ (function () {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
- BoundingBoxRenderer.prototype._activeMesh = function (sourceMesh, mesh) {
|
|
|
|
- if (sourceMesh.showBoundingBox || this.scene.forceShowBoundingBoxes) {
|
|
|
|
- var boundingInfo = sourceMesh.getBoundingInfo();
|
|
|
|
|
|
+ BoundingBoxRenderer.prototype._preActiveMesh = function (mesh) {
|
|
|
|
+ if (mesh.showBoundingBox || this.scene.forceShowBoundingBoxes) {
|
|
|
|
+ var boundingInfo = mesh.getBoundingInfo();
|
|
boundingInfo.boundingBox._tag = mesh.renderingGroupId;
|
|
boundingInfo.boundingBox._tag = mesh.renderingGroupId;
|
|
this.renderList.push(boundingInfo.boundingBox);
|
|
this.renderList.push(boundingInfo.boundingBox);
|
|
}
|
|
}
|
|
@@ -178234,7 +178252,7 @@ var BoundingBoxRenderer = /** @class */ (function () {
|
|
* @param renderingGroupId defines the rendering group to render
|
|
* @param renderingGroupId defines the rendering group to render
|
|
*/
|
|
*/
|
|
BoundingBoxRenderer.prototype.render = function (renderingGroupId) {
|
|
BoundingBoxRenderer.prototype.render = function (renderingGroupId) {
|
|
- if (this.renderList.length === 0) {
|
|
|
|
|
|
+ if (this.renderList.length === 0 || !this.enabled) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this._prepareRessources();
|
|
this._prepareRessources();
|
|
@@ -197368,6 +197386,9 @@ var AssetContainer = /** @class */ (function (_super) {
|
|
this.lights.forEach(function (o) {
|
|
this.lights.forEach(function (o) {
|
|
_this.scene.addLight(o);
|
|
_this.scene.addLight(o);
|
|
});
|
|
});
|
|
|
|
+ this.geometries.forEach(function (o) {
|
|
|
|
+ _this.scene.addGeometry(o);
|
|
|
|
+ });
|
|
this.meshes.forEach(function (o) {
|
|
this.meshes.forEach(function (o) {
|
|
_this.scene.addMesh(o);
|
|
_this.scene.addMesh(o);
|
|
});
|
|
});
|
|
@@ -197424,6 +197445,9 @@ var AssetContainer = /** @class */ (function (_super) {
|
|
this.lights.forEach(function (o) {
|
|
this.lights.forEach(function (o) {
|
|
_this.scene.removeLight(o);
|
|
_this.scene.removeLight(o);
|
|
});
|
|
});
|
|
|
|
+ this.geometries.forEach(function (o) {
|
|
|
|
+ _this.scene.removeGeometry(o);
|
|
|
|
+ });
|
|
this.meshes.forEach(function (o) {
|
|
this.meshes.forEach(function (o) {
|
|
_this.scene.removeMesh(o);
|
|
_this.scene.removeMesh(o);
|
|
});
|
|
});
|
|
@@ -200564,7 +200588,7 @@ var Scene = /** @class */ (function (_super) {
|
|
* @hidden
|
|
* @hidden
|
|
* Defines the actions happening during the active mesh stage.
|
|
* Defines the actions happening during the active mesh stage.
|
|
*/
|
|
*/
|
|
- _this._activeMeshStage = _sceneComponent__WEBPACK_IMPORTED_MODULE_19__["Stage"].Create();
|
|
|
|
|
|
+ _this._preActiveMeshStage = _sceneComponent__WEBPACK_IMPORTED_MODULE_19__["Stage"].Create();
|
|
/**
|
|
/**
|
|
* @hidden
|
|
* @hidden
|
|
* Defines the actions happening during the per camera render target step.
|
|
* Defines the actions happening during the per camera render target step.
|
|
@@ -203091,6 +203115,10 @@ var Scene = /** @class */ (function (_super) {
|
|
if (meshToRender !== mesh) {
|
|
if (meshToRender !== mesh) {
|
|
meshToRender._activate(this._renderId, false);
|
|
meshToRender._activate(this._renderId, false);
|
|
}
|
|
}
|
|
|
|
+ for (var _b = 0, _c = this._preActiveMeshStage; _b < _c.length; _b++) {
|
|
|
|
+ var step = _c[_b];
|
|
|
|
+ step.action(mesh);
|
|
|
|
+ }
|
|
if (mesh._activate(this._renderId, false)) {
|
|
if (mesh._activate(this._renderId, false)) {
|
|
if (!mesh.isAnInstance) {
|
|
if (!mesh.isAnInstance) {
|
|
meshToRender._internalAbstractMeshDataInfo._onlyForInstances = false;
|
|
meshToRender._internalAbstractMeshDataInfo._onlyForInstances = false;
|
|
@@ -203134,10 +203162,6 @@ var Scene = /** @class */ (function (_super) {
|
|
this._softwareSkinnedMeshes.pushNoDuplicate(mesh);
|
|
this._softwareSkinnedMeshes.pushNoDuplicate(mesh);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- for (var _i = 0, _a = this._activeMeshStage; _i < _a.length; _i++) {
|
|
|
|
- var step = _a[_i];
|
|
|
|
- step.action(sourceMesh, mesh);
|
|
|
|
- }
|
|
|
|
if (mesh !== undefined && mesh !== null
|
|
if (mesh !== undefined && mesh !== null
|
|
&& mesh.subMeshes !== undefined && mesh.subMeshes !== null && mesh.subMeshes.length > 0) {
|
|
&& mesh.subMeshes !== undefined && mesh.subMeshes !== null && mesh.subMeshes.length > 0) {
|
|
var subMeshes = this.getActiveSubMeshCandidates(mesh);
|
|
var subMeshes = this.getActiveSubMeshCandidates(mesh);
|
|
@@ -203577,7 +203601,7 @@ var Scene = /** @class */ (function (_super) {
|
|
this._isReadyForMeshStage.clear();
|
|
this._isReadyForMeshStage.clear();
|
|
this._beforeEvaluateActiveMeshStage.clear();
|
|
this._beforeEvaluateActiveMeshStage.clear();
|
|
this._evaluateSubMeshStage.clear();
|
|
this._evaluateSubMeshStage.clear();
|
|
- this._activeMeshStage.clear();
|
|
|
|
|
|
+ this._preActiveMeshStage.clear();
|
|
this._cameraDrawRenderTargetStage.clear();
|
|
this._cameraDrawRenderTargetStage.clear();
|
|
this._beforeCameraDrawStage.clear();
|
|
this._beforeCameraDrawStage.clear();
|
|
this._beforeRenderTargetDrawStage.clear();
|
|
this._beforeRenderTargetDrawStage.clear();
|
|
@@ -204221,7 +204245,7 @@ var SceneComponentConstants = /** @class */ (function () {
|
|
SceneComponentConstants.STEP_ISREADYFORMESH_EFFECTLAYER = 0;
|
|
SceneComponentConstants.STEP_ISREADYFORMESH_EFFECTLAYER = 0;
|
|
SceneComponentConstants.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER = 0;
|
|
SceneComponentConstants.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER = 0;
|
|
SceneComponentConstants.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER = 0;
|
|
SceneComponentConstants.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER = 0;
|
|
- SceneComponentConstants.STEP_ACTIVEMESH_BOUNDINGBOXRENDERER = 0;
|
|
|
|
|
|
+ SceneComponentConstants.STEP_PREACTIVEMESH_BOUNDINGBOXRENDERER = 0;
|
|
SceneComponentConstants.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER = 1;
|
|
SceneComponentConstants.STEP_CAMERADRAWRENDERTARGET_EFFECTLAYER = 1;
|
|
SceneComponentConstants.STEP_BEFORECAMERADRAW_EFFECTLAYER = 0;
|
|
SceneComponentConstants.STEP_BEFORECAMERADRAW_EFFECTLAYER = 0;
|
|
SceneComponentConstants.STEP_BEFORECAMERADRAW_LAYER = 1;
|
|
SceneComponentConstants.STEP_BEFORECAMERADRAW_LAYER = 1;
|