a11231367ea9b214808e08a383cbb4226336e046b3010c0ba49b91fca80d2a2d.json 4.8 KB

1
  1. {"ast":null,"code":"import { PostProcess } from \"./postProcess.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\n/**\n * Postprocess used to generate anaglyphic rendering\n */\nexport class AnaglyphPostProcess extends PostProcess {\n /**\n * Gets a string identifying the name of the class\n * @returns \"AnaglyphPostProcess\" string\n */\n getClassName() {\n return \"AnaglyphPostProcess\";\n }\n /**\n * Creates a new AnaglyphPostProcess\n * @param name defines postprocess name\n * @param options defines creation options or target ratio scale\n * @param rigCameras defines cameras using this postprocess\n * @param samplingMode defines required sampling mode (BABYLON.Texture.NEAREST_SAMPLINGMODE by default)\n * @param engine defines hosting engine\n * @param reusable defines if the postprocess will be reused multiple times per frame\n */\n constructor(name, options, rigCameras, samplingMode, engine, reusable) {\n super(name, \"anaglyph\", null, [\"leftSampler\"], options, rigCameras[1], samplingMode, engine, reusable);\n this._passedProcess = rigCameras[0]._rigPostProcess;\n this.onApplyObservable.add(effect => {\n effect.setTextureFromPostProcess(\"leftSampler\", this._passedProcess);\n });\n }\n _gatherImports(useWebGPU, list) {\n if (useWebGPU) {\n this._webGPUReady = true;\n list.push(import(\"../ShadersWGSL/anaglyph.fragment.js\"));\n } else {\n list.push(import(\"../Shaders/anaglyph.fragment.js\"));\n }\n super._gatherImports(useWebGPU, list);\n }\n}\nRegisterClass(\"BABYLON.AnaglyphPostProcess\", AnaglyphPostProcess);","map":{"version":3,"names":["PostProcess","RegisterClass","AnaglyphPostProcess","getClassName","constructor","name","options","rigCameras","samplingMode","engine","reusable","_passedProcess","_rigPostProcess","onApplyObservable","add","effect","setTextureFromPostProcess","_gatherImports","useWebGPU","list","_webGPUReady","push"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/PostProcesses/anaglyphPostProcess.js"],"sourcesContent":["import { PostProcess } from \"./postProcess.js\";\nimport { RegisterClass } from \"../Misc/typeStore.js\";\n/**\n * Postprocess used to generate anaglyphic rendering\n */\nexport class AnaglyphPostProcess extends PostProcess {\n /**\n * Gets a string identifying the name of the class\n * @returns \"AnaglyphPostProcess\" string\n */\n getClassName() {\n return \"AnaglyphPostProcess\";\n }\n /**\n * Creates a new AnaglyphPostProcess\n * @param name defines postprocess name\n * @param options defines creation options or target ratio scale\n * @param rigCameras defines cameras using this postprocess\n * @param samplingMode defines required sampling mode (BABYLON.Texture.NEAREST_SAMPLINGMODE by default)\n * @param engine defines hosting engine\n * @param reusable defines if the postprocess will be reused multiple times per frame\n */\n constructor(name, options, rigCameras, samplingMode, engine, reusable) {\n super(name, \"anaglyph\", null, [\"leftSampler\"], options, rigCameras[1], samplingMode, engine, reusable);\n this._passedProcess = rigCameras[0]._rigPostProcess;\n this.onApplyObservable.add((effect) => {\n effect.setTextureFromPostProcess(\"leftSampler\", this._passedProcess);\n });\n }\n _gatherImports(useWebGPU, list) {\n if (useWebGPU) {\n this._webGPUReady = true;\n list.push(import(\"../ShadersWGSL/anaglyph.fragment.js\"));\n }\n else {\n list.push(import(\"../Shaders/anaglyph.fragment.js\"));\n }\n super._gatherImports(useWebGPU, list);\n }\n}\nRegisterClass(\"BABYLON.AnaglyphPostProcess\", AnaglyphPostProcess);\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,kBAAkB;AAC9C,SAASC,aAAa,QAAQ,sBAAsB;AACpD;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,SAASF,WAAW,CAAC;EACjD;AACJ;AACA;AACA;EACIG,YAAYA,CAAA,EAAG;IACX,OAAO,qBAAqB;EAChC;EACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACIC,WAAWA,CAACC,IAAI,EAAEC,OAAO,EAAEC,UAAU,EAAEC,YAAY,EAAEC,MAAM,EAAEC,QAAQ,EAAE;IACnE,KAAK,CAACL,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,aAAa,CAAC,EAAEC,OAAO,EAAEC,UAAU,CAAC,CAAC,CAAC,EAAEC,YAAY,EAAEC,MAAM,EAAEC,QAAQ,CAAC;IACtG,IAAI,CAACC,cAAc,GAAGJ,UAAU,CAAC,CAAC,CAAC,CAACK,eAAe;IACnD,IAAI,CAACC,iBAAiB,CAACC,GAAG,CAAEC,MAAM,IAAK;MACnCA,MAAM,CAACC,yBAAyB,CAAC,aAAa,EAAE,IAAI,CAACL,cAAc,CAAC;IACxE,CAAC,CAAC;EACN;EACAM,cAAcA,CAACC,SAAS,EAAEC,IAAI,EAAE;IAC5B,IAAID,SAAS,EAAE;MACX,IAAI,CAACE,YAAY,GAAG,IAAI;MACxBD,IAAI,CAACE,IAAI,CAAC,MAAM,CAAC,qCAAqC,CAAC,CAAC;IAC5D,CAAC,MACI;MACDF,IAAI,CAACE,IAAI,CAAC,MAAM,CAAC,iCAAiC,CAAC,CAAC;IACxD;IACA,KAAK,CAACJ,cAAc,CAACC,SAAS,EAAEC,IAAI,CAAC;EACzC;AACJ;AACAlB,aAAa,CAAC,6BAA6B,EAAEC,mBAAmB,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}