08681c8fac7db27600c25c13ae48825969813582e7dcf9f88bd1d2cf3eb87d51.json 25 KB

1
  1. {"ast":null,"code":"import { GetDOMTextContent, IsWindowObjectExist } from \"../Misc/domManagement.js\";\nimport { getStateObject } from \"../Engines/thinEngine.functions.js\";\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { Finalize, Initialize, Process } from \"../Engines/Processors/shaderProcessor.js\";\nimport { _loadFile } from \"../Engines/abstractEngine.functions.js\";\n/**\n * Get a cached pipeline context\n * @param name the pipeline name\n * @param context the context to be used when creating the pipeline\n * @returns the cached pipeline context if it exists\n * @internal\n */\nexport function getCachedPipeline(name, context) {\n const stateObject = getStateObject(context);\n return stateObject.cachedPipelines[name];\n}\n/**\n * @internal\n */\nexport function resetCachedPipeline(pipeline) {\n const name = pipeline._name;\n const context = pipeline.context;\n if (name && context) {\n const stateObject = getStateObject(context);\n const cachedPipeline = stateObject.cachedPipelines[name];\n cachedPipeline === null || cachedPipeline === void 0 || cachedPipeline.dispose();\n delete stateObject.cachedPipelines[name];\n }\n}\n/** @internal */\nexport function _processShaderCode(processorOptions, baseName, processFinalCode, onFinalCodeReady, shaderLanguage, engine, effectContext) {\n let vertexSource;\n let fragmentSource;\n // const baseName = this.name;\n const hostDocument = IsWindowObjectExist() ? engine === null || engine === void 0 ? void 0 : engine.getHostDocument() : null;\n if (typeof baseName === \"string\") {\n vertexSource = baseName;\n } else if (baseName.vertexSource) {\n vertexSource = \"source:\" + baseName.vertexSource;\n } else if (baseName.vertexElement) {\n vertexSource = (hostDocument === null || hostDocument === void 0 ? void 0 : hostDocument.getElementById(baseName.vertexElement)) || baseName.vertexElement;\n } else {\n vertexSource = baseName.vertex || baseName;\n }\n if (typeof baseName === \"string\") {\n fragmentSource = baseName;\n } else if (baseName.fragmentSource) {\n fragmentSource = \"source:\" + baseName.fragmentSource;\n } else if (baseName.fragmentElement) {\n fragmentSource = (hostDocument === null || hostDocument === void 0 ? void 0 : hostDocument.getElementById(baseName.fragmentElement)) || baseName.fragmentElement;\n } else {\n fragmentSource = baseName.fragment || baseName;\n }\n const shaderCodes = [undefined, undefined];\n const shadersLoaded = () => {\n if (shaderCodes[0] && shaderCodes[1]) {\n processorOptions.isFragment = true;\n const [migratedVertexCode, fragmentCode] = shaderCodes;\n Process(fragmentCode, processorOptions, (migratedFragmentCode, codeBeforeMigration) => {\n if (effectContext) {\n effectContext._fragmentSourceCodeBeforeMigration = codeBeforeMigration;\n }\n if (processFinalCode) {\n migratedFragmentCode = processFinalCode(\"fragment\", migratedFragmentCode);\n }\n const finalShaders = Finalize(migratedVertexCode, migratedFragmentCode, processorOptions);\n processorOptions = null;\n const finalCode = _useFinalCode(finalShaders.vertexCode, finalShaders.fragmentCode, baseName, shaderLanguage);\n onFinalCodeReady === null || onFinalCodeReady === void 0 || onFinalCodeReady(finalCode.vertexSourceCode, finalCode.fragmentSourceCode);\n }, engine);\n }\n };\n _loadShader(vertexSource, \"Vertex\", \"\", vertexCode => {\n Initialize(processorOptions);\n Process(vertexCode, processorOptions, (migratedVertexCode, codeBeforeMigration) => {\n if (effectContext) {\n effectContext._rawVertexSourceCode = vertexCode;\n effectContext._vertexSourceCodeBeforeMigration = codeBeforeMigration;\n }\n if (processFinalCode) {\n migratedVertexCode = processFinalCode(\"vertex\", migratedVertexCode);\n }\n shaderCodes[0] = migratedVertexCode;\n shadersLoaded();\n }, engine);\n }, shaderLanguage);\n _loadShader(fragmentSource, \"Fragment\", \"Pixel\", fragmentCode => {\n if (effectContext) {\n effectContext._rawFragmentSourceCode = fragmentCode;\n }\n shaderCodes[1] = fragmentCode;\n shadersLoaded();\n }, shaderLanguage);\n}\nfunction _loadShader(shader, key, optionalKey, callback, shaderLanguage, _loadFileInjection) {\n if (typeof HTMLElement !== \"undefined\") {\n // DOM element ?\n if (shader instanceof HTMLElement) {\n const shaderCode = GetDOMTextContent(shader);\n callback(shaderCode);\n return;\n }\n }\n // Direct source ?\n if (shader.substring(0, 7) === \"source:\") {\n callback(shader.substring(7));\n return;\n }\n // Base64 encoded ?\n if (shader.substring(0, 7) === \"base64:\") {\n const shaderBinary = window.atob(shader.substring(7));\n callback(shaderBinary);\n return;\n }\n const shaderStore = ShaderStore.GetShadersStore(shaderLanguage);\n // Is in local store ?\n if (shaderStore[shader + key + \"Shader\"]) {\n callback(shaderStore[shader + key + \"Shader\"]);\n return;\n }\n if (optionalKey && shaderStore[shader + optionalKey + \"Shader\"]) {\n callback(shaderStore[shader + optionalKey + \"Shader\"]);\n return;\n }\n let shaderUrl;\n if (shader[0] === \".\" || shader[0] === \"/\" || shader.indexOf(\"http\") > -1) {\n shaderUrl = shader;\n } else {\n shaderUrl = ShaderStore.GetShadersRepository(shaderLanguage) + shader;\n }\n _loadFileInjection = _loadFileInjection || _loadFile;\n if (!_loadFileInjection) {\n // we got to this point and loadFile was not injected - throw an error\n throw new Error(\"loadFileInjection is not defined\");\n }\n // Vertex shader\n _loadFileInjection(shaderUrl + \".\" + key.toLowerCase() + \".fx\", callback);\n}\nfunction _useFinalCode(migratedVertexCode, migratedFragmentCode, baseName, shaderLanguage) {\n if (baseName) {\n const vertex = baseName.vertexElement || baseName.vertex || baseName.spectorName || baseName;\n const fragment = baseName.fragmentElement || baseName.fragment || baseName.spectorName || baseName;\n return {\n vertexSourceCode: (shaderLanguage === 1 /* ShaderLanguage.WGSL */ ? \"//\" : \"\") + \"#define SHADER_NAME vertex:\" + vertex + \"\\n\" + migratedVertexCode,\n fragmentSourceCode: (shaderLanguage === 1 /* ShaderLanguage.WGSL */ ? \"//\" : \"\") + \"#define SHADER_NAME fragment:\" + fragment + \"\\n\" + migratedFragmentCode\n };\n } else {\n return {\n vertexSourceCode: migratedVertexCode,\n fragmentSourceCode: migratedFragmentCode\n };\n }\n}\n/**\n * Creates and prepares a pipeline context\n * @internal\n */\nexport const createAndPreparePipelineContext = (options, createPipelineContext, _preparePipelineContext, _executeWhenRenderingStateIsCompiled) => {\n try {\n const pipelineContext = options.existingPipelineContext || createPipelineContext(options.shaderProcessingContext);\n pipelineContext._name = options.name;\n if (options.name && options.context) {\n const stateObject = getStateObject(options.context);\n stateObject.cachedPipelines[options.name] = pipelineContext;\n }\n // Flagged as async as we may need to delay load some processing tools\n // This does not break anything as the execution is waiting for _executeWhenRenderingStateIsCompiled\n _preparePipelineContext(pipelineContext, options.vertex, options.fragment, !!options.createAsRaw, \"\", \"\", options.rebuildRebind, options.defines, options.transformFeedbackVaryings, \"\", () => {\n _executeWhenRenderingStateIsCompiled(pipelineContext, () => {\n var _options$onRenderingS;\n (_options$onRenderingS = options.onRenderingStateCompiled) === null || _options$onRenderingS === void 0 || _options$onRenderingS.call(options, pipelineContext);\n });\n });\n return pipelineContext;\n } catch (e) {\n Logger.Error(\"Error compiling effect\");\n throw e;\n }\n};\nexport const _retryWithInterval = (condition, onSuccess, onError, step = 16, maxTimeout = 1000) => {\n const int = setInterval(() => {\n try {\n if (condition()) {\n clearInterval(int);\n onSuccess();\n }\n } catch (e) {\n clearInterval(int);\n onError === null || onError === void 0 || onError(e);\n }\n maxTimeout -= step;\n if (maxTimeout < 0) {\n clearInterval(int);\n onError === null || onError === void 0 || onError();\n }\n }, step);\n};","map":{"version":3,"names":["GetDOMTextContent","IsWindowObjectExist","getStateObject","ShaderStore","Logger","Finalize","Initialize","Process","_loadFile","getCachedPipeline","name","context","stateObject","cachedPipelines","resetCachedPipeline","pipeline","_name","cachedPipeline","dispose","_processShaderCode","processorOptions","baseName","processFinalCode","onFinalCodeReady","shaderLanguage","engine","effectContext","vertexSource","fragmentSource","hostDocument","getHostDocument","vertexElement","getElementById","vertex","fragmentElement","fragment","shaderCodes","undefined","shadersLoaded","isFragment","migratedVertexCode","fragmentCode","migratedFragmentCode","codeBeforeMigration","_fragmentSourceCodeBeforeMigration","finalShaders","finalCode","_useFinalCode","vertexCode","vertexSourceCode","fragmentSourceCode","_loadShader","_rawVertexSourceCode","_vertexSourceCodeBeforeMigration","_rawFragmentSourceCode","shader","key","optionalKey","callback","_loadFileInjection","HTMLElement","shaderCode","substring","shaderBinary","window","atob","shaderStore","GetShadersStore","shaderUrl","indexOf","GetShadersRepository","Error","toLowerCase","spectorName","createAndPreparePipelineContext","options","createPipelineContext","_preparePipelineContext","_executeWhenRenderingStateIsCompiled","pipelineContext","existingPipelineContext","shaderProcessingContext","createAsRaw","rebuildRebind","defines","transformFeedbackVaryings","_options$onRenderingS","onRenderingStateCompiled","call","e","_retryWithInterval","condition","onSuccess","onError","step","maxTimeout","int","setInterval","clearInterval"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/effect.functions.js"],"sourcesContent":["import { GetDOMTextContent, IsWindowObjectExist } from \"../Misc/domManagement.js\";\nimport { getStateObject } from \"../Engines/thinEngine.functions.js\";\nimport { ShaderStore } from \"../Engines/shaderStore.js\";\nimport { Logger } from \"../Misc/logger.js\";\nimport { Finalize, Initialize, Process } from \"../Engines/Processors/shaderProcessor.js\";\nimport { _loadFile } from \"../Engines/abstractEngine.functions.js\";\n/**\n * Get a cached pipeline context\n * @param name the pipeline name\n * @param context the context to be used when creating the pipeline\n * @returns the cached pipeline context if it exists\n * @internal\n */\nexport function getCachedPipeline(name, context) {\n const stateObject = getStateObject(context);\n return stateObject.cachedPipelines[name];\n}\n/**\n * @internal\n */\nexport function resetCachedPipeline(pipeline) {\n const name = pipeline._name;\n const context = pipeline.context;\n if (name && context) {\n const stateObject = getStateObject(context);\n const cachedPipeline = stateObject.cachedPipelines[name];\n cachedPipeline?.dispose();\n delete stateObject.cachedPipelines[name];\n }\n}\n/** @internal */\nexport function _processShaderCode(processorOptions, baseName, processFinalCode, onFinalCodeReady, shaderLanguage, engine, effectContext) {\n let vertexSource;\n let fragmentSource;\n // const baseName = this.name;\n const hostDocument = IsWindowObjectExist() ? engine?.getHostDocument() : null;\n if (typeof baseName === \"string\") {\n vertexSource = baseName;\n }\n else if (baseName.vertexSource) {\n vertexSource = \"source:\" + baseName.vertexSource;\n }\n else if (baseName.vertexElement) {\n vertexSource = hostDocument?.getElementById(baseName.vertexElement) || baseName.vertexElement;\n }\n else {\n vertexSource = baseName.vertex || baseName;\n }\n if (typeof baseName === \"string\") {\n fragmentSource = baseName;\n }\n else if (baseName.fragmentSource) {\n fragmentSource = \"source:\" + baseName.fragmentSource;\n }\n else if (baseName.fragmentElement) {\n fragmentSource = hostDocument?.getElementById(baseName.fragmentElement) || baseName.fragmentElement;\n }\n else {\n fragmentSource = baseName.fragment || baseName;\n }\n const shaderCodes = [undefined, undefined];\n const shadersLoaded = () => {\n if (shaderCodes[0] && shaderCodes[1]) {\n processorOptions.isFragment = true;\n const [migratedVertexCode, fragmentCode] = shaderCodes;\n Process(fragmentCode, processorOptions, (migratedFragmentCode, codeBeforeMigration) => {\n if (effectContext) {\n effectContext._fragmentSourceCodeBeforeMigration = codeBeforeMigration;\n }\n if (processFinalCode) {\n migratedFragmentCode = processFinalCode(\"fragment\", migratedFragmentCode);\n }\n const finalShaders = Finalize(migratedVertexCode, migratedFragmentCode, processorOptions);\n processorOptions = null;\n const finalCode = _useFinalCode(finalShaders.vertexCode, finalShaders.fragmentCode, baseName, shaderLanguage);\n onFinalCodeReady?.(finalCode.vertexSourceCode, finalCode.fragmentSourceCode);\n }, engine);\n }\n };\n _loadShader(vertexSource, \"Vertex\", \"\", (vertexCode) => {\n Initialize(processorOptions);\n Process(vertexCode, processorOptions, (migratedVertexCode, codeBeforeMigration) => {\n if (effectContext) {\n effectContext._rawVertexSourceCode = vertexCode;\n effectContext._vertexSourceCodeBeforeMigration = codeBeforeMigration;\n }\n if (processFinalCode) {\n migratedVertexCode = processFinalCode(\"vertex\", migratedVertexCode);\n }\n shaderCodes[0] = migratedVertexCode;\n shadersLoaded();\n }, engine);\n }, shaderLanguage);\n _loadShader(fragmentSource, \"Fragment\", \"Pixel\", (fragmentCode) => {\n if (effectContext) {\n effectContext._rawFragmentSourceCode = fragmentCode;\n }\n shaderCodes[1] = fragmentCode;\n shadersLoaded();\n }, shaderLanguage);\n}\nfunction _loadShader(shader, key, optionalKey, callback, shaderLanguage, _loadFileInjection) {\n if (typeof HTMLElement !== \"undefined\") {\n // DOM element ?\n if (shader instanceof HTMLElement) {\n const shaderCode = GetDOMTextContent(shader);\n callback(shaderCode);\n return;\n }\n }\n // Direct source ?\n if (shader.substring(0, 7) === \"source:\") {\n callback(shader.substring(7));\n return;\n }\n // Base64 encoded ?\n if (shader.substring(0, 7) === \"base64:\") {\n const shaderBinary = window.atob(shader.substring(7));\n callback(shaderBinary);\n return;\n }\n const shaderStore = ShaderStore.GetShadersStore(shaderLanguage);\n // Is in local store ?\n if (shaderStore[shader + key + \"Shader\"]) {\n callback(shaderStore[shader + key + \"Shader\"]);\n return;\n }\n if (optionalKey && shaderStore[shader + optionalKey + \"Shader\"]) {\n callback(shaderStore[shader + optionalKey + \"Shader\"]);\n return;\n }\n let shaderUrl;\n if (shader[0] === \".\" || shader[0] === \"/\" || shader.indexOf(\"http\") > -1) {\n shaderUrl = shader;\n }\n else {\n shaderUrl = ShaderStore.GetShadersRepository(shaderLanguage) + shader;\n }\n _loadFileInjection = _loadFileInjection || _loadFile;\n if (!_loadFileInjection) {\n // we got to this point and loadFile was not injected - throw an error\n throw new Error(\"loadFileInjection is not defined\");\n }\n // Vertex shader\n _loadFileInjection(shaderUrl + \".\" + key.toLowerCase() + \".fx\", callback);\n}\nfunction _useFinalCode(migratedVertexCode, migratedFragmentCode, baseName, shaderLanguage) {\n if (baseName) {\n const vertex = baseName.vertexElement || baseName.vertex || baseName.spectorName || baseName;\n const fragment = baseName.fragmentElement || baseName.fragment || baseName.spectorName || baseName;\n return {\n vertexSourceCode: (shaderLanguage === 1 /* ShaderLanguage.WGSL */ ? \"//\" : \"\") + \"#define SHADER_NAME vertex:\" + vertex + \"\\n\" + migratedVertexCode,\n fragmentSourceCode: (shaderLanguage === 1 /* ShaderLanguage.WGSL */ ? \"//\" : \"\") + \"#define SHADER_NAME fragment:\" + fragment + \"\\n\" + migratedFragmentCode,\n };\n }\n else {\n return {\n vertexSourceCode: migratedVertexCode,\n fragmentSourceCode: migratedFragmentCode,\n };\n }\n}\n/**\n * Creates and prepares a pipeline context\n * @internal\n */\nexport const createAndPreparePipelineContext = (options, createPipelineContext, _preparePipelineContext, _executeWhenRenderingStateIsCompiled) => {\n try {\n const pipelineContext = options.existingPipelineContext || createPipelineContext(options.shaderProcessingContext);\n pipelineContext._name = options.name;\n if (options.name && options.context) {\n const stateObject = getStateObject(options.context);\n stateObject.cachedPipelines[options.name] = pipelineContext;\n }\n // Flagged as async as we may need to delay load some processing tools\n // This does not break anything as the execution is waiting for _executeWhenRenderingStateIsCompiled\n _preparePipelineContext(pipelineContext, options.vertex, options.fragment, !!options.createAsRaw, \"\", \"\", options.rebuildRebind, options.defines, options.transformFeedbackVaryings, \"\", () => {\n _executeWhenRenderingStateIsCompiled(pipelineContext, () => {\n options.onRenderingStateCompiled?.(pipelineContext);\n });\n });\n return pipelineContext;\n }\n catch (e) {\n Logger.Error(\"Error compiling effect\");\n throw e;\n }\n};\nexport const _retryWithInterval = (condition, onSuccess, onError, step = 16, maxTimeout = 1000) => {\n const int = setInterval(() => {\n try {\n if (condition()) {\n clearInterval(int);\n onSuccess();\n }\n }\n catch (e) {\n clearInterval(int);\n onError?.(e);\n }\n maxTimeout -= step;\n if (maxTimeout < 0) {\n clearInterval(int);\n onError?.();\n }\n }, step);\n};\n"],"mappings":"AAAA,SAASA,iBAAiB,EAAEC,mBAAmB,QAAQ,0BAA0B;AACjF,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,WAAW,QAAQ,2BAA2B;AACvD,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,QAAQ,EAAEC,UAAU,EAAEC,OAAO,QAAQ,0CAA0C;AACxF,SAASC,SAAS,QAAQ,wCAAwC;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACC,IAAI,EAAEC,OAAO,EAAE;EAC7C,MAAMC,WAAW,G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