117341f160663f228cf4a45120bf2bcd6fe5404e41c0e54c1eef801ad0bc748d.json 6.9 KB

1
  1. {"ast":null,"code":"import { SceneComponentConstants } from \"../../sceneComponent.js\";\nimport { PostProcessRenderPipelineManager } from \"./postProcessRenderPipelineManager.js\";\nimport { Scene } from \"../../scene.js\";\nObject.defineProperty(Scene.prototype, \"postProcessRenderPipelineManager\", {\n get: function () {\n if (!this._postProcessRenderPipelineManager) {\n // Register the G Buffer component to the scene.\n let component = this._getComponent(SceneComponentConstants.NAME_POSTPROCESSRENDERPIPELINEMANAGER);\n if (!component) {\n component = new PostProcessRenderPipelineManagerSceneComponent(this);\n this._addComponent(component);\n }\n this._postProcessRenderPipelineManager = new PostProcessRenderPipelineManager();\n }\n return this._postProcessRenderPipelineManager;\n },\n enumerable: true,\n configurable: true\n});\n/**\n * Defines the Render Pipeline scene component responsible to rendering pipelines\n */\nexport class PostProcessRenderPipelineManagerSceneComponent {\n /**\n * Creates a new instance of the component for the given scene\n * @param scene Defines the scene to register the component in\n */\n constructor(scene) {\n /**\n * The component name helpful to identify the component in the list of scene components.\n */\n this.name = SceneComponentConstants.NAME_POSTPROCESSRENDERPIPELINEMANAGER;\n this.scene = scene;\n }\n /**\n * Registers the component in a given scene\n */\n register() {\n this.scene._gatherRenderTargetsStage.registerStep(SceneComponentConstants.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER, this, this._gatherRenderTargets);\n }\n /**\n * Rebuilds the elements related to this component in case of\n * context lost for instance.\n */\n rebuild() {\n if (this.scene._postProcessRenderPipelineManager) {\n this.scene._postProcessRenderPipelineManager._rebuild();\n }\n }\n /**\n * Disposes the component and the associated resources\n */\n dispose() {\n if (this.scene._postProcessRenderPipelineManager) {\n this.scene._postProcessRenderPipelineManager.dispose();\n }\n }\n _gatherRenderTargets() {\n if (this.scene._postProcessRenderPipelineManager) {\n this.scene._postProcessRenderPipelineManager.update();\n }\n }\n}","map":{"version":3,"names":["SceneComponentConstants","PostProcessRenderPipelineManager","Scene","Object","defineProperty","prototype","get","_postProcessRenderPipelineManager","component","_getComponent","NAME_POSTPROCESSRENDERPIPELINEMANAGER","PostProcessRenderPipelineManagerSceneComponent","_addComponent","enumerable","configurable","constructor","scene","name","register","_gatherRenderTargetsStage","registerStep","STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER","_gatherRenderTargets","rebuild","_rebuild","dispose","update"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/PostProcesses/RenderPipeline/postProcessRenderPipelineManagerSceneComponent.js"],"sourcesContent":["import { SceneComponentConstants } from \"../../sceneComponent.js\";\nimport { PostProcessRenderPipelineManager } from \"./postProcessRenderPipelineManager.js\";\nimport { Scene } from \"../../scene.js\";\nObject.defineProperty(Scene.prototype, \"postProcessRenderPipelineManager\", {\n get: function () {\n if (!this._postProcessRenderPipelineManager) {\n // Register the G Buffer component to the scene.\n let component = this._getComponent(SceneComponentConstants.NAME_POSTPROCESSRENDERPIPELINEMANAGER);\n if (!component) {\n component = new PostProcessRenderPipelineManagerSceneComponent(this);\n this._addComponent(component);\n }\n this._postProcessRenderPipelineManager = new PostProcessRenderPipelineManager();\n }\n return this._postProcessRenderPipelineManager;\n },\n enumerable: true,\n configurable: true,\n});\n/**\n * Defines the Render Pipeline scene component responsible to rendering pipelines\n */\nexport class PostProcessRenderPipelineManagerSceneComponent {\n /**\n * Creates a new instance of the component for the given scene\n * @param scene Defines the scene to register the component in\n */\n constructor(scene) {\n /**\n * The component name helpful to identify the component in the list of scene components.\n */\n this.name = SceneComponentConstants.NAME_POSTPROCESSRENDERPIPELINEMANAGER;\n this.scene = scene;\n }\n /**\n * Registers the component in a given scene\n */\n register() {\n this.scene._gatherRenderTargetsStage.registerStep(SceneComponentConstants.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER, this, this._gatherRenderTargets);\n }\n /**\n * Rebuilds the elements related to this component in case of\n * context lost for instance.\n */\n rebuild() {\n if (this.scene._postProcessRenderPipelineManager) {\n this.scene._postProcessRenderPipelineManager._rebuild();\n }\n }\n /**\n * Disposes the component and the associated resources\n */\n dispose() {\n if (this.scene._postProcessRenderPipelineManager) {\n this.scene._postProcessRenderPipelineManager.dispose();\n }\n }\n _gatherRenderTargets() {\n if (this.scene._postProcessRenderPipelineManager) {\n this.scene._postProcessRenderPipelineManager.update();\n }\n }\n}\n"],"mappings":"AAAA,SAASA,uBAAuB,QAAQ,yBAAyB;AACjE,SAASC,gCAAgC,QAAQ,uCAAuC;AACxF,SAASC,KAAK,QAAQ,gBAAgB;AACtCC,MAAM,CAACC,cAAc,CAACF,KAAK,CAACG,SAAS,EAAE,kCAAkC,EAAE;EACvEC,GAAG,EAAE,SAAAA,CAAA,EAAY;IACb,IAAI,CAAC,IAAI,CAACC,iCAAiC,EAAE;MACzC;MACA,IAAIC,SAAS,GAAG,IAAI,CAACC,aAAa,CAACT,uBAAuB,CAACU,qCAAqC,CAAC;MACjG,IAAI,CAACF,SAAS,EAAE;QACZA,SAAS,GAAG,IAAIG,8CAA8C,CAAC,IAAI,CAAC;QACpE,IAAI,CAACC,aAAa,CAACJ,SAAS,CAAC;MACjC;MACA,IAAI,CAACD,iCAAiC,GAAG,IAAIN,gCAAgC,CAAC,CAAC;IACnF;IACA,OAAO,IAAI,CAACM,iCAAiC;EACjD,CAAC;EACDM,UAAU,EAAE,IAAI;EAChBC,YAAY,EAAE;AAClB,CAAC,CAAC;AACF;AACA;AACA;AACA,OAAO,MAAMH,8CAA8C,CAAC;EACxD;AACJ;AACA;AACA;EACII,WAAWA,CAACC,KAAK,EAAE;IACf;AACR;AACA;IACQ,IAAI,CAACC,IAAI,GAAGjB,uBAAuB,CAACU,qCAAqC;IACzE,IAAI,CAACM,KAAK,GAAGA,KAAK;EACtB;EACA;AACJ;AACA;EACIE,QAAQA,CAAA,EAAG;IACP,IAAI,CAACF,KAAK,CAACG,yBAAyB,CAACC,YAAY,CAACpB,uBAAuB,CAACqB,yDAAyD,EAAE,IAAI,EAAE,IAAI,CAACC,oBAAoB,CAAC;EACzK;EACA;AACJ;AACA;AACA;EACIC,OAAOA,CAAA,EAAG;IACN,IAAI,IAAI,CAACP,KAAK,CAACT,iCAAiC,EAAE;MAC9C,IAAI,CAACS,KAAK,CAACT,iCAAiC,CAACiB,QAAQ,CAAC,CAAC;IAC3D;EACJ;EACA;AACJ;AACA;EACIC,OAAOA,CAAA,EAAG;IACN,IAAI,IAAI,CAACT,KAAK,CAACT,iCAAiC,EAAE;MAC9C,IAAI,CAACS,KAAK,CAACT,iCAAiC,CAACkB,OAAO,CAAC,CAAC;IAC1D;EACJ;EACAH,oBAAoBA,CAAA,EAAG;IACnB,IAAI,IAAI,CAACN,KAAK,CAACT,iCAAiC,EAAE;MAC9C,IAAI,CAACS,KAAK,CAACT,iCAAiC,CAACmB,MAAM,CAAC,CAAC;IACzD;EACJ;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}