gaussian-splat-lite 0.1.0 → 0.1.2
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.
- package/CHANGELOG.md +29 -1
- package/CONTRIBUTING.md +0 -0
- package/Gaussian-Splat-Lite.svg +0 -0
- package/LICENSE +0 -0
- package/NOTICE +0 -0
- package/README.md +2 -2
- package/THIRD_PARTY_LICENSES.md +0 -0
- package/dist/assets/worker-BLd313Vj.js.map +1 -0
- package/dist/assets/worker-DieLWCoG.js.map +1 -0
- package/dist/gaussian-splat-lite.cjs +149 -137
- package/dist/gaussian-splat-lite.cjs.map +1 -1
- package/dist/gaussian-splat-lite.min.cjs +57 -222
- package/dist/gaussian-splat-lite.min.cjs.map +1 -1
- package/dist/gaussian-splat-lite.module.js +149 -137
- package/dist/gaussian-splat-lite.module.js.map +1 -1
- package/dist/gaussian-splat-lite.module.min.js +837 -987
- package/dist/gaussian-splat-lite.module.min.js.map +1 -1
- package/dist/types/GaussianSplatRenderer.d.cts +1 -38
- package/dist/types/GaussianSplatRenderer.d.ts +1 -38
- package/dist/types/SplatAccumulator.d.cts +9 -9
- package/dist/types/SplatAccumulator.d.ts +9 -9
- package/dist/types/SplatEdit.d.cts +0 -0
- package/dist/types/SplatEdit.d.ts +0 -0
- package/dist/types/SplatGeometry.d.cts +0 -0
- package/dist/types/SplatGeometry.d.ts +0 -0
- package/dist/types/SplatLoader.d.cts +0 -0
- package/dist/types/SplatLoader.d.ts +0 -0
- package/dist/types/SplatMesh.d.cts +0 -0
- package/dist/types/SplatMesh.d.ts +0 -0
- package/dist/types/SplatSource.d.cts +0 -0
- package/dist/types/SplatSource.d.ts +0 -0
- package/dist/types/SplatWorker.d.cts +0 -0
- package/dist/types/SplatWorker.d.ts +0 -0
- package/dist/types/Splats.d.cts +1 -1
- package/dist/types/Splats.d.ts +1 -1
- package/dist/types/cameraRelative.d.cts +21 -10
- package/dist/types/cameraRelative.d.ts +21 -10
- package/dist/types/defines.d.cts +0 -2
- package/dist/types/defines.d.ts +0 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +0 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shaders.d.cts +0 -0
- package/dist/types/shaders.d.ts +0 -0
- package/dist/types/splatTransform.d.cts +0 -0
- package/dist/types/splatTransform.d.ts +0 -0
- package/dist/types/utils.d.cts +0 -0
- package/dist/types/utils.d.ts +0 -0
- package/dist/types/wasm.d.cts +0 -0
- package/dist/types/wasm.d.ts +0 -0
- package/dist/types/worker.d.cts +6 -6
- package/dist/types/worker.d.ts +6 -6
- package/docs/GaussianSplatRenderer.md +0 -4
- package/docs/SplatAccumulator.md +2 -9
- package/docs/SplatEdit.md +0 -0
- package/docs/SplatFileType.md +0 -0
- package/docs/SplatLoader.md +0 -0
- package/docs/SplatMesh.md +0 -0
- package/docs/SplatSource.md +0 -0
- package/docs/Splats.md +0 -0
- package/package.json +2 -2
- package/dist/assets/worker-7HrXsEvI.js.map +0 -1
- package/dist/assets/worker-XHJGFfdJ.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,11 +7,39 @@ and this project follows [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.2] - 2026-08-25
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Standardized source and accumulator records with alpha in the low float16 lane and special-kernel shape amount in the high float16 lane of the first record's final word.
|
|
15
|
+
- Updated TypeScript and Rust encoders to preserve raw source opacity through 1000 by storing its nonlinear LoD kernel encoding in the shape-amount lane and reconstructing the raw value for public reads.
|
|
16
|
+
- Removed the separate shape texture attachment and render-time texture fetch.
|
|
17
|
+
- Reused retired sort-center mesh IDs so Worker/WASM cache slots stay bounded by active scene churn rather than lifetime mesh count.
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- Removed `SplatAccumulator.getSplatShapeTexture()` now that generated shape data is carried by the main records.
|
|
22
|
+
|
|
23
|
+
## [0.1.1] - 2026-08-24
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Standardized accumulator intermediates on the two-record representation, preserving camera-relative positions as 32-bit floats and color, alpha, and log-scale values as 16-bit floats.
|
|
28
|
+
- Kept enlarged SDF kernel shape independent from opacity and clamped generated opacity to the standard `[0, 1]` range.
|
|
29
|
+
|
|
30
|
+
### Removed
|
|
31
|
+
|
|
32
|
+
- Removed the `accumPackedSplats` option and the packed accumulator codec, shader path, and Viewer control.
|
|
33
|
+
- Removed the `focalDistance` and `apertureAngle` options together with the built-in depth-of-field shader path and Viewer controls.
|
|
34
|
+
- Removed the obsolete `LN_SCALE_MIN` and `LN_SCALE_MAX` exports that were only used by packed accumulator quantization.
|
|
35
|
+
|
|
10
36
|
## [0.1.0] - 2026-08-24
|
|
11
37
|
|
|
12
38
|
### Added
|
|
13
39
|
|
|
14
40
|
- Initial public release of the Three.js Gaussian Splatting renderer.
|
|
15
41
|
|
|
16
|
-
[Unreleased]: https://github.com/WilliamLiu-1997/Gaussian-Splat-Lite/compare/v0.1.
|
|
42
|
+
[Unreleased]: https://github.com/WilliamLiu-1997/Gaussian-Splat-Lite/compare/v0.1.2...HEAD
|
|
43
|
+
[0.1.2]: https://github.com/WilliamLiu-1997/Gaussian-Splat-Lite/compare/v0.1.1...v0.1.2
|
|
44
|
+
[0.1.1]: https://github.com/WilliamLiu-1997/Gaussian-Splat-Lite/compare/788ba378ac5e3b2358313f625c4c466edd8c6fc5...v0.1.1
|
|
17
45
|
[0.1.0]: https://github.com/WilliamLiu-1997/Gaussian-Splat-Lite/releases/tag/v0.1.0
|
package/CONTRIBUTING.md
CHANGED
|
File without changes
|
package/Gaussian-Splat-Lite.svg
CHANGED
|
File without changes
|
package/LICENSE
CHANGED
|
File without changes
|
package/NOTICE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ It works alongside standard Three.js scenes, cameras, meshes, and render loops,
|
|
|
24
24
|
- URL, in-memory byte, and standard `ReadableStream` inputs
|
|
25
25
|
- Rust/WebAssembly file decoding, depth sorting, and raycasting
|
|
26
26
|
- 3DGS rendering and optional 2DGS support
|
|
27
|
-
- Spherical harmonics,
|
|
27
|
+
- Spherical harmonics, offscreen rendering, and environment-map rendering
|
|
28
28
|
- SDF-based color and opacity editing
|
|
29
29
|
- Camera-relative rendering for large GIS/ECEF world coordinates
|
|
30
30
|
- TypeScript declarations, ESM, and CommonJS builds
|
|
@@ -162,7 +162,7 @@ const splat = new SplatMesh({
|
|
|
162
162
|
new THREE.Vector3(0, 0, 0), // center
|
|
163
163
|
new THREE.Vector3(0.2, 0.1, 0.1), // scales
|
|
164
164
|
new THREE.Quaternion(), // rotation
|
|
165
|
-
1, // opacity
|
|
165
|
+
1, // raw opacity; 0..1 alpha, >1 LoD coverage (max 1000)
|
|
166
166
|
new THREE.Color(0x4f8cff), // color
|
|
167
167
|
);
|
|
168
168
|
},
|
package/THIRD_PARTY_LICENSES.md
CHANGED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-BLd313Vj.js","sources":["../rust/gaussian-splat-rs/pkg/gaussian_splat_rs.js","../src/worker.ts"],"sourcesContent":["/* @ts-self-types=\"./gaussian_splat_rs.d.ts\" */\n\nexport class ChunkDecoder {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ChunkDecoder.prototype);\n obj.__wbg_ptr = ptr;\n ChunkDecoderFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ChunkDecoderFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_chunkdecoder_free(ptr, 0);\n }\n /**\n * @returns {any}\n */\n finish() {\n const ptr = this.__destroy_into_raw();\n const ret = wasm.chunkdecoder_finish(ptr);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n }\n /**\n * @param {Uint8Array} bytes\n */\n push(bytes) {\n const ret = wasm.chunkdecoder_push(this.__wbg_ptr, bytes);\n if (ret[1]) {\n throw takeFromExternrefTable0(ret[0]);\n }\n }\n}\nif (Symbol.dispose) ChunkDecoder.prototype[Symbol.dispose] = ChunkDecoder.prototype.free;\n\n/**\n * @param {string | null} [file_type]\n * @param {string | null} [path_name]\n * @returns {ChunkDecoder}\n */\nexport function decode_to_splats(file_type, path_name) {\n var ptr0 = isLikeNone(file_type) ? 0 : passStringToWasm0(file_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len0 = WASM_VECTOR_LEN;\n var ptr1 = isLikeNone(path_name) ? 0 : passStringToWasm0(path_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n const ret = wasm.decode_to_splats(ptr0, len0, ptr1, len1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return ChunkDecoder.__wrap(ret[0]);\n}\n\n/**\n * @returns {Uint32Array}\n */\nexport function get_raycast_buffer() {\n const ret = wasm.get_raycast_buffer();\n return ret;\n}\n\n/**\n * @returns {Uint32Array}\n */\nexport function get_raycast_buffer2() {\n const ret = wasm.get_raycast_buffer2();\n return ret;\n}\n\n/**\n * @param {number} origin_x\n * @param {number} origin_y\n * @param {number} origin_z\n * @param {number} dir_x\n * @param {number} dir_y\n * @param {number} dir_z\n * @param {number} min_opacity\n * @param {number} near\n * @param {number} far\n * @param {number} count\n * @returns {Float32Array}\n */\nexport function raycast_splat_buffers(origin_x, origin_y, origin_z, dir_x, dir_y, dir_z, min_opacity, near, far, count) {\n const ret = wasm.raycast_splat_buffers(origin_x, origin_y, origin_z, dir_x, dir_y, dir_z, min_opacity, near, far, count);\n return ret;\n}\n\n/**\n * @param {Uint32Array} update_range_indices\n * @param {Float32Array} update_centers\n * @param {Uint32Array} range_mesh_ids\n * @param {Uint32Array} range_bases\n * @param {Uint32Array} range_counts\n * @param {Float64Array} range_origins\n */\nexport function set_sort_center_state(update_range_indices, update_centers, range_mesh_ids, range_bases, range_counts, range_origins) {\n wasm.set_sort_center_state(update_range_indices, update_centers, range_mesh_ids, range_bases, range_counts, range_origins);\n}\n\n/**\n * @param {number} num_splats\n * @param {number} camera_x\n * @param {number} camera_y\n * @param {number} camera_z\n * @param {number} direction_x\n * @param {number} direction_y\n * @param {number} direction_z\n * @param {boolean} radial\n * @param {Uint32Array} ordering\n * @returns {number}\n */\nexport function sort32_centers(num_splats, camera_x, camera_y, camera_z, direction_x, direction_y, direction_z, radial, ordering) {\n const ret = wasm.sort32_centers(num_splats, camera_x, camera_y, camera_z, direction_x, direction_y, direction_z, radial, ordering);\n return ret >>> 0;\n}\n\nexport function wasm_start() {\n wasm.wasm_start();\n}\n\nfunction __wbg_get_imports() {\n const import0 = {\n __proto__: null,\n __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {\n const ret = debugString(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n },\n __wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n },\n __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n },\n __wbg_get_index_983d655608220248: function(arg0, arg1) {\n const ret = arg0[arg1 >>> 0];\n return ret;\n },\n __wbg_length_0c32cb8543c8e4c8: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_length_1e701798fdcaa3b4: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_length_526c0f6e4ebae15d: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_length_fd4646b401926788: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_new_227d7c05414eb861: function() {\n const ret = new Error();\n return ret;\n },\n __wbg_new_4f9fafbb3909af72: function() {\n const ret = new Object();\n return ret;\n },\n __wbg_new_with_length_41a22191b9bdfd66: function(arg0) {\n const ret = new Uint32Array(arg0 >>> 0);\n return ret;\n },\n __wbg_prototypesetcall_021fd89d67217368: function(arg0, arg1, arg2) {\n Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);\n },\n __wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {\n Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);\n },\n __wbg_prototypesetcall_66c8e1fb820946be: function(arg0, arg1, arg2) {\n Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);\n },\n __wbg_prototypesetcall_e42275e601e14eeb: function(arg0, arg1, arg2) {\n Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), arg2);\n },\n __wbg_set_448126769bf7c181: function(arg0, arg1, arg2) {\n arg0.set(getArrayU32FromWasm0(arg1, arg2));\n },\n __wbg_set_8ee2d34facb8466e: function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(arg0, arg1, arg2);\n return ret;\n }, arguments); },\n __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {\n const ret = arg1.stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n },\n __wbg_subarray_0f98d3fb634508ad: function(arg0, arg1, arg2) {\n const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);\n return ret;\n },\n __wbg_subarray_4342405c1ffc86d6: function(arg0, arg1, arg2) {\n const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);\n return ret;\n },\n __wbg_subarray_d51e89458b3fdbf6: function(arg0, arg1, arg2) {\n const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);\n return ret;\n },\n __wbindgen_cast_0000000000000001: function(arg0) {\n // Cast intrinsic for `F64 -> Externref`.\n const ret = arg0;\n return ret;\n },\n __wbindgen_cast_0000000000000002: function(arg0, arg1) {\n // Cast intrinsic for `Ref(Slice(F32)) -> NamedExternref(\"Float32Array\")`.\n const ret = getArrayF32FromWasm0(arg0, arg1);\n return ret;\n },\n __wbindgen_cast_0000000000000003: function(arg0, arg1) {\n // Cast intrinsic for `Ref(Slice(U32)) -> NamedExternref(\"Uint32Array\")`.\n const ret = getArrayU32FromWasm0(arg0, arg1);\n return ret;\n },\n __wbindgen_cast_0000000000000004: function(arg0, arg1) {\n // Cast intrinsic for `Ref(String) -> Externref`.\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n },\n __wbindgen_init_externref_table: function() {\n const table = wasm.__wbindgen_externrefs;\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 return {\n __proto__: null,\n \"./gaussian_splat_rs_bg.js\": import0,\n };\n}\n\nconst ChunkDecoderFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_chunkdecoder_free(ptr >>> 0, 1));\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_externrefs.set(idx, obj);\n return idx;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction getArrayF32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nfunction getArrayF64FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);\n}\n\nfunction getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet cachedDataViewMemory0 = null;\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nlet cachedFloat32ArrayMemory0 = null;\nfunction getFloat32ArrayMemory0() {\n if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {\n cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);\n }\n return cachedFloat32ArrayMemory0;\n}\n\nlet cachedFloat64ArrayMemory0 = null;\nfunction getFloat64ArrayMemory0() {\n if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {\n cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);\n }\n return cachedFloat64ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return decodeText(ptr, len);\n}\n\nlet cachedUint32ArrayMemory0 = null;\nfunction getUint32ArrayMemory0() {\n if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {\n cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);\n }\n return cachedUint32ArrayMemory0;\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction passStringToWasm0(arg, malloc, realloc) {\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 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 = cachedTextEncoder.encodeInto(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_externrefs.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\ncachedTextDecoder.decode();\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\nlet numBytesDecoded = 0;\nfunction decodeText(ptr, len) {\n numBytesDecoded += len;\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n cachedTextDecoder.decode();\n numBytesDecoded = len;\n }\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nconst cachedTextEncoder = new TextEncoder();\n\nif (!('encodeInto' in cachedTextEncoder)) {\n cachedTextEncoder.encodeInto = 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}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet wasmModule, wasm;\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n wasmModule = module;\n cachedDataViewMemory0 = null;\n cachedFloat32ArrayMemory0 = null;\n cachedFloat64ArrayMemory0 = null;\n cachedUint32ArrayMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n wasm.__wbindgen_start();\n return wasm;\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 } catch (e) {\n const validResponse = module.ok && expectedResponseType(module.type);\n\n if (validResponse && 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 { throw e; }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n\n function expectedResponseType(type) {\n switch (type) {\n case 'basic': case 'cors': case 'default': return true;\n }\n return false;\n }\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (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 if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\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 (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\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 const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync, __wbg_init as default };\n","import init_wasm, {\n type ChunkDecoder,\n decode_to_splats,\n set_sort_center_state,\n sort32_centers,\n} from \"gaussian-splat-rs\";\nimport type { SplatResult } from \"./defines\";\n\nconst rpcHandlers = {\n setSortCenterState,\n sortCenters32,\n loadSplats,\n nextChunk,\n};\nexport type RpcHandlers = typeof rpcHandlers;\n\nfunction setSortCenterState({\n updateRangeIndices,\n updateCenters,\n rangeMeshIds,\n rangeBases,\n rangeCounts,\n rangeOrigins,\n}: {\n updateRangeIndices: Uint32Array;\n updateCenters: Float32Array;\n rangeMeshIds: Uint32Array;\n rangeBases: Uint32Array;\n rangeCounts: Uint32Array;\n rangeOrigins: Float64Array;\n}) {\n set_sort_center_state(\n updateRangeIndices,\n updateCenters,\n rangeMeshIds,\n rangeBases,\n rangeCounts,\n rangeOrigins,\n );\n}\n\nfunction sortCenters32({\n numSplats,\n cameraPosition,\n direction,\n radial,\n ordering,\n}: {\n numSplats: number;\n cameraPosition: [number, number, number];\n direction: [number, number, number];\n radial: boolean;\n ordering: Uint32Array;\n}) {\n const activeSplats = sort32_centers(\n numSplats,\n cameraPosition[0],\n cameraPosition[1],\n cameraPosition[2],\n direction[0],\n direction[1],\n direction[2],\n radial,\n ordering,\n );\n return { activeSplats, ordering };\n}\n\nasync function onMessage(event: MessageEvent) {\n const {\n id,\n name,\n args,\n }: { id: unknown; name: keyof typeof rpcHandlers; args: unknown } =\n event.data;\n try {\n const handler = rpcHandlers[name] as (\n args: unknown,\n options: { sendStatus: (data: unknown) => void },\n ) => unknown | Promise<unknown>;\n if (!handler) {\n throw new Error(`Unknown worker RPC: ${name}`);\n }\n\n const sendStatus = (data: unknown) => {\n self.postMessage(\n { id, status: data },\n { transfer: getTransferable(data) },\n );\n };\n const result = await handler(args, { sendStatus });\n self.postMessage({ id, result }, { transfer: getTransferable(result) });\n } catch (error) {\n console.warn(`Worker error: ${error}`);\n self.postMessage({ id, error }, { transfer: getTransferable(error) });\n }\n}\n\nasync function decodeBytesUrl({\n decoder,\n fileBytes,\n url,\n requestHeader,\n withCredentials,\n chunked,\n chunkedLength,\n sendStatus,\n}: {\n decoder: ChunkDecoder;\n fileBytes?: Uint8Array;\n url?: string;\n requestHeader?: Record<string, string>;\n withCredentials?: boolean;\n chunked?: boolean;\n chunkedLength?: number;\n sendStatus: (data: unknown) => void;\n}) {\n let readStream: ReadableStream<Uint8Array>;\n let streamLength = 0;\n\n if (fileBytes) {\n readStream = new ReadableStream({\n start(controller) {\n controller.enqueue(fileBytes);\n controller.close();\n },\n });\n streamLength = fileBytes.length;\n } else if (url) {\n const request = new Request(url, {\n headers: requestHeader ? new Headers(requestHeader) : undefined,\n credentials: withCredentials ? \"include\" : \"same-origin\",\n });\n\n const response = await fetch(request);\n if (!response.ok || !response.body) {\n throw new Error(\n `Failed to fetch \"${url}\": ${response.status} ${response.statusText}`,\n );\n }\n readStream = response.body;\n const contentLength = Number.parseInt(\n response.headers.get(\"Content-Length\") || \"0\",\n );\n streamLength = Number.isNaN(contentLength) ? 0 : contentLength;\n } else if (chunked) {\n readStream = new ReadableStream(\n {\n async pull(controller) {\n const readNextChunk = new Promise<Uint8Array>((resolve) => {\n nextChunkWaiter = resolve;\n });\n sendStatus({ nextChunk: true });\n const chunk = await readNextChunk;\n\n if (chunk.length === 0) {\n controller.close();\n } else {\n controller.enqueue(chunk);\n }\n },\n },\n { highWaterMark: 0 },\n );\n streamLength = chunkedLength ?? 0;\n } else {\n throw new Error(\"No url or fileBytes provided\");\n }\n\n const reader = readStream.getReader();\n let loaded = 0;\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n loaded += value.length;\n sendStatus({ loaded, total: streamLength });\n decoder.push(value);\n }\n\n if (chunked && streamLength === 0) {\n sendStatus({ loaded, total: loaded });\n }\n\n return decoder.finish();\n } catch (error) {\n try {\n await reader.cancel(error);\n } catch {\n // Preserve the decoding error if stream cancellation itself fails.\n }\n throw error;\n } finally {\n reader.releaseLock();\n }\n}\n\ntype DecodedSplatResult = {\n numSplats: number;\n splat0: Uint32Array;\n splat1: Uint32Array;\n sh1?: Uint32Array;\n sh2?: Uint32Array;\n sh3a?: Uint32Array;\n sh3b?: Uint32Array;\n};\n\nfunction toSplatResult(decoded: DecodedSplatResult): SplatResult {\n return {\n numSplats: decoded.numSplats,\n splatArrays: [decoded.splat0, decoded.splat1],\n extra: {\n sh1: decoded.sh1,\n sh2: decoded.sh2,\n sh3a: decoded.sh3a,\n sh3b: decoded.sh3b,\n },\n };\n}\n\nasync function loadSplats(\n {\n url,\n requestHeader,\n withCredentials,\n fileBytes,\n fileType,\n pathName,\n chunked,\n chunkedLength,\n }: {\n url?: string;\n requestHeader?: Record<string, string>;\n withCredentials?: boolean;\n fileBytes?: Uint8Array;\n fileType?: string;\n pathName?: string;\n chunked?: boolean;\n chunkedLength?: number;\n },\n { sendStatus }: { sendStatus: (data: unknown) => void },\n) {\n const decoder = decode_to_splats(fileType, pathName ?? url);\n const decoded = await decodeBytesUrl({\n decoder,\n fileBytes,\n url,\n requestHeader,\n withCredentials,\n chunked,\n chunkedLength,\n sendStatus,\n });\n return toSplatResult(decoded as DecodedSplatResult);\n}\n\nlet nextChunkWaiter = (_chunk: Uint8Array) => {};\n\nasync function nextChunk({ chunk }: { chunk: Uint8Array }) {\n nextChunkWaiter(chunk);\n}\n\nfunction getTransferable(ctx: unknown): Transferable[] {\n const buffers: Transferable[] = [];\n const seen = new Set();\n\n function traverse(obj: unknown) {\n if (obj && typeof obj === \"object\" && !seen.has(obj)) {\n seen.add(obj);\n\n if (obj instanceof ArrayBuffer) {\n buffers.push(obj);\n } else if (ArrayBuffer.isView(obj)) {\n buffers.push(obj.buffer as ArrayBuffer);\n } else if (Array.isArray(obj)) {\n obj.forEach(traverse);\n } else {\n Object.values(obj).forEach(traverse);\n }\n }\n }\n\n traverse(ctx);\n return buffers;\n}\n\nasync function initialize() {\n let resolveWaitForModule: (value: WebAssembly.Module) => void;\n const waitForModule = new Promise<WebAssembly.Module>((resolve) => {\n resolveWaitForModule = resolve;\n });\n\n const pending: MessageEvent[] = [];\n const bufferMessage = (event: MessageEvent) => {\n if (event.data.name === \"init-wasm\") {\n resolveWaitForModule(event.data.module as WebAssembly.Module);\n return;\n }\n pending.push(event);\n };\n self.addEventListener(\"message\", bufferMessage);\n\n await init_wasm({ module_or_path: await waitForModule });\n\n self.removeEventListener(\"message\", bufferMessage);\n self.addEventListener(\"message\", onMessage);\n\n for (const event of pending) {\n onMessage(event);\n }\n pending.length = 0;\n}\n\ninitialize().catch(console.error);\n"],"names":["ChunkDecoder","ptr","obj","ChunkDecoderFinalization","wasm","ret","takeFromExternrefTable0","bytes","decode_to_splats","file_type","path_name","ptr0","isLikeNone","passStringToWasm0","len0","WASM_VECTOR_LEN","ptr1","len1","set_sort_center_state","update_range_indices","update_centers","range_mesh_ids","range_bases","range_counts","range_origins","sort32_centers","num_splats","camera_x","camera_y","camera_z","direction_x","direction_y","direction_z","radial","ordering","__wbg_get_imports","arg0","arg1","debugString","getDataViewMemory0","getStringFromWasm0","deferred0_0","deferred0_1","arg2","getArrayF64FromWasm0","getArrayU8FromWasm0","getArrayF32FromWasm0","getArrayU32FromWasm0","handleError","table","offset","addToExternrefTable0","idx","val","type","description","name","length","debug","i","builtInMatches","className","len","getFloat32ArrayMemory0","getFloat64ArrayMemory0","getUint32ArrayMemory0","getUint8ArrayMemory0","cachedDataViewMemory0","cachedFloat32ArrayMemory0","cachedFloat64ArrayMemory0","decodeText","cachedUint32ArrayMemory0","cachedUint8ArrayMemory0","f","args","e","x","arg","malloc","realloc","buf","cachedTextEncoder","mem","code","view","value","cachedTextDecoder","MAX_SAFARI_DECODE_BYTES","numBytesDecoded","__wbg_finalize_init","instance","module","__wbg_load","imports","expectedResponseType","__wbg_init","module_or_path","rpcHandlers","setSortCenterState","sortCenters32","loadSplats","nextChunk","updateRangeIndices","updateCenters","rangeMeshIds","rangeBases","rangeCounts","rangeOrigins","numSplats","cameraPosition","direction","onMessage","event","id","handler","result","data","getTransferable","error","decodeBytesUrl","decoder","fileBytes","url","requestHeader","withCredentials","chunked","chunkedLength","sendStatus","readStream","streamLength","controller","request","response","contentLength","readNextChunk","resolve","nextChunkWaiter","chunk","reader","loaded","done","toSplatResult","decoded","fileType","pathName","_chunk","ctx","buffers","seen","traverse","initialize","resolveWaitForModule","waitForModule","pending","bufferMessage","init_wasm"],"mappings":"yBAEO,MAAMA,CAAa,CACtB,OAAO,OAAOC,EAAK,CACfA,EAAMA,IAAQ,EACd,MAAMC,EAAM,OAAO,OAAOF,EAAa,SAAS,EAChD,OAAAE,EAAI,UAAYD,EAChBE,EAAyB,SAASD,EAAKA,EAAI,UAAWA,CAAG,EAClDA,CACX,CACA,oBAAqB,CACjB,MAAMD,EAAM,KAAK,UACjB,YAAK,UAAY,EACjBE,EAAyB,WAAW,IAAI,EACjCF,CACX,CACA,MAAO,CACH,MAAMA,EAAM,KAAK,mBAAkB,EACnCG,EAAK,wBAAwBH,EAAK,CAAC,CACvC,CAIA,QAAS,CACL,MAAMA,EAAM,KAAK,mBAAkB,EAC7BI,EAAMD,EAAK,oBAAoBH,CAAG,EACxC,GAAII,EAAI,CAAC,EACL,MAAMC,EAAwBD,EAAI,CAAC,CAAC,EAExC,OAAOC,EAAwBD,EAAI,CAAC,CAAC,CACzC,CAIA,KAAKE,EAAO,CACR,MAAMF,EAAMD,EAAK,kBAAkB,KAAK,UAAWG,CAAK,EACxD,GAAIF,EAAI,CAAC,EACL,MAAMC,EAAwBD,EAAI,CAAC,CAAC,CAE5C,CACJ,CACI,OAAO,UAASL,EAAa,UAAU,OAAO,OAAO,EAAIA,EAAa,UAAU,MAO7E,SAASQ,EAAiBC,EAAWC,EAAW,CACnD,IAAIC,EAAOC,EAAWH,CAAS,EAAI,EAAII,EAAkBJ,EAAWL,EAAK,kBAAmBA,EAAK,kBAAkB,EAC/GU,EAAOC,EACPC,EAAOJ,EAAWF,CAAS,EAAI,EAAIG,EAAkBH,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CuC,EAAqBvC,EAAM,KAAK,MAA4B,EAC5D,MACF,CACAyC,EAAQ,KAAKzC,CAAK,CACpB,EACA,KAAK,iBAAiB,UAAW0C,CAAa,EAE9C,MAAMC,GAAU,CAAE,eAAgB,MAAMH,EAAe,EAEvD,KAAK,oBAAoB,UAAWE,CAAa,EACjD,KAAK,iBAAiB,UAAW3C,CAAS,EAE1C,UAAWC,KAASyC,EAClB1C,EAAUC,CAAK,EAEjByC,EAAQ,OAAS,CACnB,CAEAH,KAAa,MAAM,QAAQ,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worker-DieLWCoG.js","sources":["../rust/gaussian-splat-rs/pkg/gaussian_splat_rs.js","../src/worker.ts"],"sourcesContent":["/* @ts-self-types=\"./gaussian_splat_rs.d.ts\" */\n\nexport class ChunkDecoder {\n static __wrap(ptr) {\n ptr = ptr >>> 0;\n const obj = Object.create(ChunkDecoder.prototype);\n obj.__wbg_ptr = ptr;\n ChunkDecoderFinalization.register(obj, obj.__wbg_ptr, obj);\n return obj;\n }\n __destroy_into_raw() {\n const ptr = this.__wbg_ptr;\n this.__wbg_ptr = 0;\n ChunkDecoderFinalization.unregister(this);\n return ptr;\n }\n free() {\n const ptr = this.__destroy_into_raw();\n wasm.__wbg_chunkdecoder_free(ptr, 0);\n }\n /**\n * @returns {any}\n */\n finish() {\n const ptr = this.__destroy_into_raw();\n const ret = wasm.chunkdecoder_finish(ptr);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n }\n /**\n * @param {Uint8Array} bytes\n */\n push(bytes) {\n const ret = wasm.chunkdecoder_push(this.__wbg_ptr, bytes);\n if (ret[1]) {\n throw takeFromExternrefTable0(ret[0]);\n }\n }\n}\nif (Symbol.dispose) ChunkDecoder.prototype[Symbol.dispose] = ChunkDecoder.prototype.free;\n\n/**\n * @param {string | null} [file_type]\n * @param {string | null} [path_name]\n * @returns {ChunkDecoder}\n */\nexport function decode_to_splats(file_type, path_name) {\n var ptr0 = isLikeNone(file_type) ? 0 : passStringToWasm0(file_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len0 = WASM_VECTOR_LEN;\n var ptr1 = isLikeNone(path_name) ? 0 : passStringToWasm0(path_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n const ret = wasm.decode_to_splats(ptr0, len0, ptr1, len1);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return ChunkDecoder.__wrap(ret[0]);\n}\n\n/**\n * @returns {Uint32Array}\n */\nexport function get_raycast_buffer() {\n const ret = wasm.get_raycast_buffer();\n return ret;\n}\n\n/**\n * @returns {Uint32Array}\n */\nexport function get_raycast_buffer2() {\n const ret = wasm.get_raycast_buffer2();\n return ret;\n}\n\n/**\n * @param {number} origin_x\n * @param {number} origin_y\n * @param {number} origin_z\n * @param {number} dir_x\n * @param {number} dir_y\n * @param {number} dir_z\n * @param {number} min_opacity\n * @param {number} near\n * @param {number} far\n * @param {number} count\n * @returns {Float32Array}\n */\nexport function raycast_splat_buffers(origin_x, origin_y, origin_z, dir_x, dir_y, dir_z, min_opacity, near, far, count) {\n const ret = wasm.raycast_splat_buffers(origin_x, origin_y, origin_z, dir_x, dir_y, dir_z, min_opacity, near, far, count);\n return ret;\n}\n\n/**\n * @param {Uint32Array} update_range_indices\n * @param {Float32Array} update_centers\n * @param {Uint32Array} range_mesh_ids\n * @param {Uint32Array} range_bases\n * @param {Uint32Array} range_counts\n * @param {Float64Array} range_origins\n */\nexport function set_sort_center_state(update_range_indices, update_centers, range_mesh_ids, range_bases, range_counts, range_origins) {\n wasm.set_sort_center_state(update_range_indices, update_centers, range_mesh_ids, range_bases, range_counts, range_origins);\n}\n\n/**\n * @param {number} num_splats\n * @param {number} camera_x\n * @param {number} camera_y\n * @param {number} camera_z\n * @param {number} direction_x\n * @param {number} direction_y\n * @param {number} direction_z\n * @param {boolean} radial\n * @param {Uint32Array} ordering\n * @returns {number}\n */\nexport function sort32_centers(num_splats, camera_x, camera_y, camera_z, direction_x, direction_y, direction_z, radial, ordering) {\n const ret = wasm.sort32_centers(num_splats, camera_x, camera_y, camera_z, direction_x, direction_y, direction_z, radial, ordering);\n return ret >>> 0;\n}\n\nexport function wasm_start() {\n wasm.wasm_start();\n}\n\nfunction __wbg_get_imports() {\n const import0 = {\n __proto__: null,\n __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {\n const ret = debugString(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n },\n __wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n },\n __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {\n let deferred0_0;\n let deferred0_1;\n try {\n deferred0_0 = arg0;\n deferred0_1 = arg1;\n console.error(getStringFromWasm0(arg0, arg1));\n } finally {\n wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);\n }\n },\n __wbg_get_index_983d655608220248: function(arg0, arg1) {\n const ret = arg0[arg1 >>> 0];\n return ret;\n },\n __wbg_length_0c32cb8543c8e4c8: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_length_1e701798fdcaa3b4: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_length_526c0f6e4ebae15d: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_length_fd4646b401926788: function(arg0) {\n const ret = arg0.length;\n return ret;\n },\n __wbg_new_227d7c05414eb861: function() {\n const ret = new Error();\n return ret;\n },\n __wbg_new_4f9fafbb3909af72: function() {\n const ret = new Object();\n return ret;\n },\n __wbg_new_with_length_41a22191b9bdfd66: function(arg0) {\n const ret = new Uint32Array(arg0 >>> 0);\n return ret;\n },\n __wbg_prototypesetcall_021fd89d67217368: function(arg0, arg1, arg2) {\n Float64Array.prototype.set.call(getArrayF64FromWasm0(arg0, arg1), arg2);\n },\n __wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {\n Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);\n },\n __wbg_prototypesetcall_66c8e1fb820946be: function(arg0, arg1, arg2) {\n Float32Array.prototype.set.call(getArrayF32FromWasm0(arg0, arg1), arg2);\n },\n __wbg_prototypesetcall_e42275e601e14eeb: function(arg0, arg1, arg2) {\n Uint32Array.prototype.set.call(getArrayU32FromWasm0(arg0, arg1), arg2);\n },\n __wbg_set_448126769bf7c181: function(arg0, arg1, arg2) {\n arg0.set(getArrayU32FromWasm0(arg1, arg2));\n },\n __wbg_set_8ee2d34facb8466e: function() { return handleError(function (arg0, arg1, arg2) {\n const ret = Reflect.set(arg0, arg1, arg2);\n return ret;\n }, arguments); },\n __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {\n const ret = arg1.stack;\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n },\n __wbg_subarray_0f98d3fb634508ad: function(arg0, arg1, arg2) {\n const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);\n return ret;\n },\n __wbg_subarray_4342405c1ffc86d6: function(arg0, arg1, arg2) {\n const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);\n return ret;\n },\n __wbg_subarray_d51e89458b3fdbf6: function(arg0, arg1, arg2) {\n const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);\n return ret;\n },\n __wbindgen_cast_0000000000000001: function(arg0) {\n // Cast intrinsic for `F64 -> Externref`.\n const ret = arg0;\n return ret;\n },\n __wbindgen_cast_0000000000000002: function(arg0, arg1) {\n // Cast intrinsic for `Ref(Slice(F32)) -> NamedExternref(\"Float32Array\")`.\n const ret = getArrayF32FromWasm0(arg0, arg1);\n return ret;\n },\n __wbindgen_cast_0000000000000003: function(arg0, arg1) {\n // Cast intrinsic for `Ref(Slice(U32)) -> NamedExternref(\"Uint32Array\")`.\n const ret = getArrayU32FromWasm0(arg0, arg1);\n return ret;\n },\n __wbindgen_cast_0000000000000004: function(arg0, arg1) {\n // Cast intrinsic for `Ref(String) -> Externref`.\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n },\n __wbindgen_init_externref_table: function() {\n const table = wasm.__wbindgen_externrefs;\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 return {\n __proto__: null,\n \"./gaussian_splat_rs_bg.js\": import0,\n };\n}\n\nconst ChunkDecoderFinalization = (typeof FinalizationRegistry === 'undefined')\n ? { register: () => {}, unregister: () => {} }\n : new FinalizationRegistry(ptr => wasm.__wbg_chunkdecoder_free(ptr >>> 0, 1));\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_externrefs.set(idx, obj);\n return idx;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction getArrayF32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nfunction getArrayF64FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);\n}\n\nfunction getArrayU32FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet cachedDataViewMemory0 = null;\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nlet cachedFloat32ArrayMemory0 = null;\nfunction getFloat32ArrayMemory0() {\n if (cachedFloat32ArrayMemory0 === null || cachedFloat32ArrayMemory0.byteLength === 0) {\n cachedFloat32ArrayMemory0 = new Float32Array(wasm.memory.buffer);\n }\n return cachedFloat32ArrayMemory0;\n}\n\nlet cachedFloat64ArrayMemory0 = null;\nfunction getFloat64ArrayMemory0() {\n if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {\n cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);\n }\n return cachedFloat64ArrayMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return decodeText(ptr, len);\n}\n\nlet cachedUint32ArrayMemory0 = null;\nfunction getUint32ArrayMemory0() {\n if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {\n cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);\n }\n return cachedUint32ArrayMemory0;\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction passStringToWasm0(arg, malloc, realloc) {\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 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 = cachedTextEncoder.encodeInto(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_externrefs.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\ncachedTextDecoder.decode();\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\nlet numBytesDecoded = 0;\nfunction decodeText(ptr, len) {\n numBytesDecoded += len;\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n cachedTextDecoder.decode();\n numBytesDecoded = len;\n }\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nconst cachedTextEncoder = new TextEncoder();\n\nif (!('encodeInto' in cachedTextEncoder)) {\n cachedTextEncoder.encodeInto = 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}\n\nlet WASM_VECTOR_LEN = 0;\n\nlet wasmModule, wasm;\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n wasmModule = module;\n cachedDataViewMemory0 = null;\n cachedFloat32ArrayMemory0 = null;\n cachedFloat64ArrayMemory0 = null;\n cachedUint32ArrayMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n wasm.__wbindgen_start();\n return wasm;\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 } catch (e) {\n const validResponse = module.ok && expectedResponseType(module.type);\n\n if (validResponse && 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 { throw e; }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n\n function expectedResponseType(type) {\n switch (type) {\n case 'basic': case 'cors': case 'default': return true;\n }\n return false;\n }\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (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 if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\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 (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\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 const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync, __wbg_init as default };\n","import init_wasm, {\n type ChunkDecoder,\n decode_to_splats,\n set_sort_center_state,\n sort32_centers,\n} from \"gaussian-splat-rs\";\nimport type { SplatResult } from \"./defines\";\n\nconst rpcHandlers = {\n setSortCenterState,\n sortCenters32,\n loadSplats,\n nextChunk,\n};\nexport type RpcHandlers = typeof rpcHandlers;\n\nfunction setSortCenterState({\n updateRangeIndices,\n updateCenters,\n rangeMeshIds,\n rangeBases,\n rangeCounts,\n rangeOrigins,\n}: {\n updateRangeIndices: Uint32Array;\n updateCenters: Float32Array;\n rangeMeshIds: Uint32Array;\n rangeBases: Uint32Array;\n rangeCounts: Uint32Array;\n rangeOrigins: Float64Array;\n}) {\n set_sort_center_state(\n updateRangeIndices,\n updateCenters,\n rangeMeshIds,\n rangeBases,\n rangeCounts,\n rangeOrigins,\n );\n}\n\nfunction sortCenters32({\n numSplats,\n cameraPosition,\n direction,\n radial,\n ordering,\n}: {\n numSplats: number;\n cameraPosition: [number, number, number];\n direction: [number, number, number];\n radial: boolean;\n ordering: Uint32Array;\n}) {\n const activeSplats = sort32_centers(\n numSplats,\n cameraPosition[0],\n cameraPosition[1],\n cameraPosition[2],\n direction[0],\n direction[1],\n direction[2],\n radial,\n ordering,\n );\n return { activeSplats, ordering };\n}\n\nasync function onMessage(event: MessageEvent) {\n const {\n id,\n name,\n args,\n }: { id: unknown; name: keyof typeof rpcHandlers; args: unknown } =\n event.data;\n try {\n const handler = rpcHandlers[name] as (\n args: unknown,\n options: { sendStatus: (data: unknown) => void },\n ) => unknown | Promise<unknown>;\n if (!handler) {\n throw new Error(`Unknown worker RPC: ${name}`);\n }\n\n const sendStatus = (data: unknown) => {\n self.postMessage(\n { id, status: data },\n { transfer: getTransferable(data) },\n );\n };\n const result = await handler(args, { sendStatus });\n self.postMessage({ id, result }, { transfer: getTransferable(result) });\n } catch (error) {\n console.warn(`Worker error: ${error}`);\n self.postMessage({ id, error }, { transfer: getTransferable(error) });\n }\n}\n\nasync function decodeBytesUrl({\n decoder,\n fileBytes,\n url,\n requestHeader,\n withCredentials,\n chunked,\n chunkedLength,\n sendStatus,\n}: {\n decoder: ChunkDecoder;\n fileBytes?: Uint8Array;\n url?: string;\n requestHeader?: Record<string, string>;\n withCredentials?: boolean;\n chunked?: boolean;\n chunkedLength?: number;\n sendStatus: (data: unknown) => void;\n}) {\n let readStream: ReadableStream<Uint8Array>;\n let streamLength = 0;\n\n if (fileBytes) {\n readStream = new ReadableStream({\n start(controller) {\n controller.enqueue(fileBytes);\n controller.close();\n },\n });\n streamLength = fileBytes.length;\n } else if (url) {\n const request = new Request(url, {\n headers: requestHeader ? new Headers(requestHeader) : undefined,\n credentials: withCredentials ? \"include\" : \"same-origin\",\n });\n\n const response = await fetch(request);\n if (!response.ok || !response.body) {\n throw new Error(\n `Failed to fetch \"${url}\": ${response.status} ${response.statusText}`,\n );\n }\n readStream = response.body;\n const contentLength = Number.parseInt(\n response.headers.get(\"Content-Length\") || \"0\",\n );\n streamLength = Number.isNaN(contentLength) ? 0 : contentLength;\n } else if (chunked) {\n readStream = new ReadableStream(\n {\n async pull(controller) {\n const readNextChunk = new Promise<Uint8Array>((resolve) => {\n nextChunkWaiter = resolve;\n });\n sendStatus({ nextChunk: true });\n const chunk = await readNextChunk;\n\n if (chunk.length === 0) {\n controller.close();\n } else {\n controller.enqueue(chunk);\n }\n },\n },\n { highWaterMark: 0 },\n );\n streamLength = chunkedLength ?? 0;\n } else {\n throw new Error(\"No url or fileBytes provided\");\n }\n\n const reader = readStream.getReader();\n let loaded = 0;\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n loaded += value.length;\n sendStatus({ loaded, total: streamLength });\n decoder.push(value);\n }\n\n if (chunked && streamLength === 0) {\n sendStatus({ loaded, total: loaded });\n }\n\n return decoder.finish();\n } catch (error) {\n try {\n await reader.cancel(error);\n } catch {\n // Preserve the decoding error if stream cancellation itself fails.\n }\n throw error;\n } finally {\n reader.releaseLock();\n }\n}\n\ntype DecodedSplatResult = {\n numSplats: number;\n splat0: Uint32Array;\n splat1: Uint32Array;\n sh1?: Uint32Array;\n sh2?: Uint32Array;\n sh3a?: Uint32Array;\n sh3b?: Uint32Array;\n};\n\nfunction toSplatResult(decoded: DecodedSplatResult): SplatResult {\n return {\n numSplats: decoded.numSplats,\n splatArrays: [decoded.splat0, decoded.splat1],\n extra: {\n sh1: decoded.sh1,\n sh2: decoded.sh2,\n sh3a: decoded.sh3a,\n sh3b: decoded.sh3b,\n },\n };\n}\n\nasync function loadSplats(\n {\n url,\n requestHeader,\n withCredentials,\n fileBytes,\n fileType,\n pathName,\n chunked,\n chunkedLength,\n }: {\n url?: string;\n requestHeader?: Record<string, string>;\n withCredentials?: boolean;\n fileBytes?: Uint8Array;\n fileType?: string;\n pathName?: string;\n chunked?: boolean;\n chunkedLength?: number;\n },\n { sendStatus }: { sendStatus: (data: unknown) => void },\n) {\n const decoder = decode_to_splats(fileType, pathName ?? url);\n const decoded = await decodeBytesUrl({\n decoder,\n fileBytes,\n url,\n requestHeader,\n withCredentials,\n chunked,\n chunkedLength,\n sendStatus,\n });\n return toSplatResult(decoded as DecodedSplatResult);\n}\n\nlet nextChunkWaiter = (_chunk: Uint8Array) => {};\n\nasync function nextChunk({ chunk }: { chunk: Uint8Array }) {\n nextChunkWaiter(chunk);\n}\n\nfunction getTransferable(ctx: unknown): Transferable[] {\n const buffers: Transferable[] = [];\n const seen = new Set();\n\n function traverse(obj: unknown) {\n if (obj && typeof obj === \"object\" && !seen.has(obj)) {\n seen.add(obj);\n\n if (obj instanceof ArrayBuffer) {\n buffers.push(obj);\n } else if (ArrayBuffer.isView(obj)) {\n buffers.push(obj.buffer as ArrayBuffer);\n } else if (Array.isArray(obj)) {\n obj.forEach(traverse);\n } else {\n Object.values(obj).forEach(traverse);\n }\n }\n }\n\n traverse(ctx);\n return buffers;\n}\n\nasync function initialize() {\n let resolveWaitForModule: (value: WebAssembly.Module) => void;\n const waitForModule = new Promise<WebAssembly.Module>((resolve) => {\n resolveWaitForModule = resolve;\n });\n\n const pending: MessageEvent[] = [];\n const bufferMessage = (event: MessageEvent) => {\n if (event.data.name === \"init-wasm\") {\n resolveWaitForModule(event.data.module as WebAssembly.Module);\n return;\n }\n pending.push(event);\n };\n self.addEventListener(\"message\", bufferMessage);\n\n await init_wasm({ module_or_path: await waitForModule });\n\n self.removeEventListener(\"message\", bufferMessage);\n self.addEventListener(\"message\", onMessage);\n\n for (const event of pending) {\n onMessage(event);\n }\n p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