hilo3d 2.0.0-alpha.2 → 2.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Hilo3d 2.0.0-alpha.2
2
+ * Hilo3d 2.0.0-alpha.3
3
3
  * Copyright (c) 2017-present Alibaba Group Holding Ltd.
4
4
  * @license MIT
5
5
  */
@@ -281,4 +281,4 @@ async function D(t) {
281
281
  //#endregion
282
282
  export { m as GlslBackendOptions, g as GlslFrontend, v as GlslVersion, d as GlslWriterFlags, b as ShaderModule, f as ShaderStage, S as WgslFrontend, D as default, E as initSync };
283
283
 
284
- //# sourceMappingURL=web_naga-D4FbPGzE.js.map
284
+ //# sourceMappingURL=web_naga-CFIYl7dc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web_naga-D4FbPGzE.js","names":[],"sources":["../node_modules/web-naga/web_naga.js"],"sourcesContent":["let wasm;\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_export_0.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n}\n/**\n * @enum {0 | 1 | 2 | 4 | 16 | 32}\n */\nexport const GlslWriterFlags = Object.freeze({\n None: 0, \"0\": \"None\",\n AdjustCoordinateSpace: 1, \"1\": \"AdjustCoordinateSpace\",\n TextureShadowLod: 2, \"2\": \"TextureShadowLod\",\n DrawParameters: 4, \"4\": \"DrawParameters\",\n IncludeUnusedItems: 16, \"16\": \"IncludeUnusedItems\",\n ForcePointSize: 32, \"32\": \"ForcePointSize\",\n});\n/**\n * @enum {0 | 1 | 2}\n */\nexport const ShaderStage = Object.freeze({\n Vertex: 0, \"0\": \"Vertex\",\n Fragment: 1, \"1\": \"Fragment\",\n Compute: 2, \"2\": \"Compute\",\n});\n\nconst GlslBackendOptionsFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslbackendoptions_free(ptr >>> 0, 1));\n\nexport class GlslBackendOptions {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslBackendOptions.prototype);\n obj.__wbg_ptr = ptr;\n GlslBackendOptionsFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslBackendOptionsFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslbackendoptions_free(ptr, 0);\n }\n /**\n * @returns {GlslVersion}\n */\n get version() {\n const ret = wasm.__wbg_get_glslbackendoptions_version(this.__wbg_ptr);\n return GlslVersion.__wrap(ret);\n }\n /**\n * @param {GlslVersion} arg0\n */\n set version(arg0) {\n _assertClass(arg0, GlslVersion);\n var ptr0 = arg0.__destroy_into_raw();\n wasm.__wbg_set_glslbackendoptions_version(this.__wbg_ptr, ptr0);\n }\n /**\n * @returns {ShaderStage}\n */\n get stage() {\n const ret = wasm.__wbg_get_glslbackendoptions_stage(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {ShaderStage} arg0\n */\n set stage(arg0) {\n wasm.__wbg_set_glslbackendoptions_stage(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get flags() {\n const ret = wasm.__wbg_get_glslbackendoptions_flags(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set flags(arg0) {\n wasm.__wbg_set_glslbackendoptions_flags(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {GlslBackendOptions}\n */\n static new() {\n const ret = wasm.glslbackendoptions_new();\n return GlslBackendOptions.__wrap(ret);\n }\n}\n\nconst GlslFrontendFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslfrontend_free(ptr >>> 0, 1));\n\nexport class GlslFrontend {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslFrontend.prototype);\n obj.__wbg_ptr = ptr;\n GlslFrontendFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslFrontendFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslfrontend_free(ptr, 0);\n }\n /**\n * @returns {GlslFrontend}\n */\n static new() {\n const ret = wasm.glslfrontend_new();\n return GlslFrontend.__wrap(ret);\n }\n /**\n * @param {string} source\n * @param {ShaderStage} stage\n * @returns {ShaderModule}\n */\n parse(source, stage) {\n const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.glslfrontend_parse(this.__wbg_ptr, ptr0, len0, stage);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return ShaderModule.__wrap(ret[0]);\n }\n}\n\nconst GlslVersionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslversion_free(ptr >>> 0, 1));\n\nexport class GlslVersion {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslVersion.prototype);\n obj.__wbg_ptr = ptr;\n GlslVersionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslVersionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslversion_free(ptr, 0);\n }\n /**\n * @param {number} version\n * @returns {GlslVersion}\n */\n static desktop(version) {\n const ret = wasm.glslversion_desktop(version);\n return GlslVersion.__wrap(ret);\n }\n /**\n * @param {number} version\n * @returns {GlslVersion}\n */\n static embedded(version) {\n const ret = wasm.glslversion_embedded(version);\n return GlslVersion.__wrap(ret);\n }\n}\n\nconst ShaderModuleFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_shadermodule_free(ptr >>> 0, 1));\n\nexport class ShaderModule {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ShaderModule.prototype);\n obj.__wbg_ptr = ptr;\n ShaderModuleFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ShaderModuleFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_shadermodule_free(ptr, 0);\n }\n /**\n * @param {string} entry_point\n * @param {GlslBackendOptions} opts\n * @returns {string}\n */\n to_glsl(entry_point, opts) {\n let deferred3_0;\n let deferred3_1;\n try {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(opts, GlslBackendOptions);\n var ptr1 = opts.__destroy_into_raw();\n const ret = wasm.shadermodule_to_glsl(this.__wbg_ptr, ptr0, len0, ptr1);\n deferred3_0 = ret[0];\n deferred3_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n /**\n * @returns {string}\n */\n to_wgsl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.shadermodule_to_wgsl(this.__wbg_ptr);\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst WgslFrontendFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_wgslfrontend_free(ptr >>> 0, 1));\n\nexport class WgslFrontend {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(WgslFrontend.prototype);\n obj.__wbg_ptr = ptr;\n WgslFrontendFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n WgslFrontendFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_wgslfrontend_free(ptr, 0);\n }\n /**\n * @returns {WgslFrontend}\n */\n static new() {\n const ret = wasm.wgslfrontend_new();\n return WgslFrontend.__wrap(ret);\n }\n /**\n * @param {string} source\n * @returns {ShaderModule}\n */\n parse(source) {\n const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.wgslfrontend_parse(this.__wbg_ptr, ptr0, len0);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return ShaderModule.__wrap(ret[0]);\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_export_0;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n ;\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedUint8ArrayMemory0 = null;\n\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('web_naga_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n"],"x_google_ignoreList":[0],"mappings":";;;;;;AAAA,IAAI,GAEE,IAAqB,OAAO,cAAgB,MAAc,IAAI,YAAY,SAAS;CAAE,WAAW;CAAM,OAAO;AAAK,CAAC,IAAI,EAAE,cAAc;CAAE,MAAM,MAAM,2BAA2B;AAAE,EAAE;AAEtL,OAAO,cAAgB,OAAe,EAAkB,OAAO;AAEnE,IAAI,IAA0B;AAE9B,SAAS,IAAuB;CAI5B,QAHI,MAA4B,QAAQ,EAAwB,eAAe,OAC3E,IAA0B,IAAI,WAAW,EAAK,OAAO,MAAM,IAExD;AACX;AAEA,SAAS,EAAmB,GAAK,GAAK;CAElC,OADA,OAAc,GACP,EAAkB,OAAO,EAAqB,CAAC,CAAC,SAAS,GAAK,IAAM,CAAG,CAAC;AACnF;AAEA,IAAI,IAAkB,GAEhB,IAAqB,OAAO,cAAgB,MAAc,IAAI,YAAY,OAAO,IAAI,EAAE,cAAc;CAAE,MAAM,MAAM,2BAA2B;AAAE,EAAE,GAElJ,IAAgB,OAAO,EAAkB,cAAe,aACxD,SAAU,GAAK,GAAM;CACvB,OAAO,EAAkB,WAAW,GAAK,CAAI;AACjD,IACM,SAAU,GAAK,GAAM;CACvB,IAAM,IAAM,EAAkB,OAAO,CAAG;CAExC,OADA,EAAK,IAAI,CAAG,GACL;EACH,MAAM,EAAI;EACV,SAAS,EAAI;CACjB;AACJ;AAEA,SAAS,EAAkB,GAAK,GAAQ,GAAS;CAE7C,IAAI,MAAY,KAAA,GAAW;EACvB,IAAM,IAAM,EAAkB,OAAO,CAAG,GAClC,IAAM,EAAO,EAAI,QAAQ,CAAC,MAAM;EAGtC,OAFA,EAAqB,CAAC,CAAC,SAAS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Ac,MAAM,OAAO,YAChD,sBAAmB,IAEpB,QAAQ,KAAK,2FAA2F,IAIrG,MAAmB,WAC1B,IAAiB,IAAA,IAAA,qm18DAAA,KAAA,OAAA,KAAA,GAAA;CAErB,IAAM,IAAU,EAAkB;CAElC,CAAI,OAAO,KAAmB,YAAa,OAAO,WAAY,cAAc,aAA0B,WAAa,OAAO,OAAQ,cAAc,aAA0B,SACtK,IAAiB,MAAM,CAAc;CAKzC,IAAM,EAAE,aAAU,cAAW,MAAM,EAAW,MAAM,GAAgB,CAAO;CAE3E,OAAO,EAAoB,GAAU,CAAM;AAC/C"}
1
+ {"version":3,"file":"web_naga-CFIYl7dc.js","names":[],"sources":["../node_modules/web-naga/web_naga.js"],"sourcesContent":["let wasm;\n\nconst cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\nif (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };\n\nlet cachedUint8ArrayMemory0 = null;\n\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nlet WASM_VECTOR_LEN = 0;\n\nconst cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );\n\nconst encodeString = (typeof cachedTextEncoder.encodeInto === 'function'\n ? function (arg, view) {\n return cachedTextEncoder.encodeInto(arg, view);\n}\n : function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n});\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = encodeString(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_export_0.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nfunction _assertClass(instance, klass) {\n if (!(instance instanceof klass)) {\n throw new Error(`expected instance of ${klass.name}`);\n }\n}\n/**\n * @enum {0 | 1 | 2 | 4 | 16 | 32}\n */\nexport const GlslWriterFlags = Object.freeze({\n None: 0, \"0\": \"None\",\n AdjustCoordinateSpace: 1, \"1\": \"AdjustCoordinateSpace\",\n TextureShadowLod: 2, \"2\": \"TextureShadowLod\",\n DrawParameters: 4, \"4\": \"DrawParameters\",\n IncludeUnusedItems: 16, \"16\": \"IncludeUnusedItems\",\n ForcePointSize: 32, \"32\": \"ForcePointSize\",\n});\n/**\n * @enum {0 | 1 | 2}\n */\nexport const ShaderStage = Object.freeze({\n Vertex: 0, \"0\": \"Vertex\",\n Fragment: 1, \"1\": \"Fragment\",\n Compute: 2, \"2\": \"Compute\",\n});\n\nconst GlslBackendOptionsFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslbackendoptions_free(ptr >>> 0, 1));\n\nexport class GlslBackendOptions {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslBackendOptions.prototype);\n obj.__wbg_ptr = ptr;\n GlslBackendOptionsFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslBackendOptionsFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslbackendoptions_free(ptr, 0);\n }\n /**\n * @returns {GlslVersion}\n */\n get version() {\n const ret = wasm.__wbg_get_glslbackendoptions_version(this.__wbg_ptr);\n return GlslVersion.__wrap(ret);\n }\n /**\n * @param {GlslVersion} arg0\n */\n set version(arg0) {\n _assertClass(arg0, GlslVersion);\n var ptr0 = arg0.__destroy_into_raw();\n wasm.__wbg_set_glslbackendoptions_version(this.__wbg_ptr, ptr0);\n }\n /**\n * @returns {ShaderStage}\n */\n get stage() {\n const ret = wasm.__wbg_get_glslbackendoptions_stage(this.__wbg_ptr);\n return ret;\n }\n /**\n * @param {ShaderStage} arg0\n */\n set stage(arg0) {\n wasm.__wbg_set_glslbackendoptions_stage(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {number}\n */\n get flags() {\n const ret = wasm.__wbg_get_glslbackendoptions_flags(this.__wbg_ptr);\n return ret >>> 0;\n }\n /**\n * @param {number} arg0\n */\n set flags(arg0) {\n wasm.__wbg_set_glslbackendoptions_flags(this.__wbg_ptr, arg0);\n }\n /**\n * @returns {GlslBackendOptions}\n */\n static new() {\n const ret = wasm.glslbackendoptions_new();\n return GlslBackendOptions.__wrap(ret);\n }\n}\n\nconst GlslFrontendFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslfrontend_free(ptr >>> 0, 1));\n\nexport class GlslFrontend {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslFrontend.prototype);\n obj.__wbg_ptr = ptr;\n GlslFrontendFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslFrontendFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslfrontend_free(ptr, 0);\n }\n /**\n * @returns {GlslFrontend}\n */\n static new() {\n const ret = wasm.glslfrontend_new();\n return GlslFrontend.__wrap(ret);\n }\n /**\n * @param {string} source\n * @param {ShaderStage} stage\n * @returns {ShaderModule}\n */\n parse(source, stage) {\n const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.glslfrontend_parse(this.__wbg_ptr, ptr0, len0, stage);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return ShaderModule.__wrap(ret[0]);\n }\n}\n\nconst GlslVersionFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_glslversion_free(ptr >>> 0, 1));\n\nexport class GlslVersion {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(GlslVersion.prototype);\n obj.__wbg_ptr = ptr;\n GlslVersionFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n GlslVersionFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_glslversion_free(ptr, 0);\n }\n /**\n * @param {number} version\n * @returns {GlslVersion}\n */\n static desktop(version) {\n const ret = wasm.glslversion_desktop(version);\n return GlslVersion.__wrap(ret);\n }\n /**\n * @param {number} version\n * @returns {GlslVersion}\n */\n static embedded(version) {\n const ret = wasm.glslversion_embedded(version);\n return GlslVersion.__wrap(ret);\n }\n}\n\nconst ShaderModuleFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_shadermodule_free(ptr >>> 0, 1));\n\nexport class ShaderModule {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ShaderModule.prototype);\n obj.__wbg_ptr = ptr;\n ShaderModuleFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ShaderModuleFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_shadermodule_free(ptr, 0);\n }\n /**\n * @param {string} entry_point\n * @param {GlslBackendOptions} opts\n * @returns {string}\n */\n to_glsl(entry_point, opts) {\n let deferred3_0;\n let deferred3_1;\n try {\n const ptr0 = passStringToWasm0(entry_point, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n _assertClass(opts, GlslBackendOptions);\n var ptr1 = opts.__destroy_into_raw();\n const ret = wasm.shadermodule_to_glsl(this.__wbg_ptr, ptr0, len0, ptr1);\n deferred3_0 = ret[0];\n deferred3_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n }\n /**\n * @returns {string}\n */\n to_wgsl() {\n let deferred1_0;\n let deferred1_1;\n try {\n const ret = wasm.shadermodule_to_wgsl(this.__wbg_ptr);\n deferred1_0 = ret[0];\n deferred1_1 = ret[1];\n return getStringFromWasm0(ret[0], ret[1]);\n } finally {\n wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);\n }\n }\n}\n\nconst WgslFrontendFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_wgslfrontend_free(ptr >>> 0, 1));\n\nexport class WgslFrontend {\n\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(WgslFrontend.prototype);\n obj.__wbg_ptr = ptr;\n WgslFrontendFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n WgslFrontendFinalization.unregister(this);\n return ptr;\n }\n\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_wgslfrontend_free(ptr, 0);\n }\n /**\n * @returns {WgslFrontend}\n */\n static new() {\n const ret = wasm.wgslfrontend_new();\n return WgslFrontend.__wrap(ret);\n }\n /**\n * @param {string} source\n * @returns {ShaderModule}\n */\n parse(source) {\n const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.wgslfrontend_parse(this.__wbg_ptr, ptr0, len0);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return ShaderModule.__wrap(ret[0]);\n }\n}\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n\n } catch (e) {\n if (module.headers.get('Content-Type') != 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_export_0;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n ;\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n\n return imports;\n}\n\nfunction __wbg_init_memory(imports, memory) {\n\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedUint8ArrayMemory0 = null;\n\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n\n __wbg_init_memory(imports);\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('web_naga_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n __wbg_init_memory(imports);\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg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AM,IAAU,EAAkB;CAElC,CAAI,OAAO,KAAmB,YAAa,OAAO,WAAY,cAAc,aAA0B,WAAa,OAAO,OAAQ,cAAc,aAA0B,SACtK,IAAiB,MAAM,CAAc;CAKzC,IAAM,EAAE,aAAU,cAAW,MAAM,EAAW,MAAM,GAAgB,CAAO;CAE3E,OAAO,EAAoB,GAAU,CAAM;AAC/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hilo3d",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-alpha.3",
4
4
  "description": "A TypeScript-first 3D engine with explicit WebGL 2 and WebGPU backends.",
5
5
  "type": "module",
6
6
  "types": "./dist/Hilo3d.d.ts",