Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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();

Expand All @@ -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);
}

Expand All @@ -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);
}

Expand All @@ -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) {
'</a>.';
}

Expand Down
5 changes: 5 additions & 0 deletions types/three/examples/jsm/libs/zstddec.module.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export class ZSTDDecoder {
init(): Promise<void>;

decode(array: Uint8Array, uncompressedSize?: number): Uint8Array;
}
9 changes: 8 additions & 1 deletion types/three/examples/jsm/loaders/SPZLoader.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import { BufferGeometry, Loader, LoadingManager } from "three";
import { ZSTDDecoder } from "../libs/zstddec.module.js";

declare class SPZLoader extends Loader<BufferGeometry> {
constructor(manager?: LoadingManager);

parse(buffer: ArrayBuffer): BufferGeometry;
parse(
buffer: ArrayBuffer,
onLoad?: (geometry: BufferGeometry) => void,
onError?: (err: unknown) => void,
): BufferGeometry | Promise<BufferGeometry> | undefined;

parseRawSPZ(bytes: Uint8Array): BufferGeometry;

parseRawSPZV4(bytes: Uint8Array, zstd: ZSTDDecoder): BufferGeometry;
}

export { SPZLoader };
Loading