diff --git a/examples-testing/changes.patch b/examples-testing/changes.patch index 41b85c126..c5983ef06 100644 --- a/examples-testing/changes.patch +++ b/examples-testing/changes.patch @@ -15948,7 +15948,7 @@ index 4afa5d2d0..715c323a2 100644 render(); diff --git a/examples-testing/examples/webgpu_gaussian_splatting.ts b/examples-testing/examples/webgpu_gaussian_splatting.ts -index 0b2d62a18..f1a2179e6 100644 +index 59f413c2f..947a60694 100644 --- a/examples-testing/examples/webgpu_gaussian_splatting.ts +++ b/examples-testing/examples/webgpu_gaussian_splatting.ts @@ -6,12 +6,35 @@ import { SPZLoader } from 'three/addons/loaders/SPZLoader.js'; @@ -15989,7 +15989,7 @@ index 0b2d62a18..f1a2179e6 100644 millipede: { name: 'Millipede (SPLAT)', url: './models/splat/millipede.splat', -@@ -71,7 +94,7 @@ async function init() { +@@ -84,7 +107,7 @@ async function init() { controls.target.set(0, 0, 0); controls.update(); @@ -15998,7 +15998,7 @@ index 0b2d62a18..f1a2179e6 100644 gui.add(params, 'source', sourceNames) .name('Splat') .onChange(async value => { -@@ -83,7 +106,7 @@ async function init() { +@@ -96,7 +119,7 @@ async function init() { window.addEventListener('resize', onWindowResize); } @@ -16007,7 +16007,7 @@ index 0b2d62a18..f1a2179e6 100644 const source = sources[sourceKey]; const splatData = await new source.loader().loadAsync(source.url); -@@ -101,8 +124,8 @@ async function loadSplatSource(sourceKey) { +@@ -114,8 +137,8 @@ async function loadSplatSource(sourceKey) { updateLicenseInfo(source); } @@ -16018,7 +16018,7 @@ index 0b2d62a18..f1a2179e6 100644 const credit = source.credit; if (credit === undefined) { -@@ -126,24 +149,24 @@ function updateLicenseInfo(source) { +@@ -139,24 +162,24 @@ function updateLicenseInfo(source) { '.'; } diff --git a/three.js b/three.js index 426a08ea0..7f855a77b 160000 --- a/three.js +++ b/three.js @@ -1 +1 @@ -Subproject commit 426a08ea06b24218ccdc32fc3b8d46aa33c8dbf6 +Subproject commit 7f855a77b4b1733c923b8201fd1d202ea99b2d16 diff --git a/types/three/examples/jsm/libs/zstddec.module.d.ts b/types/three/examples/jsm/libs/zstddec.module.d.ts new file mode 100644 index 000000000..b3dc97036 --- /dev/null +++ b/types/three/examples/jsm/libs/zstddec.module.d.ts @@ -0,0 +1,5 @@ +export class ZSTDDecoder { + init(): Promise; + + decode(array: Uint8Array, uncompressedSize?: number): Uint8Array; +} diff --git a/types/three/examples/jsm/loaders/SPZLoader.d.ts b/types/three/examples/jsm/loaders/SPZLoader.d.ts index b2c7d2918..ae56ad704 100644 --- a/types/three/examples/jsm/loaders/SPZLoader.d.ts +++ b/types/three/examples/jsm/loaders/SPZLoader.d.ts @@ -1,11 +1,18 @@ import { BufferGeometry, Loader, LoadingManager } from "three"; +import { ZSTDDecoder } from "../libs/zstddec.module.js"; declare class SPZLoader extends Loader { constructor(manager?: LoadingManager); - parse(buffer: ArrayBuffer): BufferGeometry; + parse( + buffer: ArrayBuffer, + onLoad?: (geometry: BufferGeometry) => void, + onError?: (err: unknown) => void, + ): BufferGeometry | Promise | undefined; parseRawSPZ(bytes: Uint8Array): BufferGeometry; + + parseRawSPZV4(bytes: Uint8Array, zstd: ZSTDDecoder): BufferGeometry; } export { SPZLoader };