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 @@ -15985,20 +15985,20 @@ index 4afa5d2d0..715c323a2 100644

render();
diff --git a/examples-testing/examples/webgpu_gaussian_splat.ts b/examples-testing/examples/webgpu_gaussian_splat.ts
index 59f413c2f..947a60694 100644
index 555853fda..b29a09f2a 100644
--- a/examples-testing/examples/webgpu_gaussian_splat.ts
+++ b/examples-testing/examples/webgpu_gaussian_splat.ts
@@ -6,12 +6,35 @@ import { SPZLoader } from 'three/addons/loaders/SPZLoader.js';
import { GaussianSplatMesh } from 'three/addons/objects/GaussianSplatMesh.js';
import { GaussianSplat } from 'three/addons/objects/GaussianSplat.js';
import { Inspector } from 'three/addons/inspector/Inspector.js';

-let camera, scene, renderer, controls, splats, splatRoot;
+let camera: THREE.PerspectiveCamera,
+ scene: THREE.Scene,
+ renderer: THREE.WebGPURenderer,
+ controls: OrbitControls,
+ splats: GaussianSplatMesh | undefined,
+ splatRoot: GaussianSplatMesh | undefined;
+ splats: GaussianSplat | undefined,
+ splatRoot: GaussianSplat | undefined;
THREE.ColorManagement.workingColorSpace = THREE.SRGBColorSpace;

const zeroVector = new THREE.Vector3();
Expand Down Expand Up @@ -16078,7 +16078,7 @@ index 59f413c2f..947a60694 100644
}

-function fitCameraToSplats(mesh, source) {
+function fitCameraToSplats(mesh: GaussianSplatMesh, source: SplatSource) {
+function fitCameraToSplats(mesh: GaussianSplat, source: SplatSource) {
mesh.updateWorldMatrix(true, false);

- const sphere = mesh.splatGeometry.boundingSphere.clone().applyMatrix4(mesh.matrixWorld);
Expand Down
2 changes: 1 addition & 1 deletion types/three/examples/jsm/Addons.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export * from "./modifiers/EdgeSplitModifier.js";
export * from "./modifiers/SimplifyModifier.js";
export * from "./modifiers/TessellateModifier.js";

export * from "./objects/GaussianSplatMesh.js";
export * from "./objects/GaussianSplat.js";
export * from "./objects/GroundedSkybox.js";
export * from "./objects/Lensflare.js";
export * from "./objects/MarchingCubes.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Group } from "three";
import { GaussianSplatMesh } from "../objects/GaussianSplatMesh.js";
import { GaussianSplat } from "../objects/GaussianSplat.js";
import { GLTFParser } from "./GLTFLoader.js";

declare class GLTFGaussianSplatLoaderExtension {
Expand All @@ -8,7 +8,7 @@ declare class GLTFGaussianSplatLoaderExtension {
name: string;
parser: GLTFParser;

loadMesh(meshIndex: number): Promise<Group | GaussianSplatMesh> | null;
loadMesh(meshIndex: number): Promise<Group | GaussianSplat> | null;
}

export { GLTFGaussianSplatLoaderExtension };
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import {
Sphere,
} from "three/webgpu";

export interface GaussianSplatMeshOptions {
export interface GaussianSplatOptions {
autoSort?: boolean | undefined;
}

declare class GaussianSplatMesh extends Mesh<InstancedBufferGeometry, NodeMaterial> {
constructor(splatGeometry: BufferGeometry, options?: GaussianSplatMeshOptions);
declare class GaussianSplat extends Mesh<InstancedBufferGeometry, NodeMaterial> {
constructor(splatGeometry: BufferGeometry, options?: GaussianSplatOptions);

readonly isGaussianSplatMesh: true;
readonly isGaussianSplat: true;

splatGeometry: BufferGeometry;
boundingBox: Box3 | null;
Expand All @@ -32,4 +32,4 @@ declare class GaussianSplatMesh extends Mesh<InstancedBufferGeometry, NodeMateri
updateSort(renderer: Renderer, camera: Camera): boolean;
}

export { GaussianSplatMesh };
export { GaussianSplat };
Loading