8177669686aa131ced24fb82d09419f1bc9358991fcaf394aef71e2a8ffa14fa.json 55 KB

1
  1. {"ast":null,"code":"import { Tools } from \"../Misc/tools.js\";\nimport { PerfCounter } from \"../Misc/perfCounter.js\";\n/**\n * This class can be used to get instrumentation data from a Babylon engine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#sceneinstrumentation\n */\nexport class SceneInstrumentation {\n // Properties\n /**\n * Gets the perf counter used for active meshes evaluation time\n */\n get activeMeshesEvaluationTimeCounter() {\n return this._activeMeshesEvaluationTime;\n }\n /**\n * Gets the active meshes evaluation time capture status\n */\n get captureActiveMeshesEvaluationTime() {\n return this._captureActiveMeshesEvaluationTime;\n }\n /**\n * Enable or disable the active meshes evaluation time capture\n */\n set captureActiveMeshesEvaluationTime(value) {\n if (value === this._captureActiveMeshesEvaluationTime) {\n return;\n }\n this._captureActiveMeshesEvaluationTime = value;\n if (value) {\n this._onBeforeActiveMeshesEvaluationObserver = this.scene.onBeforeActiveMeshesEvaluationObservable.add(() => {\n Tools.StartPerformanceCounter(\"Active meshes evaluation\");\n this._activeMeshesEvaluationTime.beginMonitoring();\n });\n this._onAfterActiveMeshesEvaluationObserver = this.scene.onAfterActiveMeshesEvaluationObservable.add(() => {\n Tools.EndPerformanceCounter(\"Active meshes evaluation\");\n this._activeMeshesEvaluationTime.endMonitoring(false);\n });\n } else {\n this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver);\n this._onBeforeActiveMeshesEvaluationObserver = null;\n this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver);\n this._onAfterActiveMeshesEvaluationObserver = null;\n }\n }\n /**\n * Gets the perf counter used for render targets render time\n */\n get renderTargetsRenderTimeCounter() {\n return this._renderTargetsRenderTime;\n }\n /**\n * Gets the render targets render time capture status\n */\n get captureRenderTargetsRenderTime() {\n return this._captureRenderTargetsRenderTime;\n }\n /**\n * Enable or disable the render targets render time capture\n */\n set captureRenderTargetsRenderTime(value) {\n if (value === this._captureRenderTargetsRenderTime) {\n return;\n }\n this._captureRenderTargetsRenderTime = value;\n if (value) {\n this._onBeforeRenderTargetsRenderObserver = this.scene.onBeforeRenderTargetsRenderObservable.add(() => {\n Tools.StartPerformanceCounter(\"Render targets rendering\");\n this._renderTargetsRenderTime.beginMonitoring();\n });\n this._onAfterRenderTargetsRenderObserver = this.scene.onAfterRenderTargetsRenderObservable.add(() => {\n Tools.EndPerformanceCounter(\"Render targets rendering\");\n this._renderTargetsRenderTime.endMonitoring(false);\n });\n } else {\n this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver);\n this._onBeforeRenderTargetsRenderObserver = null;\n this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver);\n this._onAfterRenderTargetsRenderObserver = null;\n }\n }\n /**\n * Gets the perf counter used for particles render time\n */\n get particlesRenderTimeCounter() {\n return this._particlesRenderTime;\n }\n /**\n * Gets the particles render time capture status\n */\n get captureParticlesRenderTime() {\n return this._captureParticlesRenderTime;\n }\n /**\n * Enable or disable the particles render time capture\n */\n set captureParticlesRenderTime(value) {\n if (value === this._captureParticlesRenderTime) {\n return;\n }\n this._captureParticlesRenderTime = value;\n if (value) {\n this._onBeforeParticlesRenderingObserver = this.scene.onBeforeParticlesRenderingObservable.add(() => {\n Tools.StartPerformanceCounter(\"Particles\");\n this._particlesRenderTime.beginMonitoring();\n });\n this._onAfterParticlesRenderingObserver = this.scene.onAfterParticlesRenderingObservable.add(() => {\n Tools.EndPerformanceCounter(\"Particles\");\n this._particlesRenderTime.endMonitoring(false);\n });\n } else {\n this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver);\n this._onBeforeParticlesRenderingObserver = null;\n this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver);\n this._onAfterParticlesRenderingObserver = null;\n }\n }\n /**\n * Gets the perf counter used for sprites render time\n */\n get spritesRenderTimeCounter() {\n return this._spritesRenderTime;\n }\n /**\n * Gets the sprites render time capture status\n */\n get captureSpritesRenderTime() {\n return this._captureSpritesRenderTime;\n }\n /**\n * Enable or disable the sprites render time capture\n */\n set captureSpritesRenderTime(value) {\n if (value === this._captureSpritesRenderTime) {\n return;\n }\n this._captureSpritesRenderTime = value;\n if (!this.scene.spriteManagers) {\n return;\n }\n if (value) {\n this._onBeforeSpritesRenderingObserver = this.scene.onBeforeSpritesRenderingObservable.add(() => {\n Tools.StartPerformanceCounter(\"Sprites\");\n this._spritesRenderTime.beginMonitoring();\n });\n this._onAfterSpritesRenderingObserver = this.scene.onAfterSpritesRenderingObservable.add(() => {\n Tools.EndPerformanceCounter(\"Sprites\");\n this._spritesRenderTime.endMonitoring(false);\n });\n } else {\n this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver);\n this._onBeforeSpritesRenderingObserver = null;\n this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver);\n this._onAfterSpritesRenderingObserver = null;\n }\n }\n /**\n * Gets the perf counter used for physics time\n */\n get physicsTimeCounter() {\n return this._physicsTime;\n }\n /**\n * Gets the physics time capture status\n */\n get capturePhysicsTime() {\n return this._capturePhysicsTime;\n }\n /**\n * Enable or disable the physics time capture\n */\n set capturePhysicsTime(value) {\n if (value === this._capturePhysicsTime) {\n return;\n }\n if (!this.scene.onBeforePhysicsObservable) {\n return;\n }\n this._capturePhysicsTime = value;\n if (value) {\n this._onBeforePhysicsObserver = this.scene.onBeforePhysicsObservable.add(() => {\n Tools.StartPerformanceCounter(\"Physics\");\n this._physicsTime.beginMonitoring();\n });\n this._onAfterPhysicsObserver = this.scene.onAfterPhysicsObservable.add(() => {\n Tools.EndPerformanceCounter(\"Physics\");\n this._physicsTime.endMonitoring();\n });\n } else {\n this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver);\n this._onBeforePhysicsObserver = null;\n this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver);\n this._onAfterPhysicsObserver = null;\n }\n }\n /**\n * Gets the perf counter used for animations time\n */\n get animationsTimeCounter() {\n return this._animationsTime;\n }\n /**\n * Gets the animations time capture status\n */\n get captureAnimationsTime() {\n return this._captureAnimationsTime;\n }\n /**\n * Enable or disable the animations time capture\n */\n set captureAnimationsTime(value) {\n if (value === this._captureAnimationsTime) {\n return;\n }\n this._captureAnimationsTime = value;\n if (value) {\n this._onAfterAnimationsObserver = this.scene.onAfterAnimationsObservable.add(() => {\n this._animationsTime.endMonitoring();\n });\n } else {\n this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver);\n this._onAfterAnimationsObserver = null;\n }\n }\n /**\n * Gets the perf counter used for frame time capture\n */\n get frameTimeCounter() {\n return this._frameTime;\n }\n /**\n * Gets the frame time capture status\n */\n get captureFrameTime() {\n return this._captureFrameTime;\n }\n /**\n * Enable or disable the frame time capture\n */\n set captureFrameTime(value) {\n this._captureFrameTime = value;\n }\n /**\n * Gets the perf counter used for inter-frames time capture\n */\n get interFrameTimeCounter() {\n return this._interFrameTime;\n }\n /**\n * Gets the inter-frames time capture status\n */\n get captureInterFrameTime() {\n return this._captureInterFrameTime;\n }\n /**\n * Enable or disable the inter-frames time capture\n */\n set captureInterFrameTime(value) {\n this._captureInterFrameTime = value;\n }\n /**\n * Gets the perf counter used for render time capture\n */\n get renderTimeCounter() {\n return this._renderTime;\n }\n /**\n * Gets the render time capture status\n */\n get captureRenderTime() {\n return this._captureRenderTime;\n }\n /**\n * Enable or disable the render time capture\n */\n set captureRenderTime(value) {\n if (value === this._captureRenderTime) {\n return;\n }\n this._captureRenderTime = value;\n if (value) {\n this._onBeforeDrawPhaseObserver = this.scene.onBeforeDrawPhaseObservable.add(() => {\n this._renderTime.beginMonitoring();\n Tools.StartPerformanceCounter(\"Main render\");\n });\n this._onAfterDrawPhaseObserver = this.scene.onAfterDrawPhaseObservable.add(() => {\n this._renderTime.endMonitoring(false);\n Tools.EndPerformanceCounter(\"Main render\");\n });\n } else {\n this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver);\n this._onBeforeDrawPhaseObserver = null;\n this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver);\n this._onAfterDrawPhaseObserver = null;\n }\n }\n /**\n * Gets the perf counter used for camera render time capture\n */\n get cameraRenderTimeCounter() {\n return this._cameraRenderTime;\n }\n /**\n * Gets the camera render time capture status\n */\n get captureCameraRenderTime() {\n return this._captureCameraRenderTime;\n }\n /**\n * Enable or disable the camera render time capture\n */\n set captureCameraRenderTime(value) {\n if (value === this._captureCameraRenderTime) {\n return;\n }\n this._captureCameraRenderTime = value;\n if (value) {\n this._onBeforeCameraRenderObserver = this.scene.onBeforeCameraRenderObservable.add(camera => {\n this._cameraRenderTime.beginMonitoring();\n Tools.StartPerformanceCounter(`Rendering camera ${camera.name}`);\n });\n this._onAfterCameraRenderObserver = this.scene.onAfterCameraRenderObservable.add(camera => {\n this._cameraRenderTime.endMonitoring(false);\n Tools.EndPerformanceCounter(`Rendering camera ${camera.name}`);\n });\n } else {\n this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver);\n this._onBeforeCameraRenderObserver = null;\n this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver);\n this._onAfterCameraRenderObserver = null;\n }\n }\n /**\n * Gets the perf counter used for draw calls\n */\n get drawCallsCounter() {\n return this.scene.getEngine()._drawCalls;\n }\n /**\n * Instantiates a new scene instrumentation.\n * This class can be used to get instrumentation data from a Babylon engine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#sceneinstrumentation\n * @param scene Defines the scene to instrument\n */\n constructor(\n /**\n * Defines the scene to instrument\n */\n scene) {\n this.scene = scene;\n this._captureActiveMeshesEvaluationTime = false;\n this._activeMeshesEvaluationTime = new PerfCounter();\n this._captureRenderTargetsRenderTime = false;\n this._renderTargetsRenderTime = new PerfCounter();\n this._captureFrameTime = false;\n this._frameTime = new PerfCounter();\n this._captureRenderTime = false;\n this._renderTime = new PerfCounter();\n this._captureInterFrameTime = false;\n this._interFrameTime = new PerfCounter();\n this._captureParticlesRenderTime = false;\n this._particlesRenderTime = new PerfCounter();\n this._captureSpritesRenderTime = false;\n this._spritesRenderTime = new PerfCounter();\n this._capturePhysicsTime = false;\n this._physicsTime = new PerfCounter();\n this._captureAnimationsTime = false;\n this._animationsTime = new PerfCounter();\n this._captureCameraRenderTime = false;\n this._cameraRenderTime = new PerfCounter();\n // Observers\n this._onBeforeActiveMeshesEvaluationObserver = null;\n this._onAfterActiveMeshesEvaluationObserver = null;\n this._onBeforeRenderTargetsRenderObserver = null;\n this._onAfterRenderTargetsRenderObserver = null;\n this._onAfterRenderObserver = null;\n this._onBeforeDrawPhaseObserver = null;\n this._onAfterDrawPhaseObserver = null;\n this._onBeforeAnimationsObserver = null;\n this._onBeforeParticlesRenderingObserver = null;\n this._onAfterParticlesRenderingObserver = null;\n this._onBeforeSpritesRenderingObserver = null;\n this._onAfterSpritesRenderingObserver = null;\n this._onBeforePhysicsObserver = null;\n this._onAfterPhysicsObserver = null;\n this._onAfterAnimationsObserver = null;\n this._onBeforeCameraRenderObserver = null;\n this._onAfterCameraRenderObserver = null;\n // Before render\n this._onBeforeAnimationsObserver = scene.onBeforeAnimationsObservable.add(() => {\n if (this._captureActiveMeshesEvaluationTime) {\n this._activeMeshesEvaluationTime.fetchNewFrame();\n }\n if (this._captureRenderTargetsRenderTime) {\n this._renderTargetsRenderTime.fetchNewFrame();\n }\n if (this._captureFrameTime) {\n Tools.StartPerformanceCounter(\"Scene rendering\");\n this._frameTime.beginMonitoring();\n }\n if (this._captureInterFrameTime) {\n this._interFrameTime.endMonitoring();\n }\n if (this._captureParticlesRenderTime) {\n this._particlesRenderTime.fetchNewFrame();\n }\n if (this._captureSpritesRenderTime) {\n this._spritesRenderTime.fetchNewFrame();\n }\n if (this._captureAnimationsTime) {\n this._animationsTime.beginMonitoring();\n }\n if (this._captureRenderTime) {\n this._renderTime.fetchNewFrame();\n }\n if (this._captureCameraRenderTime) {\n this._cameraRenderTime.fetchNewFrame();\n }\n this.scene.getEngine()._drawCalls.fetchNewFrame();\n });\n // After render\n this._onAfterRenderObserver = scene.onAfterRenderObservable.add(() => {\n if (this._captureFrameTime) {\n Tools.EndPerformanceCounter(\"Scene rendering\");\n this._frameTime.endMonitoring();\n }\n if (this._captureRenderTime) {\n this._renderTime.endMonitoring(false);\n }\n if (this._captureInterFrameTime) {\n this._interFrameTime.beginMonitoring();\n }\n if (this._captureActiveMeshesEvaluationTime) {\n this._activeMeshesEvaluationTime.endFrame();\n }\n if (this._captureRenderTargetsRenderTime) {\n this._renderTargetsRenderTime.endFrame();\n }\n if (this._captureParticlesRenderTime) {\n this._particlesRenderTime.endFrame();\n }\n if (this._captureSpritesRenderTime) {\n this._spritesRenderTime.endFrame();\n }\n if (this._captureRenderTime) {\n this._renderTime.endFrame();\n }\n if (this._captureCameraRenderTime) {\n this._cameraRenderTime.endFrame();\n }\n });\n }\n /**\n * Dispose and release associated resources.\n */\n dispose() {\n this.scene.onAfterRenderObservable.remove(this._onAfterRenderObserver);\n this._onAfterRenderObserver = null;\n this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver);\n this._onBeforeActiveMeshesEvaluationObserver = null;\n this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver);\n this._onAfterActiveMeshesEvaluationObserver = null;\n this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver);\n this._onBeforeRenderTargetsRenderObserver = null;\n this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver);\n this._onAfterRenderTargetsRenderObserver = null;\n this.scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver);\n this._onBeforeAnimationsObserver = null;\n this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver);\n this._onBeforeParticlesRenderingObserver = null;\n this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver);\n this._onAfterParticlesRenderingObserver = null;\n if (this._onBeforeSpritesRenderingObserver) {\n this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver);\n this._onBeforeSpritesRenderingObserver = null;\n }\n if (this._onAfterSpritesRenderingObserver) {\n this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver);\n this._onAfterSpritesRenderingObserver = null;\n }\n this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver);\n this._onBeforeDrawPhaseObserver = null;\n this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver);\n this._onAfterDrawPhaseObserver = null;\n if (this._onBeforePhysicsObserver) {\n this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver);\n this._onBeforePhysicsObserver = null;\n }\n if (this._onAfterPhysicsObserver) {\n this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver);\n this._onAfterPhysicsObserver = null;\n }\n this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver);\n this._onAfterAnimationsObserver = null;\n this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver);\n this._onBeforeCameraRenderObserver = null;\n this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver);\n this._onAfterCameraRenderObserver = null;\n this.scene = null;\n }\n}","map":{"version":3,"names":["Tools","PerfCounter","SceneInstrumentation","activeMeshesEvaluationTimeCounter","_activeMeshesEvaluationTime","captureActiveMeshesEvaluationTime","_captureActiveMeshesEvaluationTime","value","_onBeforeActiveMeshesEvaluationObserver","scene","onBeforeActiveMeshesEvaluationObservable","add","StartPerformanceCounter","beginMonitoring","_onAfterActiveMeshesEvaluationObserver","onAfterActiveMeshesEvaluationObservable","EndPerformanceCounter","endMonitoring","remove","renderTargetsRenderTimeCounter","_renderTargetsRenderTime","captureRenderTargetsRenderTime","_captureRenderTargetsRenderTime","_onBeforeRenderTargetsRenderObserver","onBeforeRenderTargetsRenderObservable","_onAfterRenderTargetsRenderObserver","onAfterRenderTargetsRenderObservable","particlesRenderTimeCounter","_particlesRenderTime","captureParticlesRenderTime","_captureParticlesRenderTime","_onBeforeParticlesRenderingObserver","onBeforeParticlesRenderingObservable","_onAfterParticlesRenderingObserver","onAfterParticlesRenderingObservable","spritesRenderTimeCounter","_spritesRenderTime","captureSpritesRenderTime","_captureSpritesRenderTime","spriteManagers","_onBeforeSpritesRenderingObserver","onBeforeSpritesRenderingObservable","_onAfterSpritesRenderingObserver","onAfterSpritesRenderingObservable","physicsTimeCounter","_physicsTime","capturePhysicsTime","_capturePhysicsTime","onBeforePhysicsObservable","_onBeforePhysicsObserver","_onAfterPhysicsObserver","onAfterPhysicsObservable","animationsTimeCounter","_animationsTime","captureAnimationsTime","_captureAnimationsTime","_onAfterAnimationsObserver","onAfterAnimationsObservable","frameTimeCounter","_frameTime","captureFrameTime","_captureFrameTime","interFrameTimeCounter","_interFrameTime","captureInterFrameTime","_captureInterFrameTime","renderTimeCounter","_renderTime","captureRenderTime","_captureRenderTime","_onBeforeDrawPhaseObserver","onBeforeDrawPhaseObservable","_onAfterDrawPhaseObserver","onAfterDrawPhaseObservable","cameraRenderTimeCounter","_cameraRenderTime","captureCameraRenderTime","_captureCameraRenderTime","_onBeforeCameraRenderObserver","onBeforeCameraRenderObservable","camera","name","_onAfterCameraRenderObserver","onAfterCameraRenderObservable","drawCallsCounter","getEngine","_drawCalls","constructor","_onAfterRenderObserver","_onBeforeAnimationsObserver","onBeforeAnimationsObservable","fetchNewFrame","onAfterRenderObservable","endFrame","dispose"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Instrumentation/sceneInstrumentation.js"],"sourcesContent":["import { Tools } from \"../Misc/tools.js\";\nimport { PerfCounter } from \"../Misc/perfCounter.js\";\n/**\n * This class can be used to get instrumentation data from a Babylon engine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#sceneinstrumentation\n */\nexport class SceneInstrumentation {\n // Properties\n /**\n * Gets the perf counter used for active meshes evaluation time\n */\n get activeMeshesEvaluationTimeCounter() {\n return this._activeMeshesEvaluationTime;\n }\n /**\n * Gets the active meshes evaluation time capture status\n */\n get captureActiveMeshesEvaluationTime() {\n return this._captureActiveMeshesEvaluationTime;\n }\n /**\n * Enable or disable the active meshes evaluation time capture\n */\n set captureActiveMeshesEvaluationTime(value) {\n if (value === this._captureActiveMeshesEvaluationTime) {\n return;\n }\n this._captureActiveMeshesEvaluationTime = value;\n if (value) {\n this._onBeforeActiveMeshesEvaluationObserver = this.scene.onBeforeActiveMeshesEvaluationObservable.add(() => {\n Tools.StartPerformanceCounter(\"Active meshes evaluation\");\n this._activeMeshesEvaluationTime.beginMonitoring();\n });\n this._onAfterActiveMeshesEvaluationObserver = this.scene.onAfterActiveMeshesEvaluationObservable.add(() => {\n Tools.EndPerformanceCounter(\"Active meshes evaluation\");\n this._activeMeshesEvaluationTime.endMonitoring(false);\n });\n }\n else {\n this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver);\n this._onBeforeActiveMeshesEvaluationObserver = null;\n this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver);\n this._onAfterActiveMeshesEvaluationObserver = null;\n }\n }\n /**\n * Gets the perf counter used for render targets render time\n */\n get renderTargetsRenderTimeCounter() {\n return this._renderTargetsRenderTime;\n }\n /**\n * Gets the render targets render time capture status\n */\n get captureRenderTargetsRenderTime() {\n return this._captureRenderTargetsRenderTime;\n }\n /**\n * Enable or disable the render targets render time capture\n */\n set captureRenderTargetsRenderTime(value) {\n if (value === this._captureRenderTargetsRenderTime) {\n return;\n }\n this._captureRenderTargetsRenderTime = value;\n if (value) {\n this._onBeforeRenderTargetsRenderObserver = this.scene.onBeforeRenderTargetsRenderObservable.add(() => {\n Tools.StartPerformanceCounter(\"Render targets rendering\");\n this._renderTargetsRenderTime.beginMonitoring();\n });\n this._onAfterRenderTargetsRenderObserver = this.scene.onAfterRenderTargetsRenderObservable.add(() => {\n Tools.EndPerformanceCounter(\"Render targets rendering\");\n this._renderTargetsRenderTime.endMonitoring(false);\n });\n }\n else {\n this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver);\n this._onBeforeRenderTargetsRenderObserver = null;\n this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver);\n this._onAfterRenderTargetsRenderObserver = null;\n }\n }\n /**\n * Gets the perf counter used for particles render time\n */\n get particlesRenderTimeCounter() {\n return this._particlesRenderTime;\n }\n /**\n * Gets the particles render time capture status\n */\n get captureParticlesRenderTime() {\n return this._captureParticlesRenderTime;\n }\n /**\n * Enable or disable the particles render time capture\n */\n set captureParticlesRenderTime(value) {\n if (value === this._captureParticlesRenderTime) {\n return;\n }\n this._captureParticlesRenderTime = value;\n if (value) {\n this._onBeforeParticlesRenderingObserver = this.scene.onBeforeParticlesRenderingObservable.add(() => {\n Tools.StartPerformanceCounter(\"Particles\");\n this._particlesRenderTime.beginMonitoring();\n });\n this._onAfterParticlesRenderingObserver = this.scene.onAfterParticlesRenderingObservable.add(() => {\n Tools.EndPerformanceCounter(\"Particles\");\n this._particlesRenderTime.endMonitoring(false);\n });\n }\n else {\n this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver);\n this._onBeforeParticlesRenderingObserver = null;\n this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver);\n this._onAfterParticlesRenderingObserver = null;\n }\n }\n /**\n * Gets the perf counter used for sprites render time\n */\n get spritesRenderTimeCounter() {\n return this._spritesRenderTime;\n }\n /**\n * Gets the sprites render time capture status\n */\n get captureSpritesRenderTime() {\n return this._captureSpritesRenderTime;\n }\n /**\n * Enable or disable the sprites render time capture\n */\n set captureSpritesRenderTime(value) {\n if (value === this._captureSpritesRenderTime) {\n return;\n }\n this._captureSpritesRenderTime = value;\n if (!this.scene.spriteManagers) {\n return;\n }\n if (value) {\n this._onBeforeSpritesRenderingObserver = this.scene.onBeforeSpritesRenderingObservable.add(() => {\n Tools.StartPerformanceCounter(\"Sprites\");\n this._spritesRenderTime.beginMonitoring();\n });\n this._onAfterSpritesRenderingObserver = this.scene.onAfterSpritesRenderingObservable.add(() => {\n Tools.EndPerformanceCounter(\"Sprites\");\n this._spritesRenderTime.endMonitoring(false);\n });\n }\n else {\n this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver);\n this._onBeforeSpritesRenderingObserver = null;\n this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver);\n this._onAfterSpritesRenderingObserver = null;\n }\n }\n /**\n * Gets the perf counter used for physics time\n */\n get physicsTimeCounter() {\n return this._physicsTime;\n }\n /**\n * Gets the physics time capture status\n */\n get capturePhysicsTime() {\n return this._capturePhysicsTime;\n }\n /**\n * Enable or disable the physics time capture\n */\n set capturePhysicsTime(value) {\n if (value === this._capturePhysicsTime) {\n return;\n }\n if (!this.scene.onBeforePhysicsObservable) {\n return;\n }\n this._capturePhysicsTime = value;\n if (value) {\n this._onBeforePhysicsObserver = this.scene.onBeforePhysicsObservable.add(() => {\n Tools.StartPerformanceCounter(\"Physics\");\n this._physicsTime.beginMonitoring();\n });\n this._onAfterPhysicsObserver = this.scene.onAfterPhysicsObservable.add(() => {\n Tools.EndPerformanceCounter(\"Physics\");\n this._physicsTime.endMonitoring();\n });\n }\n else {\n this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver);\n this._onBeforePhysicsObserver = null;\n this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver);\n this._onAfterPhysicsObserver = null;\n }\n }\n /**\n * Gets the perf counter used for animations time\n */\n get animationsTimeCounter() {\n return this._animationsTime;\n }\n /**\n * Gets the animations time capture status\n */\n get captureAnimationsTime() {\n return this._captureAnimationsTime;\n }\n /**\n * Enable or disable the animations time capture\n */\n set captureAnimationsTime(value) {\n if (value === this._captureAnimationsTime) {\n return;\n }\n this._captureAnimationsTime = value;\n if (value) {\n this._onAfterAnimationsObserver = this.scene.onAfterAnimationsObservable.add(() => {\n this._animationsTime.endMonitoring();\n });\n }\n else {\n this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver);\n this._onAfterAnimationsObserver = null;\n }\n }\n /**\n * Gets the perf counter used for frame time capture\n */\n get frameTimeCounter() {\n return this._frameTime;\n }\n /**\n * Gets the frame time capture status\n */\n get captureFrameTime() {\n return this._captureFrameTime;\n }\n /**\n * Enable or disable the frame time capture\n */\n set captureFrameTime(value) {\n this._captureFrameTime = value;\n }\n /**\n * Gets the perf counter used for inter-frames time capture\n */\n get interFrameTimeCounter() {\n return this._interFrameTime;\n }\n /**\n * Gets the inter-frames time capture status\n */\n get captureInterFrameTime() {\n return this._captureInterFrameTime;\n }\n /**\n * Enable or disable the inter-frames time capture\n */\n set captureInterFrameTime(value) {\n this._captureInterFrameTime = value;\n }\n /**\n * Gets the perf counter used for render time capture\n */\n get renderTimeCounter() {\n return this._renderTime;\n }\n /**\n * Gets the render time capture status\n */\n get captureRenderTime() {\n return this._captureRenderTime;\n }\n /**\n * Enable or disable the render time capture\n */\n set captureRenderTime(value) {\n if (value === this._captureRenderTime) {\n return;\n }\n this._captureRenderTime = value;\n if (value) {\n this._onBeforeDrawPhaseObserver = this.scene.onBeforeDrawPhaseObservable.add(() => {\n this._renderTime.beginMonitoring();\n Tools.StartPerformanceCounter(\"Main render\");\n });\n this._onAfterDrawPhaseObserver = this.scene.onAfterDrawPhaseObservable.add(() => {\n this._renderTime.endMonitoring(false);\n Tools.EndPerformanceCounter(\"Main render\");\n });\n }\n else {\n this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver);\n this._onBeforeDrawPhaseObserver = null;\n this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver);\n this._onAfterDrawPhaseObserver = null;\n }\n }\n /**\n * Gets the perf counter used for camera render time capture\n */\n get cameraRenderTimeCounter() {\n return this._cameraRenderTime;\n }\n /**\n * Gets the camera render time capture status\n */\n get captureCameraRenderTime() {\n return this._captureCameraRenderTime;\n }\n /**\n * Enable or disable the camera render time capture\n */\n set captureCameraRenderTime(value) {\n if (value === this._captureCameraRenderTime) {\n return;\n }\n this._captureCameraRenderTime = value;\n if (value) {\n this._onBeforeCameraRenderObserver = this.scene.onBeforeCameraRenderObservable.add((camera) => {\n this._cameraRenderTime.beginMonitoring();\n Tools.StartPerformanceCounter(`Rendering camera ${camera.name}`);\n });\n this._onAfterCameraRenderObserver = this.scene.onAfterCameraRenderObservable.add((camera) => {\n this._cameraRenderTime.endMonitoring(false);\n Tools.EndPerformanceCounter(`Rendering camera ${camera.name}`);\n });\n }\n else {\n this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver);\n this._onBeforeCameraRenderObserver = null;\n this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver);\n this._onAfterCameraRenderObserver = null;\n }\n }\n /**\n * Gets the perf counter used for draw calls\n */\n get drawCallsCounter() {\n return this.scene.getEngine()._drawCalls;\n }\n /**\n * Instantiates a new scene instrumentation.\n * This class can be used to get instrumentation data from a Babylon engine\n * @see https://doc.babylonjs.com/features/featuresDeepDive/scene/optimize_your_scene#sceneinstrumentation\n * @param scene Defines the scene to instrument\n */\n constructor(\n /**\n * Defines the scene to instrument\n */\n scene) {\n this.scene = scene;\n this._captureActiveMeshesEvaluationTime = false;\n this._activeMeshesEvaluationTime = new PerfCounter();\n this._captureRenderTargetsRenderTime = false;\n this._renderTargetsRenderTime = new PerfCounter();\n this._captureFrameTime = false;\n this._frameTime = new PerfCounter();\n this._captureRenderTime = false;\n this._renderTime = new PerfCounter();\n this._captureInterFrameTime = false;\n this._interFrameTime = new PerfCounter();\n this._captureParticlesRenderTime = false;\n this._particlesRenderTime = new PerfCounter();\n this._captureSpritesRenderTime = false;\n this._spritesRenderTime = new PerfCounter();\n this._capturePhysicsTime = false;\n this._physicsTime = new PerfCounter();\n this._captureAnimationsTime = false;\n this._animationsTime = new PerfCounter();\n this._captureCameraRenderTime = false;\n this._cameraRenderTime = new PerfCounter();\n // Observers\n this._onBeforeActiveMeshesEvaluationObserver = null;\n this._onAfterActiveMeshesEvaluationObserver = null;\n this._onBeforeRenderTargetsRenderObserver = null;\n this._onAfterRenderTargetsRenderObserver = null;\n this._onAfterRenderObserver = null;\n this._onBeforeDrawPhaseObserver = null;\n this._onAfterDrawPhaseObserver = null;\n this._onBeforeAnimationsObserver = null;\n this._onBeforeParticlesRenderingObserver = null;\n this._onAfterParticlesRenderingObserver = null;\n this._onBeforeSpritesRenderingObserver = null;\n this._onAfterSpritesRenderingObserver = null;\n this._onBeforePhysicsObserver = null;\n this._onAfterPhysicsObserver = null;\n this._onAfterAnimationsObserver = null;\n this._onBeforeCameraRenderObserver = null;\n this._onAfterCameraRenderObserver = null;\n // Before render\n this._onBeforeAnimationsObserver = scene.onBeforeAnimationsObservable.add(() => {\n if (this._captureActiveMeshesEvaluationTime) {\n this._activeMeshesEvaluationTime.fetchNewFrame();\n }\n if (this._captureRenderTargetsRenderTime) {\n this._renderTargetsRenderTime.fetchNewFrame();\n }\n if (this._captureFrameTime) {\n Tools.StartPerformanceCounter(\"Scene rendering\");\n this._frameTime.beginMonitoring();\n }\n if (this._captureInterFrameTime) {\n this._interFrameTime.endMonitoring();\n }\n if (this._captureParticlesRenderTime) {\n this._particlesRenderTime.fetchNewFrame();\n }\n if (this._captureSpritesRenderTime) {\n this._spritesRenderTime.fetchNewFrame();\n }\n if (this._captureAnimationsTime) {\n this._animationsTime.beginMonitoring();\n }\n if (this._captureRenderTime) {\n this._renderTime.fetchNewFrame();\n }\n if (this._captureCameraRenderTime) {\n this._cameraRenderTime.fetchNewFrame();\n }\n this.scene.getEngine()._drawCalls.fetchNewFrame();\n });\n // After render\n this._onAfterRenderObserver = scene.onAfterRenderObservable.add(() => {\n if (this._captureFrameTime) {\n Tools.EndPerformanceCounter(\"Scene rendering\");\n this._frameTime.endMonitoring();\n }\n if (this._captureRenderTime) {\n this._renderTime.endMonitoring(false);\n }\n if (this._captureInterFrameTime) {\n this._interFrameTime.beginMonitoring();\n }\n if (this._captureActiveMeshesEvaluationTime) {\n this._activeMeshesEvaluationTime.endFrame();\n }\n if (this._captureRenderTargetsRenderTime) {\n this._renderTargetsRenderTime.endFrame();\n }\n if (this._captureParticlesRenderTime) {\n this._particlesRenderTime.endFrame();\n }\n if (this._captureSpritesRenderTime) {\n this._spritesRenderTime.endFrame();\n }\n if (this._captureRenderTime) {\n this._renderTime.endFrame();\n }\n if (this._captureCameraRenderTime) {\n this._cameraRenderTime.endFrame();\n }\n });\n }\n /**\n * Dispose and release associated resources.\n */\n dispose() {\n this.scene.onAfterRenderObservable.remove(this._onAfterRenderObserver);\n this._onAfterRenderObserver = null;\n this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver);\n this._onBeforeActiveMeshesEvaluationObserver = null;\n this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver);\n this._onAfterActiveMeshesEvaluationObserver = null;\n this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver);\n this._onBeforeRenderTargetsRenderObserver = null;\n this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver);\n this._onAfterRenderTargetsRenderObserver = null;\n this.scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver);\n this._onBeforeAnimationsObserver = null;\n this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver);\n this._onBeforeParticlesRenderingObserver = null;\n this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver);\n this._onAfterParticlesRenderingObserver = null;\n if (this._onBeforeSpritesRenderingObserver) {\n this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver);\n this._onBeforeSpritesRenderingObserver = null;\n }\n if (this._onAfterSpritesRenderingObserver) {\n this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver);\n this._onAfterSpritesRenderingObserver = null;\n }\n this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver);\n this._onBeforeDrawPhaseObserver = null;\n this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver);\n this._onAfterDrawPhaseObserver = null;\n if (this._onBeforePhysicsObserver) {\n this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver);\n this._onBeforePhysicsObserver = null;\n }\n if (this._onAfterPhysicsObserver) {\n this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver);\n this._onAfterPhysicsObserver = null;\n }\n this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver);\n this._onAfterAnimationsObserver = null;\n this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver);\n this._onBeforeCameraRenderObserver = null;\n this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver);\n this._onAfterCameraRenderObserver = null;\n this.scene = null;\n }\n}\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ,kBAAkB;AACxC,SAASC,WAAW,QAAQ,wBAAwB;AACpD;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,CAAC;EAC9B;EACA;AACJ;AACA;EACI,IAAIC,iCAAiCA,CAAA,EAAG;IACpC,OAAO,IAAI,CAACC,2BAA2B;EAC3C;EACA;AACJ;AACA;EACI,IAAIC,iCAAiCA,CAAA,EAAG;IACpC,OAAO,IAAI,CAACC,kCAAkC;EAClD;EACA;AACJ;AACA;EACI,IAAID,iCAAiCA,CAACE,KAAK,EAAE;IACzC,IAAIA,KAAK,KAAK,IAAI,CAACD,kCAAkC,EAAE;MACnD;IACJ;IACA,IAAI,CAACA,kCAAkC,G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