@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
47 lines (46 loc) • 2.58 kB
TypeScript
import { type Nullable } from "../../types.js";
import { type Scene } from "../../scene.js";
import { GaussianSplattingMesh } from "./gaussianSplattingMesh.js";
import { type GaussianSplattingPartProxyMesh } from "./gaussianSplattingPartProxyMesh.js";
/**
* Class used to compose multiple Gaussian Splatting meshes into a single draw call,
* with per-part world-matrix and visibility control via addPart/addParts/removePart.
*
* This is the recommended class for multi-part Gaussian Splatting use cases.
*
* Next major version: the compound mesh API (addPart/addParts/removePart) will
* move exclusively to this class and will be removed from GaussianSplattingMesh.
*/
export declare class GaussianSplattingCompoundMesh extends GaussianSplattingMesh {
/**
* Creates a new GaussianSplattingCompoundMesh
* @param name the name of the mesh
* @param url optional URL to load a Gaussian Splatting file from
* @param scene the hosting scene
* @param keepInRam whether to keep the raw splat data in RAM after uploading to GPU
*/
constructor(name: string, url?: Nullable<string>, scene?: Nullable<Scene>, keepInRam?: boolean);
/**
* Add another mesh to this compound mesh as a new part.
* The source mesh's splat data is read directly — no merged CPU buffer is constructed.
* @param other - The other mesh to add. Must be fully loaded before calling this method.
* @param disposeOther - Whether to dispose the other mesh after adding it.
* @returns a placeholder mesh that can be used to manipulate the part transform
*/
addPart(other: GaussianSplattingMesh, disposeOther?: boolean): GaussianSplattingPartProxyMesh;
/**
* Add multiple meshes to this compound mesh as new parts in a single operation.
* Splat data is written directly into texture arrays without constructing a merged CPU buffer.
* @param others - The meshes to add. Each must be fully loaded and must not be a compound.
* @param disposeOthers - Whether to dispose the other meshes after adding them.
* @returns an array of placeholder meshes that can be used to manipulate the part transforms
*/
addParts(others: GaussianSplattingMesh[], disposeOthers?: boolean): GaussianSplattingPartProxyMesh[];
/**
* Remove a part from this compound mesh.
* The remaining parts are rebuilt directly from their stored source mesh references —
* no merged CPU splat buffer is read back.
* @param index - The index of the part to remove
*/
removePart(index: number): void;
}