{"ast":null,"code":"import { Observable } from \"../Misc/observable.js\";\nimport { RenderingManager } from \"../Rendering/renderingManager.js\";\nimport { _ObserveArray } from \"../Misc/arrayTools.js\";\n/**\n * A class that renders objects to the currently bound render target.\n * This class only renders objects, and is not concerned with the output texture or post-processing.\n */\nexport class ObjectRenderer {\n /**\n * Use this list to define the list of mesh you want to render.\n */\n get renderList() {\n return this._renderList;\n }\n set renderList(value) {\n if (this._renderList === value) {\n return;\n }\n if (this._unObserveRenderList) {\n this._unObserveRenderList();\n this._unObserveRenderList = null;\n }\n if (value) {\n this._unObserveRenderList = _ObserveArray(value, this._renderListHasChanged);\n }\n this._renderList = value;\n }\n /**\n * Gets the render pass ids used by the object renderer.\n */\n get renderPassIds() {\n return this._renderPassIds;\n }\n /**\n * Gets the current value of the refreshId counter\n */\n get currentRefreshId() {\n return this._currentRefreshId;\n }\n /**\n * Sets a specific material to be used to render a mesh/a list of meshes with this object renderer\n * @param mesh mesh or array of meshes\n * @param material material or array of materials to use for this render pass. If undefined is passed, no specific material will be used but the regular material instead (mesh.material). It's possible to provide an array of materials to use a different material for each rendering pass.\n */\n setMaterialForRendering(mesh, material) {\n let meshes;\n if (!Array.isArray(mesh)) {\n meshes = [mesh];\n } else {\n meshes = mesh;\n }\n for (let j = 0; j < meshes.length; ++j) {\n for (let i = 0; i < this.options.numPasses; ++i) {\n meshes[j].setMaterialForRenderPass(this._renderPassIds[i], material !== undefined ? Array.isArray(material) ? material[i] : material : undefined);\n }\n }\n }\n /**\n * Instantiates an object renderer.\n * @param name The friendly name of the object renderer\n * @param scene The scene the renderer belongs to\n * @param options The options used to create the renderer (optional)\n */\n constructor(name, scene, options) {\n this._unObserveRenderList = null;\n this._renderListHasChanged = (_functionName, previousLength) => {\n const newLength = this._renderList ? this._renderList.length : 0;\n if (previousLength === 0 && newLength > 0 || newLength === 0) {\n this._scene.meshes.forEach(mesh => {\n mesh._markSubMeshesAsLightDirty();\n });\n }\n };\n /**\n * Define the list of particle systems to render. If not provided, will render all the particle systems of the scene.\n * Note that the particle systems are rendered only if renderParticles is set to true.\n */\n this.particleSystemList = null;\n /**\n * Use this function to overload the renderList array at rendering time.\n * Return null to render with the current renderList, else return the list of meshes to use for rendering.\n * For 2DArray, layerOrFace is the index of the layer that is going to be rendered, else it is the faceIndex of\n * the cube (if the RTT is a cube, else layerOrFace=0).\n * The renderList passed to the function is the current render list (the one that will be used if the function returns null).\n * The length of this list is passed through renderListLength: don't use renderList.length directly because the array can\n * hold dummy elements!\n */\n this.getCustomRenderList = null;\n /**\n * Define if particles should be rendered.\n */\n this.renderParticles = true;\n /**\n * Define if sprites should be rendered.\n */\n this.renderSprites = false;\n /**\n * Force checking the layerMask property even if a custom list of meshes is provided (ie. if renderList is not undefined)\n */\n this.forceLayerMaskCheck = false;\n /**\n * An event triggered before rendering the objects\n */\n this.onBeforeRenderObservable = new Observable();\n /**\n * An event triggered after rendering the objects\n */\n this.onAfterRenderObservable = new Observable();\n /**\n * An event triggered before the rendering group is processed\n */\n this.onBeforeRenderingManagerRenderObservable = new Observable();\n /**\n * An event triggered after the rendering group is processed\n */\n this.onAfterRenderingManagerRenderObservable = new Observable();\n /**\n * An event triggered when fast path rendering is used\n */\n this.onFastPathRenderObservable = new Observable();\n this._currentRefreshId = -1;\n this._refreshRate = 1;\n this._currentSceneCamera = null;\n this.name = name;\n this._scene = scene;\n this.renderList = [];\n this._renderPassIds = [];\n this.options = {\n numPasses: 1,\n doNotChangeAspectRatio: true,\n ...options\n };\n this._createRenderPassId();\n this.renderPassId = this._renderPassIds[0];\n // Rendering groups\n this._renderingManager = new RenderingManager(scene);\n this._renderingManager._useSceneAutoClearSetup = true;\n }\n _releaseRenderPassId() {\n const engine = this._scene.getEngine();\n for (let i = 0; i < this.options.numPasses; ++i) {\n engine.releaseRenderPassId(this._renderPassIds[i]);\n }\n this._renderPassIds.length = 0;\n }\n _createRenderPassId() {\n this._releaseRenderPassId();\n const engine = this._scene.getEngine();\n for (let i = 0; i < this.options.numPasses; ++i) {\n this._renderPassIds[i] = engine.createRenderPassId(`ObjectRenderer - ${this.name}#${i}`);\n }\n }\n /**\n * Resets the refresh counter of the renderer and start back from scratch.\n * Could be useful to re-render if it is setup to render only once.\n */\n resetRefreshCounter() {\n this._currentRefreshId = -1;\n }\n /**\n * Defines the refresh rate of the rendering or the rendering frequency.\n * Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on...\n */\n get refreshRate() {\n return this._refreshRate;\n }\n set refreshRate(value) {\n this._refreshRate = value;\n this.resetRefreshCounter();\n }\n /**\n * Indicates if the renderer should render the current frame.\n * The output is based on the specified refresh rate.\n * @returns true if the renderer should render the current frame\n */\n shouldRender() {\n if (this._currentRefreshId === -1) {\n // At least render once\n this._currentRefreshId = 1;\n return true;\n }\n if (this.refreshRate === this._currentRefreshId) {\n this._currentRefreshId = 1;\n return true;\n }\n this._currentRefreshId++;\n return false;\n }\n /**\n * This function will check if the renderer is ready to render (textures are loaded, shaders are compiled)\n * @param viewportWidth defines the width of the viewport\n * @param viewportHeight defines the height of the viewport\n * @returns true if all required resources are ready\n */\n isReadyForRendering(viewportWidth, viewportHeight) {\n this.prepareRenderList();\n this.initRender(viewportWidth, viewportHeight);\n const isReady = this._checkReadiness();\n this.finishRender();\n return isReady;\n }\n /**\n * Makes sure the list of meshes is ready to be rendered\n * You should call this function before \"initRender\", but if you know the render list is ok, you may call \"initRender\" directly\n */\n prepareRenderList() {\n const scene = this._scene;\n if (this._waitingRenderList) {\n if (!this.renderListPredicate) {\n this.renderList = [];\n for (let index = 0; index < this._waitingRenderList.length; index++) {\n const id = this._waitingRenderList[index];\n const mesh = scene.getMeshById(id);\n if (mesh) {\n this.renderList.push(mesh);\n }\n }\n }\n this._waitingRenderList = undefined;\n }\n // Is predicate defined?\n if (this.renderListPredicate) {\n if (this.renderList) {\n this.renderList.length = 0; // Clear previous renderList\n } else {\n this.renderList = [];\n }\n const sceneMeshes = this._scene.meshes;\n for (let index = 0; index < sceneMeshes.length; index++) {\n const mesh = sceneMeshes[index];\n if (this.renderListPredicate(mesh)) {\n this.renderList.push(mesh);\n }\n }\n }\n }\n /**\n * This method makes sure everything is setup before \"render\" can be called\n * @param viewportWidth Width of the viewport to render to\n * @param viewportHeight Height of the viewport to render to\n */\n initRender(viewportWidth, viewportHeight) {\n var _this$activeCamera;\n const engine = this._scene.getEngine();\n const camera = (_this$activeCamera = this.activeCamera) !== null && _this$activeCamera !== void 0 ? _this$activeCamera : this._scene.activeCamera;\n this._currentSceneCamera = this._scene.activeCamera;\n if (camera) {\n if (camera !== this._scene.activeCamera) {\n this._scene.setTransformMatrix(camera.getViewMatrix(), camera.getProjectionMatrix(true));\n this._scene.activeCamera = camera;\n }\n engine.setViewport(camera.rigParent ? camera.rigParent.viewport : camera.viewport, viewportWidth, viewportHeight);\n }\n this._defaultRenderListPrepared = false;\n }\n /**\n * This method must be called after the \"render\" call(s), to complete the rendering process.\n */\n finishRender() {\n const scene = this._scene;\n scene.activeCamera = this._currentSceneCamera;\n if (this._currentSceneCamera) {\n if (this.activeCamera && this.activeCamera !== scene.activeCamera) {\n scene.setTransformMatrix(this._currentSceneCamera.getViewMatrix(), this._currentSceneCamera.getProjectionMatrix(true));\n }\n scene.getEngine().setViewport(this._currentSceneCamera.viewport);\n }\n scene.resetCachedMaterial();\n }\n /**\n * Renders all the objects (meshes, particles systems, sprites) to the currently bound render target texture.\n * @param passIndex defines the pass index to use (default: 0)\n * @param skipOnAfterRenderObservable defines a flag to skip raising the onAfterRenderObservable\n */\n render(passIndex = 0, skipOnAfterRenderObservable = false) {\n const scene = this._scene;\n const engine = scene.getEngine();\n const currentRenderPassId = engine.currentRenderPassId;\n engine.currentRenderPassId = this._renderPassIds[passIndex];\n this.onBeforeRenderObservable.notifyObservers(passIndex);\n const fastPath = engine.snapshotRendering && engine.snapshotRenderingMode === 1;\n if (!fastPath) {\n // Get the list of meshes to render\n let currentRenderList = null;\n const defaultRenderList = this.renderList ? this.renderList : scene.getActiveMeshes().data;\n const defaultRenderListLength = this.renderList ? this.renderList.length : scene.getActiveMeshes().length;\n if (this.getCustomRenderList) {\n currentRenderList = this.getCustomRenderList(passIndex, defaultRenderList, defaultRenderListLength);\n }\n if (!currentRenderList) {\n // No custom render list provided, we prepare the rendering for the default list, but check\n // first if we did not already performed the preparation before so as to avoid re-doing it several times\n if (!this._defaultRenderListPrepared) {\n this._prepareRenderingManager(defaultRenderList, defaultRenderListLength, !this.renderList || this.forceLayerMaskCheck);\n this._defaultRenderListPrepared = true;\n }\n currentRenderList = defaultRenderList;\n } else {\n // Prepare the rendering for the custom render list provided\n this._prepareRenderingManager(currentRenderList, currentRenderList.length, this.forceLayerMaskCheck);\n }\n this.onBeforeRenderingManagerRenderObservable.notifyObservers(passIndex);\n this._renderingManager.render(this.customRenderFunction, currentRenderList, this.renderParticles, this.renderSprites);\n this.onAfterRenderingManagerRenderObservable.notifyObservers(passIndex);\n } else {\n this.onFastPathRenderObservable.notifyObservers(passIndex);\n }\n if (!skipOnAfterRenderObservable) {\n this.onAfterRenderObservable.notifyObservers(passIndex);\n }\n engine.currentRenderPassId = currentRenderPassId;\n }\n /** @internal */\n _checkReadiness() {\n const scene = this._scene;\n const engine = scene.getEngine();\n const currentRenderPassId = engine.currentRenderPassId;\n let returnValue = true;\n if (!scene.getViewMatrix()) {\n // We probably didn't execute scene.render() yet, so make sure we have a view/projection matrix setup for the scene\n scene.updateTransformMatrix();\n }\n const numPasses = this.options.numPasses;\n for (let passIndex = 0; passIndex < numPasses && returnValue; passIndex++) {\n let currentRenderList = null;\n const defaultRenderList = this.renderList ? this.renderList : scene.getActiveMeshes().data;\n const defaultRenderListLength = this.renderList ? this.renderList.length : scene.getActiveMeshes().length;\n engine.currentRenderPassId = this._renderPassIds[passIndex];\n this.onBeforeRenderObservable.notifyObservers(passIndex);\n if (this.getCustomRenderList) {\n currentRenderList = this.getCustomRenderList(passIndex, defaultRenderList, defaultRenderListLength);\n }\n if (!currentRenderList) {\n currentRenderList = defaultRenderList;\n }\n if (!this._doNotChangeAspectRatio) {\n scene.updateTransformMatrix(true);\n }\n for (let i = 0; i < currentRenderList.length && returnValue; ++i) {\n const mesh = currentRenderList[i];\n if (!mesh.isEnabled() || mesh.isBlocked || !mesh.isVisible || !mesh.subMeshes) {\n continue;\n }\n if (this.customIsReadyFunction) {\n if (!this.customIsReadyFunction(mesh, this.refreshRate, true)) {\n returnValue = false;\n continue;\n }\n } else if (!mesh.isReady(true)) {\n returnValue = false;\n continue;\n }\n }\n this.onAfterRenderObservable.notifyObservers(passIndex);\n if (numPasses > 1) {\n scene.incrementRenderId();\n scene.resetCachedMaterial();\n }\n }\n const particleSystems = this.particleSystemList || scene.particleSystems;\n for (const particleSystem of particleSystems) {\n if (!particleSystem.isReady()) {\n returnValue = false;\n }\n }\n engine.currentRenderPassId = currentRenderPassId;\n return returnValue;\n }\n _prepareRenderingManager(currentRenderList, currentRenderListLength, checkLayerMask) {\n const scene = this._scene;\n const camera = scene.activeCamera;\n this._renderingManager.reset();\n const sceneRenderId = scene.getRenderId();\n for (let meshIndex = 0; meshIndex < currentRenderListLength; meshIndex++) {\n const mesh = currentRenderList[meshIndex];\n if (mesh && !mesh.isBlocked) {\n if (this.customIsReadyFunction) {\n if (!this.customIsReadyFunction(mesh, this.refreshRate, false)) {\n this.resetRefreshCounter();\n continue;\n }\n } else if (!mesh.isReady(this.refreshRate === 0)) {\n this.resetRefreshCounter();\n continue;\n }\n if (!mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate && camera) {\n mesh._internalAbstractMeshDataInfo._currentLOD = scene.customLODSelector ? scene.customLODSelector(mesh, camera) : mesh.getLOD(camera);\n mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate = true;\n }\n if (!mesh._internalAbstractMeshDataInfo._currentLOD) {\n continue;\n }\n let meshToRender = mesh._internalAbstractMeshDataInfo._currentLOD;\n if (meshToRender !== mesh && meshToRender.billboardMode !== 0) {\n meshToRender.computeWorldMatrix(); // Compute world matrix if LOD is billboard\n }\n meshToRender._preActivateForIntermediateRendering(sceneRenderId);\n let isMasked;\n if (checkLayerMask && camera) {\n isMasked = (mesh.layerMask & camera.layerMask) === 0;\n } else {\n isMasked = false;\n }\n if (mesh.isEnabled() && mesh.isVisible && mesh.subMeshes && !isMasked) {\n if (meshToRender !== mesh) {\n meshToRender._activate(sceneRenderId, true);\n }\n if (mesh._activate(sceneRenderId, true) && mesh.subMeshes.length) {\n if (!mesh.isAnInstance) {\n meshToRender._internalAbstractMeshDataInfo._onlyForInstancesIntermediate = false;\n } else {\n if (mesh._internalAbstractMeshDataInfo._actAsRegularMesh) {\n meshToRender = mesh;\n }\n }\n meshToRender._internalAbstractMeshDataInfo._isActiveIntermediate = true;\n scene._prepareSkeleton(meshToRender);\n for (let subIndex = 0; subIndex < meshToRender.subMeshes.length; subIndex++) {\n const subMesh = meshToRender.subMeshes[subIndex];\n this._renderingManager.dispatch(subMesh, meshToRender);\n }\n }\n mesh._postActivate();\n }\n }\n }\n const particleSystems = this.particleSystemList || scene.particleSystems;\n for (let particleIndex = 0; particleIndex < particleSystems.length; particleIndex++) {\n const particleSystem = particleSystems[particleIndex];\n const emitter = particleSystem.emitter;\n if (!particleSystem.isStarted() || !emitter || emitter.position && !emitter.isEnabled()) {\n continue;\n }\n this._renderingManager.dispatchParticles(particleSystem);\n }\n }\n /**\n * Overrides the default sort function applied in the rendering group to prepare the meshes.\n * This allowed control for front to back rendering or reversely depending of the special needs.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param opaqueSortCompareFn The opaque queue comparison function use to sort.\n * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.\n * @param transparentSortCompareFn The transparent queue comparison function use to sort.\n */\n setRenderingOrder(renderingGroupId, opaqueSortCompareFn = null, alphaTestSortCompareFn = null, transparentSortCompareFn = null) {\n this._renderingManager.setRenderingOrder(renderingGroupId, opaqueSortCompareFn, alphaTestSortCompareFn, transparentSortCompareFn);\n }\n /**\n * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.\n */\n setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil) {\n this._renderingManager.setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil);\n this._renderingManager._useSceneAutoClearSetup = false;\n }\n /**\n * Clones the renderer.\n * @returns the cloned renderer\n */\n clone() {\n const newRenderer = new ObjectRenderer(this.name, this._scene, this.options);\n if (this.renderList) {\n newRenderer.renderList = this.renderList.slice(0);\n }\n return newRenderer;\n }\n /**\n * Dispose the renderer and release its associated resources.\n */\n dispose() {\n this.onBeforeRenderObservable.clear();\n this.onAfterRenderObservable.clear();\n this.onBeforeRenderingManagerRenderObservable.clear();\n this.onAfterRenderingManagerRenderObservable.clear();\n this.onFastPathRenderObservable.clear();\n this._releaseRenderPassId();\n this.renderList = null;\n }\n /** @internal */\n _rebuild() {\n if (this.refreshRate === ObjectRenderer.REFRESHRATE_RENDER_ONCE) {\n this.refreshRate = ObjectRenderer.REFRESHRATE_RENDER_ONCE;\n }\n }\n /**\n * Clear the info related to rendering groups preventing retention point in material dispose.\n */\n freeRenderingGroups() {\n if (this._renderingManager) {\n this._renderingManager.freeRenderingGroups();\n }\n }\n}\n/**\n * Objects will only be rendered once which can be useful to improve performance if everything in your render is static for instance.\n */\nObjectRenderer.REFRESHRATE_RENDER_ONCE = 0;\n/**\n * Objects will be rendered every frame and is recommended for dynamic contents.\n */\nObjectRenderer.REFRESHRATE_RENDER_ONEVERYFRAME = 1;\n/**\n * Objects will be rendered every 2 frames which could be enough if your dynamic objects are not\n * the central point of your effect and can save a lot of performances.\n */\nObjectRenderer.REFRESHRATE_RENDER_ONEVERYTWOFRAMES = 2;","map":{"version":3,"names":["Observable","RenderingManager","_ObserveArray","ObjectRenderer","renderList","_renderList","value","_unObserveRenderList","_renderListHasChanged","renderPassIds","_renderPassIds","currentRefreshId","_currentRefreshId","setMaterialForRendering","mesh","material","meshes","Array","isArray","j","length","i","options","numPasses","setMaterialForRenderPass","undefined","constructor","name","scene","_functionName","previousLength","newLength","_scene","forEach","_markSubMeshesAsLightDirty","particleSystemList","getCustomRenderList","renderParticles","renderSprites","forceLayerMaskCheck","onBeforeRenderObservable","onAfterRenderObservable","onBeforeRenderingManagerRenderObservable","onAfterRenderingManagerRenderObservable","onFastPathRenderObservable","_refreshRate","_currentSceneCamera","doNotChangeAspectRatio","_createRenderPassId","renderPassId","_renderingManager","_useSceneAutoClearSetup","_releaseRenderPassId","engine","getEngine","releaseRenderPassId","createRenderPassId","resetRefreshCounter","refreshRate","shouldRender","isReadyForRendering","viewportWidth","viewportHeight","prepareRenderList","initRender","isReady","_checkReadiness","finishRender","_waitingRenderList","renderListPredicate","index","id","getMeshById","push","sceneMeshes","_this$activeCamera","camera","activeCamera","setTransformMatrix","getViewMatrix","getProjectionMatrix","setViewport","rigParent","viewport","_defaultRenderListPrepared","resetCachedMaterial","render","passIndex","skipOnAfterRenderObservable","currentRenderPassId","notifyObservers","fastPath","snapshotRendering","snapshotRenderingMode","currentRenderList","defaultRenderList","getActiveMeshes","data","defaultRenderListLength","_prepareRenderingManager","customRenderFunction","returnValue","updateTransformMatrix","_doNotChangeAspectRatio","isEnabled","isBlocked","isVisible","subMeshes","customIsReadyFunction","incrementRenderId","particleSystems","particleSystem","currentRenderListLength","checkLayerMask","reset","sceneRenderId","getRenderId","meshIndex","_internalAbstractMeshDataInfo","_currentLODIsUpToDate","_currentLOD","customLODSelector","getLOD","meshToRender","billboardMode","computeWorldMatrix","_preActivateForIntermediateRendering","isMasked","layerMask","_activate","isAnInstance","_onlyForInstancesIntermediate","_actAsRegularMesh","_isActiveIntermediate","_prepareSkeleton","subIndex","subMesh","dispatch","_postActivate","particleIndex","emitter","isStarted","position","dispatchParticles","setRenderingOrder","renderingGroupId","opaqueSortCompareFn","alphaTestSortCompareFn","transparentSortCompareFn","setRenderingAutoClearDepthStencil","autoClearDepthStencil","clone","newRenderer","slice","dispose","clear","_rebuild","REFRESHRATE_RENDER_ONCE","freeRenderingGroups","REFRESHRATE_RENDER_ONEVERYFRAME","REFRESHRATE_RENDER_ONEVERYTWOFRAMES"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Rendering/objectRenderer.js"],"sourcesContent":["import { Observable } from \"../Misc/observable.js\";\nimport { RenderingManager } from \"../Rendering/renderingManager.js\";\n\nimport { _ObserveArray } from \"../Misc/arrayTools.js\";\n/**\n * A class that renders objects to the currently bound render target.\n * This class only renders objects, and is not concerned with the output texture or post-processing.\n */\nexport class ObjectRenderer {\n /**\n * Use this list to define the list of mesh you want to render.\n */\n get renderList() {\n return this._renderList;\n }\n set renderList(value) {\n if (this._renderList === value) {\n return;\n }\n if (this._unObserveRenderList) {\n this._unObserveRenderList();\n this._unObserveRenderList = null;\n }\n if (value) {\n this._unObserveRenderList = _ObserveArray(value, this._renderListHasChanged);\n }\n this._renderList = value;\n }\n /**\n * Gets the render pass ids used by the object renderer.\n */\n get renderPassIds() {\n return this._renderPassIds;\n }\n /**\n * Gets the current value of the refreshId counter\n */\n get currentRefreshId() {\n return this._currentRefreshId;\n }\n /**\n * Sets a specific material to be used to render a mesh/a list of meshes with this object renderer\n * @param mesh mesh or array of meshes\n * @param material material or array of materials to use for this render pass. If undefined is passed, no specific material will be used but the regular material instead (mesh.material). It's possible to provide an array of materials to use a different material for each rendering pass.\n */\n setMaterialForRendering(mesh, material) {\n let meshes;\n if (!Array.isArray(mesh)) {\n meshes = [mesh];\n }\n else {\n meshes = mesh;\n }\n for (let j = 0; j < meshes.length; ++j) {\n for (let i = 0; i < this.options.numPasses; ++i) {\n meshes[j].setMaterialForRenderPass(this._renderPassIds[i], material !== undefined ? (Array.isArray(material) ? material[i] : material) : undefined);\n }\n }\n }\n /**\n * Instantiates an object renderer.\n * @param name The friendly name of the object renderer\n * @param scene The scene the renderer belongs to\n * @param options The options used to create the renderer (optional)\n */\n constructor(name, scene, options) {\n this._unObserveRenderList = null;\n this._renderListHasChanged = (_functionName, previousLength) => {\n const newLength = this._renderList ? this._renderList.length : 0;\n if ((previousLength === 0 && newLength > 0) || newLength === 0) {\n this._scene.meshes.forEach((mesh) => {\n mesh._markSubMeshesAsLightDirty();\n });\n }\n };\n /**\n * Define the list of particle systems to render. If not provided, will render all the particle systems of the scene.\n * Note that the particle systems are rendered only if renderParticles is set to true.\n */\n this.particleSystemList = null;\n /**\n * Use this function to overload the renderList array at rendering time.\n * Return null to render with the current renderList, else return the list of meshes to use for rendering.\n * For 2DArray, layerOrFace is the index of the layer that is going to be rendered, else it is the faceIndex of\n * the cube (if the RTT is a cube, else layerOrFace=0).\n * The renderList passed to the function is the current render list (the one that will be used if the function returns null).\n * The length of this list is passed through renderListLength: don't use renderList.length directly because the array can\n * hold dummy elements!\n */\n this.getCustomRenderList = null;\n /**\n * Define if particles should be rendered.\n */\n this.renderParticles = true;\n /**\n * Define if sprites should be rendered.\n */\n this.renderSprites = false;\n /**\n * Force checking the layerMask property even if a custom list of meshes is provided (ie. if renderList is not undefined)\n */\n this.forceLayerMaskCheck = false;\n /**\n * An event triggered before rendering the objects\n */\n this.onBeforeRenderObservable = new Observable();\n /**\n * An event triggered after rendering the objects\n */\n this.onAfterRenderObservable = new Observable();\n /**\n * An event triggered before the rendering group is processed\n */\n this.onBeforeRenderingManagerRenderObservable = new Observable();\n /**\n * An event triggered after the rendering group is processed\n */\n this.onAfterRenderingManagerRenderObservable = new Observable();\n /**\n * An event triggered when fast path rendering is used\n */\n this.onFastPathRenderObservable = new Observable();\n this._currentRefreshId = -1;\n this._refreshRate = 1;\n this._currentSceneCamera = null;\n this.name = name;\n this._scene = scene;\n this.renderList = [];\n this._renderPassIds = [];\n this.options = {\n numPasses: 1,\n doNotChangeAspectRatio: true,\n ...options,\n };\n this._createRenderPassId();\n this.renderPassId = this._renderPassIds[0];\n // Rendering groups\n this._renderingManager = new RenderingManager(scene);\n this._renderingManager._useSceneAutoClearSetup = true;\n }\n _releaseRenderPassId() {\n const engine = this._scene.getEngine();\n for (let i = 0; i < this.options.numPasses; ++i) {\n engine.releaseRenderPassId(this._renderPassIds[i]);\n }\n this._renderPassIds.length = 0;\n }\n _createRenderPassId() {\n this._releaseRenderPassId();\n const engine = this._scene.getEngine();\n for (let i = 0; i < this.options.numPasses; ++i) {\n this._renderPassIds[i] = engine.createRenderPassId(`ObjectRenderer - ${this.name}#${i}`);\n }\n }\n /**\n * Resets the refresh counter of the renderer and start back from scratch.\n * Could be useful to re-render if it is setup to render only once.\n */\n resetRefreshCounter() {\n this._currentRefreshId = -1;\n }\n /**\n * Defines the refresh rate of the rendering or the rendering frequency.\n * Use 0 to render just once, 1 to render on every frame, 2 to render every two frames and so on...\n */\n get refreshRate() {\n return this._refreshRate;\n }\n set refreshRate(value) {\n this._refreshRate = value;\n this.resetRefreshCounter();\n }\n /**\n * Indicates if the renderer should render the current frame.\n * The output is based on the specified refresh rate.\n * @returns true if the renderer should render the current frame\n */\n shouldRender() {\n if (this._currentRefreshId === -1) {\n // At least render once\n this._currentRefreshId = 1;\n return true;\n }\n if (this.refreshRate === this._currentRefreshId) {\n this._currentRefreshId = 1;\n return true;\n }\n this._currentRefreshId++;\n return false;\n }\n /**\n * This function will check if the renderer is ready to render (textures are loaded, shaders are compiled)\n * @param viewportWidth defines the width of the viewport\n * @param viewportHeight defines the height of the viewport\n * @returns true if all required resources are ready\n */\n isReadyForRendering(viewportWidth, viewportHeight) {\n this.prepareRenderList();\n this.initRender(viewportWidth, viewportHeight);\n const isReady = this._checkReadiness();\n this.finishRender();\n return isReady;\n }\n /**\n * Makes sure the list of meshes is ready to be rendered\n * You should call this function before \"initRender\", but if you know the render list is ok, you may call \"initRender\" directly\n */\n prepareRenderList() {\n const scene = this._scene;\n if (this._waitingRenderList) {\n if (!this.renderListPredicate) {\n this.renderList = [];\n for (let index = 0; index < this._waitingRenderList.length; index++) {\n const id = this._waitingRenderList[index];\n const mesh = scene.getMeshById(id);\n if (mesh) {\n this.renderList.push(mesh);\n }\n }\n }\n this._waitingRenderList = undefined;\n }\n // Is predicate defined?\n if (this.renderListPredicate) {\n if (this.renderList) {\n this.renderList.length = 0; // Clear previous renderList\n }\n else {\n this.renderList = [];\n }\n const sceneMeshes = this._scene.meshes;\n for (let index = 0; index < sceneMeshes.length; index++) {\n const mesh = sceneMeshes[index];\n if (this.renderListPredicate(mesh)) {\n this.renderList.push(mesh);\n }\n }\n }\n }\n /**\n * This method makes sure everything is setup before \"render\" can be called\n * @param viewportWidth Width of the viewport to render to\n * @param viewportHeight Height of the viewport to render to\n */\n initRender(viewportWidth, viewportHeight) {\n const engine = this._scene.getEngine();\n const camera = this.activeCamera ?? this._scene.activeCamera;\n this._currentSceneCamera = this._scene.activeCamera;\n if (camera) {\n if (camera !== this._scene.activeCamera) {\n this._scene.setTransformMatrix(camera.getViewMatrix(), camera.getProjectionMatrix(true));\n this._scene.activeCamera = camera;\n }\n engine.setViewport(camera.rigParent ? camera.rigParent.viewport : camera.viewport, viewportWidth, viewportHeight);\n }\n this._defaultRenderListPrepared = false;\n }\n /**\n * This method must be called after the \"render\" call(s), to complete the rendering process.\n */\n finishRender() {\n const scene = this._scene;\n scene.activeCamera = this._currentSceneCamera;\n if (this._currentSceneCamera) {\n if (this.activeCamera && this.activeCamera !== scene.activeCamera) {\n scene.setTransformMatrix(this._currentSceneCamera.getViewMatrix(), this._currentSceneCamera.getProjectionMatrix(true));\n }\n scene.getEngine().setViewport(this._currentSceneCamera.viewport);\n }\n scene.resetCachedMaterial();\n }\n /**\n * Renders all the objects (meshes, particles systems, sprites) to the currently bound render target texture.\n * @param passIndex defines the pass index to use (default: 0)\n * @param skipOnAfterRenderObservable defines a flag to skip raising the onAfterRenderObservable\n */\n render(passIndex = 0, skipOnAfterRenderObservable = false) {\n const scene = this._scene;\n const engine = scene.getEngine();\n const currentRenderPassId = engine.currentRenderPassId;\n engine.currentRenderPassId = this._renderPassIds[passIndex];\n this.onBeforeRenderObservable.notifyObservers(passIndex);\n const fastPath = engine.snapshotRendering && engine.snapshotRenderingMode === 1;\n if (!fastPath) {\n // Get the list of meshes to render\n let currentRenderList = null;\n const defaultRenderList = this.renderList ? this.renderList : scene.getActiveMeshes().data;\n const defaultRenderListLength = this.renderList ? this.renderList.length : scene.getActiveMeshes().length;\n if (this.getCustomRenderList) {\n currentRenderList = this.getCustomRenderList(passIndex, defaultRenderList, defaultRenderListLength);\n }\n if (!currentRenderList) {\n // No custom render list provided, we prepare the rendering for the default list, but check\n // first if we did not already performed the preparation before so as to avoid re-doing it several times\n if (!this._defaultRenderListPrepared) {\n this._prepareRenderingManager(defaultRenderList, defaultRenderListLength, !this.renderList || this.forceLayerMaskCheck);\n this._defaultRenderListPrepared = true;\n }\n currentRenderList = defaultRenderList;\n }\n else {\n // Prepare the rendering for the custom render list provided\n this._prepareRenderingManager(currentRenderList, currentRenderList.length, this.forceLayerMaskCheck);\n }\n this.onBeforeRenderingManagerRenderObservable.notifyObservers(passIndex);\n this._renderingManager.render(this.customRenderFunction, currentRenderList, this.renderParticles, this.renderSprites);\n this.onAfterRenderingManagerRenderObservable.notifyObservers(passIndex);\n }\n else {\n this.onFastPathRenderObservable.notifyObservers(passIndex);\n }\n if (!skipOnAfterRenderObservable) {\n this.onAfterRenderObservable.notifyObservers(passIndex);\n }\n engine.currentRenderPassId = currentRenderPassId;\n }\n /** @internal */\n _checkReadiness() {\n const scene = this._scene;\n const engine = scene.getEngine();\n const currentRenderPassId = engine.currentRenderPassId;\n let returnValue = true;\n if (!scene.getViewMatrix()) {\n // We probably didn't execute scene.render() yet, so make sure we have a view/projection matrix setup for the scene\n scene.updateTransformMatrix();\n }\n const numPasses = this.options.numPasses;\n for (let passIndex = 0; passIndex < numPasses && returnValue; passIndex++) {\n let currentRenderList = null;\n const defaultRenderList = this.renderList ? this.renderList : scene.getActiveMeshes().data;\n const defaultRenderListLength = this.renderList ? this.renderList.length : scene.getActiveMeshes().length;\n engine.currentRenderPassId = this._renderPassIds[passIndex];\n this.onBeforeRenderObservable.notifyObservers(passIndex);\n if (this.getCustomRenderList) {\n currentRenderList = this.getCustomRenderList(passIndex, defaultRenderList, defaultRenderListLength);\n }\n if (!currentRenderList) {\n currentRenderList = defaultRenderList;\n }\n if (!this._doNotChangeAspectRatio) {\n scene.updateTransformMatrix(true);\n }\n for (let i = 0; i < currentRenderList.length && returnValue; ++i) {\n const mesh = currentRenderList[i];\n if (!mesh.isEnabled() || mesh.isBlocked || !mesh.isVisible || !mesh.subMeshes) {\n continue;\n }\n if (this.customIsReadyFunction) {\n if (!this.customIsReadyFunction(mesh, this.refreshRate, true)) {\n returnValue = false;\n continue;\n }\n }\n else if (!mesh.isReady(true)) {\n returnValue = false;\n continue;\n }\n }\n this.onAfterRenderObservable.notifyObservers(passIndex);\n if (numPasses > 1) {\n scene.incrementRenderId();\n scene.resetCachedMaterial();\n }\n }\n const particleSystems = this.particleSystemList || scene.particleSystems;\n for (const particleSystem of particleSystems) {\n if (!particleSystem.isReady()) {\n returnValue = false;\n }\n }\n engine.currentRenderPassId = currentRenderPassId;\n return returnValue;\n }\n _prepareRenderingManager(currentRenderList, currentRenderListLength, checkLayerMask) {\n const scene = this._scene;\n const camera = scene.activeCamera;\n this._renderingManager.reset();\n const sceneRenderId = scene.getRenderId();\n for (let meshIndex = 0; meshIndex < currentRenderListLength; meshIndex++) {\n const mesh = currentRenderList[meshIndex];\n if (mesh && !mesh.isBlocked) {\n if (this.customIsReadyFunction) {\n if (!this.customIsReadyFunction(mesh, this.refreshRate, false)) {\n this.resetRefreshCounter();\n continue;\n }\n }\n else if (!mesh.isReady(this.refreshRate === 0)) {\n this.resetRefreshCounter();\n continue;\n }\n if (!mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate && camera) {\n mesh._internalAbstractMeshDataInfo._currentLOD = scene.customLODSelector ? scene.customLODSelector(mesh, camera) : mesh.getLOD(camera);\n mesh._internalAbstractMeshDataInfo._currentLODIsUpToDate = true;\n }\n if (!mesh._internalAbstractMeshDataInfo._currentLOD) {\n continue;\n }\n let meshToRender = mesh._internalAbstractMeshDataInfo._currentLOD;\n if (meshToRender !== mesh && meshToRender.billboardMode !== 0) {\n meshToRender.computeWorldMatrix(); // Compute world matrix if LOD is billboard\n }\n meshToRender._preActivateForIntermediateRendering(sceneRenderId);\n let isMasked;\n if (checkLayerMask && camera) {\n isMasked = (mesh.layerMask & camera.layerMask) === 0;\n }\n else {\n isMasked = false;\n }\n if (mesh.isEnabled() && mesh.isVisible && mesh.subMeshes && !isMasked) {\n if (meshToRender !== mesh) {\n meshToRender._activate(sceneRenderId, true);\n }\n if (mesh._activate(sceneRenderId, true) && mesh.subMeshes.length) {\n if (!mesh.isAnInstance) {\n meshToRender._internalAbstractMeshDataInfo._onlyForInstancesIntermediate = false;\n }\n else {\n if (mesh._internalAbstractMeshDataInfo._actAsRegularMesh) {\n meshToRender = mesh;\n }\n }\n meshToRender._internalAbstractMeshDataInfo._isActiveIntermediate = true;\n scene._prepareSkeleton(meshToRender);\n for (let subIndex = 0; subIndex < meshToRender.subMeshes.length; subIndex++) {\n const subMesh = meshToRender.subMeshes[subIndex];\n this._renderingManager.dispatch(subMesh, meshToRender);\n }\n }\n mesh._postActivate();\n }\n }\n }\n const particleSystems = this.particleSystemList || scene.particleSystems;\n for (let particleIndex = 0; particleIndex < particleSystems.length; particleIndex++) {\n const particleSystem = particleSystems[particleIndex];\n const emitter = particleSystem.emitter;\n if (!particleSystem.isStarted() || !emitter || (emitter.position && !emitter.isEnabled())) {\n continue;\n }\n this._renderingManager.dispatchParticles(particleSystem);\n }\n }\n /**\n * Overrides the default sort function applied in the rendering group to prepare the meshes.\n * This allowed control for front to back rendering or reversely depending of the special needs.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param opaqueSortCompareFn The opaque queue comparison function use to sort.\n * @param alphaTestSortCompareFn The alpha test queue comparison function use to sort.\n * @param transparentSortCompareFn The transparent queue comparison function use to sort.\n */\n setRenderingOrder(renderingGroupId, opaqueSortCompareFn = null, alphaTestSortCompareFn = null, transparentSortCompareFn = null) {\n this._renderingManager.setRenderingOrder(renderingGroupId, opaqueSortCompareFn, alphaTestSortCompareFn, transparentSortCompareFn);\n }\n /**\n * Specifies whether or not the stencil and depth buffer are cleared between two rendering groups.\n *\n * @param renderingGroupId The rendering group id corresponding to its index\n * @param autoClearDepthStencil Automatically clears depth and stencil between groups if true.\n */\n setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil) {\n this._renderingManager.setRenderingAutoClearDepthStencil(renderingGroupId, autoClearDepthStencil);\n this._renderingManager._useSceneAutoClearSetup = false;\n }\n /**\n * Clones the renderer.\n * @returns the cloned renderer\n */\n clone() {\n const newRenderer = new ObjectRenderer(this.name, this._scene, this.options);\n if (this.renderList) {\n newRenderer.renderList = this.renderList.slice(0);\n }\n return newRenderer;\n }\n /**\n * Dispose the renderer and release its associated resources.\n */\n dispose() {\n this.onBeforeRenderObservable.clear();\n this.onAfterRenderObservable.clear();\n this.onBeforeRenderingManagerRenderObservable.clear();\n this.onAfterRenderingManagerRenderObservable.clear();\n this.onFastPathRenderObservable.clear();\n this._releaseRenderPassId();\n this.renderList = null;\n }\n /** @internal */\n _rebuild() {\n if (this.refreshRate === ObjectRenderer.REFRESHRATE_RENDER_ONCE) {\n this.refreshRate = ObjectRenderer.REFRESHRATE_RENDER_ONCE;\n }\n }\n /**\n * Clear the info related to rendering groups preventing retention point in material dispose.\n */\n freeRenderingGroups() {\n if (this._renderingManager) {\n this._renderingManager.freeRenderingGroups();\n }\n }\n}\n/**\n * Objects will only be rendered once which can be useful to improve performance if everything in your render is static for instance.\n */\nObjectRenderer.REFRESHRATE_RENDER_ONCE = 0;\n/**\n * Objects will be rendered every frame and is recommended for dynamic contents.\n */\nObjectRenderer.REFRESHRATE_RENDER_ONEVERYFRAME = 1;\n/**\n * Objects will be rendered every 2 frames which could be enough if your dynamic objects are not\n * the central point of your effect and can save a lot of performances.\n */\nObjectRenderer.REFRESHRATE_RENDER_ONEVERYTWOFRAMES = 2;\n"],"mappings":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