c923f1e657f5b8b88b72d33e193507b38a3bb8b56f508bb989a1a0d3c153403e.json 7.6 KB

1
  1. {"ast":null,"code":"import { __decorate } from \"../tslib.es6.js\";\nimport { PostProcess } from \"./postProcess.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { SerializationHelper } from \"../Misc/decorators.serialization.js\";\nimport { ThinBlackAndWhitePostProcess } from \"./thinBlackAndWhitePostProcess.js\";\n/**\n * Post process used to render in black and white\n */\nexport class BlackAndWhitePostProcess extends PostProcess {\n /**\n * Linear about to convert he result to black and white (default: 1)\n */\n get degree() {\n return this._effectWrapper.degree;\n }\n set degree(value) {\n this._effectWrapper.degree = value;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"BlackAndWhitePostProcess\" string\n */\n getClassName() {\n return \"BlackAndWhitePostProcess\";\n }\n /**\n * Creates a black and white post process\n * @see https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/usePostProcesses#black-and-white\n * @param name The name of the effect.\n * @param options The required width/height ratio to downsize to before computing the render pass.\n * @param camera The camera to apply the render pass to.\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\n * @param engine The engine which the post process will be applied. (default: current engine)\n * @param reusable If the post process can be reused on the same frame. (default: false)\n */\n constructor(name, options, camera = null, samplingMode, engine, reusable) {\n const localOptions = {\n uniforms: ThinBlackAndWhitePostProcess.Uniforms,\n size: typeof options === \"number\" ? options : undefined,\n camera,\n samplingMode,\n engine,\n reusable,\n ...options\n };\n super(name, ThinBlackAndWhitePostProcess.FragmentUrl, {\n effectWrapper: typeof options === \"number\" || !options.effectWrapper ? new ThinBlackAndWhitePostProcess(name, engine, localOptions) : undefined,\n ...localOptions\n });\n }\n /**\n * @internal\n */\n static _Parse(parsedPostProcess, targetCamera, scene, rootUrl) {\n return SerializationHelper.Parse(() => {\n return new BlackAndWhitePostProcess(parsedPostProcess.name, parsedPostProcess.options, targetCamera, parsedPostProcess.renderTargetSamplingMode, scene.getEngine(), parsedPostProcess.reusable);\n }, parsedPostProcess, scene, rootUrl);\n }\n}\n__decorate([serialize()], BlackAndWhitePostProcess.prototype, \"degree\", null);\nRegisterClass(\"BABYLON.BlackAndWhitePostProcess\", BlackAndWhitePostProcess);","map":{"version":3,"names":["__decorate","PostProcess","RegisterClass","serialize","SerializationHelper","ThinBlackAndWhitePostProcess","BlackAndWhitePostProcess","degree","_effectWrapper","value","getClassName","constructor","name","options","camera","samplingMode","engine","reusable","localOptions","uniforms","Uniforms","size","undefined","FragmentUrl","effectWrapper","_Parse","parsedPostProcess","targetCamera","scene","rootUrl","Parse","renderTargetSamplingMode","getEngine","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/PostProcesses/blackAndWhitePostProcess.js"],"sourcesContent":["import { __decorate } from \"../tslib.es6.js\";\nimport { PostProcess } from \"./postProcess.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\nimport { serialize } from \"../Misc/decorators.js\";\nimport { SerializationHelper } from \"../Misc/decorators.serialization.js\";\nimport { ThinBlackAndWhitePostProcess } from \"./thinBlackAndWhitePostProcess.js\";\n/**\n * Post process used to render in black and white\n */\nexport class BlackAndWhitePostProcess extends PostProcess {\n /**\n * Linear about to convert he result to black and white (default: 1)\n */\n get degree() {\n return this._effectWrapper.degree;\n }\n set degree(value) {\n this._effectWrapper.degree = value;\n }\n /**\n * Gets a string identifying the name of the class\n * @returns \"BlackAndWhitePostProcess\" string\n */\n getClassName() {\n return \"BlackAndWhitePostProcess\";\n }\n /**\n * Creates a black and white post process\n * @see https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/usePostProcesses#black-and-white\n * @param name The name of the effect.\n * @param options The required width/height ratio to downsize to before computing the render pass.\n * @param camera The camera to apply the render pass to.\n * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)\n * @param engine The engine which the post process will be applied. (default: current engine)\n * @param reusable If the post process can be reused on the same frame. (default: false)\n */\n constructor(name, options, camera = null, samplingMode, engine, reusable) {\n const localOptions = {\n uniforms: ThinBlackAndWhitePostProcess.Uniforms,\n size: typeof options === \"number\" ? options : undefined,\n camera,\n samplingMode,\n engine,\n reusable,\n ...options,\n };\n super(name, ThinBlackAndWhitePostProcess.FragmentUrl, {\n effectWrapper: typeof options === \"number\" || !options.effectWrapper ? new ThinBlackAndWhitePostProcess(name, engine, localOptions) : undefined,\n ...localOptions,\n });\n }\n /**\n * @internal\n */\n static _Parse(parsedPostProcess, targetCamera, scene, rootUrl) {\n return SerializationHelper.Parse(() => {\n return new BlackAndWhitePostProcess(parsedPostProcess.name, parsedPostProcess.options, targetCamera, parsedPostProcess.renderTargetSamplingMode, scene.getEngine(), parsedPostProcess.reusable);\n }, parsedPostProcess, scene, rootUrl);\n }\n}\n__decorate([\n serialize()\n], BlackAndWhitePostProcess.prototype, \"degree\", null);\nRegisterClass(\"BABYLON.BlackAndWhitePostProcess\", BlackAndWhitePostProcess);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,sBAAsB;AACpD,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,mBAAmB,QAAQ,qCAAqC;AACzE,SAASC,4BAA4B,QAAQ,mCAAmC;AAChF;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,SAASL,WAAW,CAAC;EACtD;AACJ;AACA;EACI,IAAIM,MAAMA,CAAA,EAAG;IACT,OAAO,IAAI,CAACC,cAAc,CAACD,MAAM;EACrC;EACA,IAAIA,MAAMA,CAACE,KAAK,EAAE;IACd,IAAI,CAACD,cAAc,CAACD,MAAM,GAAGE,KAAK;EACtC;EACA;AACJ;AACA;AACA;EACIC,YAAYA,CAAA,EAAG;IACX,OAAO,0BAA0B;EACrC;EACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACIC,WAAWA,CAACC,IAAI,EAAEC,OAAO,EAAEC,MAAM,GAAG,IAAI,EA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