GaussianSplats class Gaussian splatting

A loaded Gaussian splat set, the decoded arrays plus the GPU textures the splat shaders fetch from.

Load one with fromAsset or fromBytes (decoded and packed on a background isolate), or build one procedurally with fromData, then attach it through a SplatComponent.

The GPU textures are created lazily on first draw, so a GaussianSplats can be constructed before Scene.initializeStaticResources completes.

Constructors

GaussianSplats.fromData(SplatData data, {SplatColorSpace colorSpace = SplatColorSpace.linear})
Packs data (procedurally constructed splats) synchronously on the calling thread.
factory

Properties

bounds ↔ Aabb3?
Local-space bounds of the set (splat centers padded by three standard deviations), or null for an empty set.
latefinal
colorSpace → SplatColorSpace
How data's colors map into the linear HDR pipeline.
final
count → int
The number of splats.
no setter
data → SplatData
The decoded splat arrays (positions drive depth sorting; the rest are kept for bounds and readback).
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromAsset(String assetPath, {SplatFormat? format, double alphaCullThreshold = 1.0 / 255.0, int maxShDegree = 2, SplatColorSpace colorSpace = SplatColorSpace.displayReferred}) → Future<GaussianSplats>
Loads and decodes a splat file from the asset bundle.
fromBytes(Uint8List bytes, {SplatFormat? format, double alphaCullThreshold = 1.0 / 255.0, int maxShDegree = 2, SplatColorSpace colorSpace = SplatColorSpace.displayReferred}) → Future<GaussianSplats>
Decodes splat file bytes on a background isolate.