API

Type Alias SPLATLoadingOptions

Options for loading Gaussian Splatting and PLY files

type SPLATLoadingOptions = {
    deflateURL?: string;
    disableAutoCameraLimits?: boolean;
    fflate?: unknown;
    flipY?: boolean;
    gaussianSplattingMesh?: WebXRSpatialLayerType;
    keepInRam?: boolean;
    needsRotationScaleTextures?: boolean;
    spzLibraryUrl?: string;
    useSogTextures?: boolean;
}
Index
deflateURL?: string

URL to load fflate from. If null or undefined, will load from unpkg.com (https://unpkg.com/fflate/umd/index.js)

disableAutoCameraLimits?: boolean

Disable automatic camera limits from being applied if they exist in the splat file

fflate?: unknown

Instance of fflate to avoid dynamically loading of the lib to global if needed, useful for bundler users.

import * as fflate from 'fflate';
flipY?: boolean

Spatial Y Flip for splat position and orientation

gaussianSplattingMesh?: WebXRSpatialLayerType

Mesh that will be used to load data instead of creating a new one

keepInRam?: boolean

Defines if buffers should be kept in memory for editing purposes

needsRotationScaleTextures?: boolean

Generate rotation and scale matrix textures required for voxel-based IBL shadows. Required for IBL shadows to work if keepInRam is false.

spzLibraryUrl?: string

URL to load the spz WASM ES module from (e.g. the @adobe/spz package). When provided, the WASM-based SPZ loader is used, which supports extra features such as antialiasing metadata, and vendor-specific extensions such as safe-orbit camera limits. Defaults to the @adobe/spz unpkg URL when WebAssembly is supported, and undefined otherwise. Set to undefined to force the built-in manual SPZ parser regardless of WebAssembly support.

Setting the URL directly on the loader options
spzLibraryUrl: "https://unpkg.com/@adobe/spz@0.2.0/dist/spz.js"
useSogTextures?: boolean

Load SOG files as raw GPU textures and dequantize in the shader. Skips the CPU decode pass and yields much faster load times. Requires WebGL2 / WebGPU. Defaults to false (CPU decode).