3a344310645ed9851218a5ee50647f686e48d1993f8f1b260528d6ed1394600c.json 25 KB

1
  1. {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { EffectRenderer, EffectWrapper } from \"../Materials/effectRenderer.js\";\nimport { Tools } from \"./tools.js\";\nimport { Clamp } from \"../Maths/math.scalar.functions.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nlet _dumpToolsEngine;\nlet _enginePromise = null;\nfunction _CreateDumpRenderer() {\n return _CreateDumpRenderer2.apply(this, arguments);\n}\n/**\n * Dumps the current bound framebuffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param engine defines the hosting engine\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a void promise\n */\nfunction _CreateDumpRenderer2() {\n _CreateDumpRenderer2 = _asyncToGenerator(function* () {\n if (!_enginePromise) {\n _enginePromise = new Promise((resolve, reject) => {\n let canvas;\n let engine = null;\n const options = {\n preserveDrawingBuffer: true,\n depth: false,\n stencil: false,\n alpha: true,\n premultipliedAlpha: false,\n antialias: false,\n failIfMajorPerformanceCaveat: false\n };\n import(\"../Engines/thinEngine.js\").then(({\n ThinEngine: thinEngineClass\n }) => {\n try {\n canvas = new OffscreenCanvas(100, 100); // will be resized later\n engine = new thinEngineClass(canvas, false, options);\n } catch (e) {\n // The browser either does not support OffscreenCanvas or WebGL context in OffscreenCanvas, fallback on a regular canvas\n canvas = document.createElement(\"canvas\");\n engine = new thinEngineClass(canvas, false, options);\n }\n // remove this engine from the list of instances to avoid using it for other purposes\n EngineStore.Instances.pop();\n // However, make sure to dispose it when no other engines are left\n EngineStore.OnEnginesDisposedObservable.add(e => {\n // guaranteed to run when no other instances are left\n // only dispose if it's not the current engine\n if (engine && e !== engine && !engine.isDisposed && EngineStore.Instances.length === 0) {\n // Dump the engine and the associated resources\n Dispose();\n }\n });\n engine.getCaps().parallelShaderCompile = undefined;\n const renderer = new EffectRenderer(engine);\n import(\"../Shaders/pass.fragment.js\").then(({\n passPixelShader\n }) => {\n if (!engine) {\n reject(\"Engine is not defined\");\n return;\n }\n const wrapper = new EffectWrapper({\n engine,\n name: passPixelShader.name,\n fragmentShader: passPixelShader.shader,\n samplerNames: [\"textureSampler\"]\n });\n _dumpToolsEngine = {\n canvas,\n engine,\n renderer,\n wrapper\n };\n resolve(_dumpToolsEngine);\n });\n }).catch(reject);\n });\n }\n return yield _enginePromise;\n });\n return _CreateDumpRenderer2.apply(this, arguments);\n}\nexport function DumpFramebuffer(_x, _x2, _x3, _x4) {\n return _DumpFramebuffer.apply(this, arguments);\n}\n/**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a promise that resolve to the final data\n */\nfunction _DumpFramebuffer() {\n _DumpFramebuffer = _asyncToGenerator(function* (width, height, engine, successCallback, mimeType = \"image/png\", fileName, quality) {\n // Read the contents of the framebuffer\n const bufferView = yield engine.readPixels(0, 0, width, height);\n const data = new Uint8Array(bufferView.buffer);\n DumpData(width, height, data, successCallback, mimeType, fileName, true, undefined, quality);\n });\n return _DumpFramebuffer.apply(this, arguments);\n}\nexport function DumpDataAsync(width, height, data, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n return new Promise(resolve => {\n DumpData(width, height, data, result => resolve(result), mimeType, fileName, invertY, toArrayBuffer, quality);\n });\n}\n/**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\nexport function DumpData(width, height, data, successCallback, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n _CreateDumpRenderer().then(renderer => {\n renderer.engine.setSize(width, height, true);\n // Convert if data are float32\n if (data instanceof Float32Array) {\n const data2 = new Uint8Array(data.length);\n let n = data.length;\n while (n--) {\n const v = data[n];\n data2[n] = Math.round(Clamp(v) * 255);\n }\n data = data2;\n }\n // Create the image\n const texture = renderer.engine.createRawTexture(data, width, height, 5, false, !invertY, 1);\n renderer.renderer.setViewport();\n renderer.renderer.applyEffectWrapper(renderer.wrapper);\n renderer.wrapper.effect._bindTexture(\"textureSampler\", texture);\n renderer.renderer.draw();\n if (toArrayBuffer) {\n Tools.ToBlob(renderer.canvas, blob => {\n const fileReader = new FileReader();\n fileReader.onload = event => {\n const arrayBuffer = event.target.result;\n if (successCallback) {\n successCallback(arrayBuffer);\n }\n };\n fileReader.readAsArrayBuffer(blob);\n }, mimeType, quality);\n } else {\n Tools.EncodeScreenshotCanvasData(renderer.canvas, successCallback, mimeType, fileName, quality);\n }\n texture.dispose();\n });\n}\n/**\n * Dispose the dump tools associated resources\n */\nexport function Dispose() {\n if (_dumpToolsEngine) {\n _dumpToolsEngine.wrapper.dispose();\n _dumpToolsEngine.renderer.dispose();\n _dumpToolsEngine.engine.dispose();\n } else {\n var _enginePromise2;\n // in cases where the engine is not yet created, we need to wait for it to dispose it\n (_enginePromise2 = _enginePromise) === null || _enginePromise2 === void 0 || _enginePromise2.then(dumpToolsEngine => {\n dumpToolsEngine.wrapper.dispose();\n dumpToolsEngine.renderer.dispose();\n dumpToolsEngine.engine.dispose();\n });\n }\n _enginePromise = null;\n _dumpToolsEngine = null;\n}\n/**\n * Object containing a set of static utilities functions to dump data from a canvas\n * @deprecated use functions\n */\nexport const DumpTools = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpData,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpDataAsync,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpFramebuffer,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Dispose\n};\n/**\n * This will be executed automatically for UMD and es5.\n * If esm dev wants the side effects to execute they will have to run it manually\n * Once we build native modules those need to be exported.\n * @internal\n */\nconst initSideEffects = () => {\n // References the dependencies.\n Tools.DumpData = DumpData;\n Tools.DumpDataAsync = DumpDataAsync;\n Tools.DumpFramebuffer = DumpFramebuffer;\n};\ninitSideEffects();","map":{"version":3,"names":["EffectRenderer","EffectWrapper","Tools","Clamp","EngineStore","_dumpToolsEngine","_enginePromise","_CreateDumpRenderer","_CreateDumpRenderer2","apply","arguments","_asyncToGenerator","Promise","resolve","reject","canvas","engine","options","preserveDrawingBuffer","depth","stencil","alpha","premultipliedAlpha","antialias","failIfMajorPerformanceCaveat","then","ThinEngine","thinEngineClass","OffscreenCanvas","e","document","createElement","Instances","pop","OnEnginesDisposedObservable","add","isDisposed","length","Dispose","getCaps","parallelShaderCompile","undefined","renderer","passPixelShader","wrapper","name","fragmentShader","shader","samplerNames","catch","DumpFramebuffer","_x","_x2","_x3","_x4","_DumpFramebuffer","width","height","successCallback","mimeType","fileName","quality","bufferView","readPixels","data","Uint8Array","buffer","DumpData","DumpDataAsync","invertY","toArrayBuffer","result","setSize","Float32Array","data2","n","v","Math","round","texture","createRawTexture","setViewport","applyEffectWrapper","effect","_bindTexture","draw","ToBlob","blob","fileReader","FileReader","onload","event","arrayBuffer","target","readAsArrayBuffer","EncodeScreenshotCanvasData","dispose","_enginePromise2","dumpToolsEngine","DumpTools","initSideEffects"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Misc/dumpTools.js"],"sourcesContent":["\nimport { EffectRenderer, EffectWrapper } from \"../Materials/effectRenderer.js\";\nimport { Tools } from \"./tools.js\";\nimport { Clamp } from \"../Maths/math.scalar.functions.js\";\nimport { EngineStore } from \"../Engines/engineStore.js\";\nlet _dumpToolsEngine;\nlet _enginePromise = null;\nasync function _CreateDumpRenderer() {\n if (!_enginePromise) {\n _enginePromise = new Promise((resolve, reject) => {\n let canvas;\n let engine = null;\n const options = {\n preserveDrawingBuffer: true,\n depth: false,\n stencil: false,\n alpha: true,\n premultipliedAlpha: false,\n antialias: false,\n failIfMajorPerformanceCaveat: false,\n };\n import(\"../Engines/thinEngine.js\")\n .then(({ ThinEngine: thinEngineClass }) => {\n try {\n canvas = new OffscreenCanvas(100, 100); // will be resized later\n engine = new thinEngineClass(canvas, false, options);\n }\n catch (e) {\n // The browser either does not support OffscreenCanvas or WebGL context in OffscreenCanvas, fallback on a regular canvas\n canvas = document.createElement(\"canvas\");\n engine = new thinEngineClass(canvas, false, options);\n }\n // remove this engine from the list of instances to avoid using it for other purposes\n EngineStore.Instances.pop();\n // However, make sure to dispose it when no other engines are left\n EngineStore.OnEnginesDisposedObservable.add((e) => {\n // guaranteed to run when no other instances are left\n // only dispose if it's not the current engine\n if (engine && e !== engine && !engine.isDisposed && EngineStore.Instances.length === 0) {\n // Dump the engine and the associated resources\n Dispose();\n }\n });\n engine.getCaps().parallelShaderCompile = undefined;\n const renderer = new EffectRenderer(engine);\n import(\"../Shaders/pass.fragment.js\").then(({ passPixelShader }) => {\n if (!engine) {\n reject(\"Engine is not defined\");\n return;\n }\n const wrapper = new EffectWrapper({\n engine,\n name: passPixelShader.name,\n fragmentShader: passPixelShader.shader,\n samplerNames: [\"textureSampler\"],\n });\n _dumpToolsEngine = {\n canvas,\n engine,\n renderer,\n wrapper,\n };\n resolve(_dumpToolsEngine);\n });\n })\n .catch(reject);\n });\n }\n return await _enginePromise;\n}\n/**\n * Dumps the current bound framebuffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param engine defines the hosting engine\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a void promise\n */\nexport async function DumpFramebuffer(width, height, engine, successCallback, mimeType = \"image/png\", fileName, quality) {\n // Read the contents of the framebuffer\n const bufferView = await engine.readPixels(0, 0, width, height);\n const data = new Uint8Array(bufferView.buffer);\n DumpData(width, height, data, successCallback, mimeType, fileName, true, undefined, quality);\n}\n/**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n * @returns a promise that resolve to the final data\n */\nexport function DumpDataAsync(width, height, data, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n return new Promise((resolve) => {\n DumpData(width, height, data, (result) => resolve(result), mimeType, fileName, invertY, toArrayBuffer, quality);\n });\n}\n/**\n * Dumps an array buffer\n * @param width defines the rendering width\n * @param height defines the rendering height\n * @param data the data array\n * @param successCallback defines the callback triggered once the data are available\n * @param mimeType defines the mime type of the result\n * @param fileName defines the filename to download. If present, the result will automatically be downloaded\n * @param invertY true to invert the picture in the Y dimension\n * @param toArrayBuffer true to convert the data to an ArrayBuffer (encoded as `mimeType`) instead of a base64 string\n * @param quality The quality of the image if lossy mimeType is used (e.g. image/jpeg, image/webp). See {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob | HTMLCanvasElement.toBlob()}'s `quality` parameter.\n */\nexport function DumpData(width, height, data, successCallback, mimeType = \"image/png\", fileName, invertY = false, toArrayBuffer = false, quality) {\n _CreateDumpRenderer().then((renderer) => {\n renderer.engine.setSize(width, height, true);\n // Convert if data are float32\n if (data instanceof Float32Array) {\n const data2 = new Uint8Array(data.length);\n let n = data.length;\n while (n--) {\n const v = data[n];\n data2[n] = Math.round(Clamp(v) * 255);\n }\n data = data2;\n }\n // Create the image\n const texture = renderer.engine.createRawTexture(data, width, height, 5, false, !invertY, 1);\n renderer.renderer.setViewport();\n renderer.renderer.applyEffectWrapper(renderer.wrapper);\n renderer.wrapper.effect._bindTexture(\"textureSampler\", texture);\n renderer.renderer.draw();\n if (toArrayBuffer) {\n Tools.ToBlob(renderer.canvas, (blob) => {\n const fileReader = new FileReader();\n fileReader.onload = (event) => {\n const arrayBuffer = event.target.result;\n if (successCallback) {\n successCallback(arrayBuffer);\n }\n };\n fileReader.readAsArrayBuffer(blob);\n }, mimeType, quality);\n }\n else {\n Tools.EncodeScreenshotCanvasData(renderer.canvas, successCallback, mimeType, fileName, quality);\n }\n texture.dispose();\n });\n}\n/**\n * Dispose the dump tools associated resources\n */\nexport function Dispose() {\n if (_dumpToolsEngine) {\n _dumpToolsEngine.wrapper.dispose();\n _dumpToolsEngine.renderer.dispose();\n _dumpToolsEngine.engine.dispose();\n }\n else {\n // in cases where the engine is not yet created, we need to wait for it to dispose it\n _enginePromise?.then((dumpToolsEngine) => {\n dumpToolsEngine.wrapper.dispose();\n dumpToolsEngine.renderer.dispose();\n dumpToolsEngine.engine.dispose();\n });\n }\n _enginePromise = null;\n _dumpToolsEngine = null;\n}\n/**\n * Object containing a set of static utilities functions to dump data from a canvas\n * @deprecated use functions\n */\nexport const DumpTools = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpData,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpDataAsync,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n DumpFramebuffer,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Dispose,\n};\n/**\n * This will be executed automatically for UMD and es5.\n * If esm dev wants the side effects to execute they will have to run it manually\n * Once we build native modules those need to be exported.\n * @internal\n */\nconst initSideEffects = () => {\n // References the dependencies.\n Tools.DumpData = DumpData;\n Tools.DumpDataAsync = DumpDataAsync;\n Tools.DumpFramebuffer = DumpFramebuffer;\n};\ninitSideEffects();\n"],"mappings":";AACA,SAASA,cAAc,EAAEC,aAAa,QAAQ,gCAAgC;AAC9E,SAASC,KAAK,QAAQ,YAAY;AAClC,SAASC,KAAK,QAAQ,mCAAmC;AACzD,SAASC,WAAW,QAAQ,2BAA2B;AACvD,IAAIC,gBAAgB;AACpB,IAAIC,cAAc,GAAG,IAAI;AAAC,SACXC,mBAAmBA,CAAA;EAAA,OAAAC,oBAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AA+DlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAAAF,qBAAA;EAAAA,oBAAA,GAAAG,iBAAA,CA/DA,aAAqC;IACjC,IAAI,CAACL,cAAc,EAAE;MACjBA,cAAc,GAAG,IAAIM,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;QAC9C,IAAIC,MAAM;QACV,IAAIC,MAAM,GAAG,IAAI;QACjB,MAAMC,OAAO,GAAG;UACZC,qBAAqB,EAAE,IAAI;UAC3BC,KAAK,EAAE,KAAK;UACZC,OAAO,EAAE,KAAK;UACdC,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,CAAC,MACI;IAAA,IAAAC,eAAA;IACD;IACA,CAAAA,eAAA,GAAA3F,cAAc,cAAA2F,eAAA,eAAdA,eAAA,CAAgBxE,IAAI,CAAEyE,eAAe,IAAK;MACtCA,eAAe,CAACtD,OAAO,CAACoD,OAAO,CAAC,CAAC;MACjCE,eAAe,CAACxD,QAAQ,CAACsD,OAAO,CAAC,CAAC;MAClCE,eAAe,CAAClF,MAAM,CAACgF,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC;EACN;EACA1F,cAAc,GAAG,IAAI;EACrBD,gBAAgB,GAAG,IAAI;AAC3B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM8F,SAAS,GAAG;EACrB;EACAhC,QAAQ;EACR;EACAC,aAAa;EACb;EACAlB,eAAe;EACf;EACAZ;AACJ,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,MAAM8D,eAAe,GAAGA,CAAA,KAAM;EAC1B;EACAlG,KAAK,CAACiE,QAAQ,GAAGA,QAAQ;EACzBjE,KAAK,CAACkE,aAAa,GAAGA,aAAa;EACnClE,KAAK,CAACgD,eAAe,GAAGA,eAAe;AAC3C,CAAC;AACDkD,eAAe,CAAC,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}