1 |
- {"ast":null,"code":"import { __decorate } from \"../../../../tslib.es6.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { editableInPropertyPage } from \"../../../../Decorators/nodeDecorator.js\";\nimport { FrameGraphObjectRendererTask } from \"../../../Tasks/Rendering/objectRendererTask.js\";\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"./baseObjectRendererBlock.js\";\n/**\n * Block that render objects to a render target\n */\nexport class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {\n /**\n * Create a new NodeRenderGraphObjectRendererBlock\n * @param name defines the block name\n * @param frameGraph defines the hosting frame graph\n * @param scene defines the hosting scene\n * @param doNotChangeAspectRatio True (default) to not change the aspect ratio of the scene in the RTT\n */\n constructor(name, frameGraph, scene, doNotChangeAspectRatio = true) {\n super(name, frameGraph, scene);\n this._additionalConstructionParameters = [doNotChangeAspectRatio];\n this._frameGraphTask = new FrameGraphObjectRendererTask(this.name, frameGraph, scene, {\n doNotChangeAspectRatio\n });\n }\n /** True (default) to not change the aspect ratio of the scene in the RTT */\n get doNotChangeAspectRatio() {\n return this._frameGraphTask.objectRenderer.options.doNotChangeAspectRatio;\n }\n set doNotChangeAspectRatio(value) {\n this._frameGraphTask.dispose();\n this._frameGraphTask = new FrameGraphObjectRendererTask(this.name, this._frameGraph, this._scene, {\n doNotChangeAspectRatio: value\n });\n this._additionalConstructionParameters = [value];\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphObjectRendererBlock\";\n }\n}\n__decorate([editableInPropertyPage(\"Do not change aspect ratio\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\")], NodeRenderGraphObjectRendererBlock.prototype, \"doNotChangeAspectRatio\", null);\nRegisterClass(\"BABYLON.NodeRenderGraphObjectRendererBlock\", NodeRenderGraphObjectRendererBlock);","map":{"version":3,"names":["__decorate","RegisterClass","editableInPropertyPage","FrameGraphObjectRendererTask","NodeRenderGraphBaseObjectRendererBlock","NodeRenderGraphObjectRendererBlock","constructor","name","frameGraph","scene","doNotChangeAspectRatio","_additionalConstructionParameters","_frameGraphTask","objectRenderer","options","value","dispose","_frameGraph","_scene","getClassName","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js"],"sourcesContent":["import { __decorate } from \"../../../../tslib.es6.js\";\nimport { RegisterClass } from \"../../../../Misc/typeStore.js\";\nimport { editableInPropertyPage } from \"../../../../Decorators/nodeDecorator.js\";\nimport { FrameGraphObjectRendererTask } from \"../../../Tasks/Rendering/objectRendererTask.js\";\nimport { NodeRenderGraphBaseObjectRendererBlock } from \"./baseObjectRendererBlock.js\";\n/**\n * Block that render objects to a render target\n */\nexport class NodeRenderGraphObjectRendererBlock extends NodeRenderGraphBaseObjectRendererBlock {\n /**\n * Create a new NodeRenderGraphObjectRendererBlock\n * @param name defines the block name\n * @param frameGraph defines the hosting frame graph\n * @param scene defines the hosting scene\n * @param doNotChangeAspectRatio True (default) to not change the aspect ratio of the scene in the RTT\n */\n constructor(name, frameGraph, scene, doNotChangeAspectRatio = true) {\n super(name, frameGraph, scene);\n this._additionalConstructionParameters = [doNotChangeAspectRatio];\n this._frameGraphTask = new FrameGraphObjectRendererTask(this.name, frameGraph, scene, { doNotChangeAspectRatio });\n }\n /** True (default) to not change the aspect ratio of the scene in the RTT */\n get doNotChangeAspectRatio() {\n return this._frameGraphTask.objectRenderer.options.doNotChangeAspectRatio;\n }\n set doNotChangeAspectRatio(value) {\n this._frameGraphTask.dispose();\n this._frameGraphTask = new FrameGraphObjectRendererTask(this.name, this._frameGraph, this._scene, { doNotChangeAspectRatio: value });\n this._additionalConstructionParameters = [value];\n }\n /**\n * Gets the current class name\n * @returns the class name\n */\n getClassName() {\n return \"NodeRenderGraphObjectRendererBlock\";\n }\n}\n__decorate([\n editableInPropertyPage(\"Do not change aspect ratio\", 0 /* PropertyTypeForEdition.Boolean */, \"PROPERTIES\")\n], NodeRenderGraphObjectRendererBlock.prototype, \"doNotChangeAspectRatio\", null);\nRegisterClass(\"BABYLON.NodeRenderGraphObjectRendererBlock\", NodeRenderGraphObjectRendererBlock);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,sBAAsB,QAAQ,yCAAyC;AAChF,SAASC,4BAA4B,QAAQ,gDAAgD;AAC7F,SAASC,sCAAsC,QAAQ,8BAA8B;AACrF;AACA;AACA;AACA,OAAO,MAAMC,kCAAkC,SAASD,sCAAsC,CAAC;EAC3F;AACJ;AACA;AACA;AACA;AACA;AACA;EACIE,WAAWA,CAACC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAEC,sBAAsB,GAAG,IAAI,EAAE;IAChE,KAAK,CAACH,IAAI,EAAEC,UAAU,EAAEC,KAAK,CAAC;IAC9B,IAAI,CAACE,iCAAiC,GAAG,CAACD,sBAAsB,CAAC;IACjE,IAAI,CAACE,eAAe,GAAG,IAAIT,4BAA4B,CAAC,IAAI,CAACI,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAE;MAAEC;IAAuB,CAAC,CAAC;EACrH;EACA;EACA,IAAIA,sBAAsBA,CAAA,EAAG;IACzB,OAAO,IAAI,CAACE,eAAe,CAACC,cAAc,CAACC,OAAO,CAACJ,sBAAsB;EAC7E;EACA,IAAIA,sBAAsBA,CAACK,KAAK,EAAE;IAC9B,IAAI,CAACH,eAAe,CAACI,OAAO,CAAC,CAAC;IAC9B,IAAI,CAACJ,eAAe,GAAG,IAAIT,4BAA4B,CAAC,IAAI,CAACI,IAAI,EAAE,IAAI,CAACU,WAAW,EAAE,IAAI,CAACC,MAAM,EAAE;MAAER,sBAAsB,EAAEK;IAAM,CAAC,CAAC;IACpI,IAAI,CAACJ,iCAAiC,GAAG,CAACI,KAAK,CAAC;EACpD;EACA;AACJ;AACA;AACA;EACII,YAAYA,CAAA,EAAG;IACX,OAAO,oCAAoC;EAC/C;AACJ;AACAnB,UAAU,CAAC,CACPE,sBAAsB,CAAC,4BAA4B,EAAE,CAAC,CAAC,sCAAsC,YAAY,CAAC,CAC7G,EAAEG,kCAAkC,CAACe,SAAS,EAAE,wBAAwB,EAAE,IAAI,CAAC;AAChFnB,aAAa,CAAC,4CAA4C,EAAEI,kCAAkC,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|