Import
GaussianSplat is an addon, and must be imported explicitly, see Installation#Addons.
import { GaussianSplat } from 'three/addons/objects/GaussianSplat.js';
Constructor
new GaussianSplat( splatGeometry : BufferGeometry, options : Object )
Constructs a new Gaussian splat mesh.
| splatGeometry |
The splat geometry to render. Higher-order spherical harmonics attributes must use packed |
||
| options |
Options.
|
Properties
.autoSort : boolean
Whether to sort automatically in onBeforeRender.
.boundingBox : Box3
The bounding box of the splats. Can be computed via GaussianSplat#computeBoundingBox.
Default is null.
.boundingSphere : Sphere
The bounding sphere of the splats. Can be computed via GaussianSplat#computeBoundingSphere.
Default is null.
.isGaussianSplat : boolean (readonly)
This flag can be used for type testing.
Default is true.
.splatGeometry : BufferGeometry
The source splat geometry.
Methods
.computeBoundingBox()
Computes the bounding box of the splats, updating GaussianSplat#boundingBox.
Each splat is expanded by its own extent rather than treated as a point, so the bounds cover what is drawn.
.computeBoundingSphere()
Computes the bounding sphere of the splats, updating GaussianSplat#boundingSphere.
Each splat is expanded by its own extent rather than treated as a point, so the bounds cover what is drawn.
.raycast( raycaster : Raycaster, intersects : Array.<Object> )
Computes intersection points between a casted ray and the splats.
| raycaster |
The raycaster. |
| intersects |
The target array that holds the intersection points. |
- Overrides: Mesh#raycast
.updateSort( renderer : Renderer, camera : Camera ) : boolean
Updates the draw order if the camera or mesh orientation has changed enough to need a new sort.
| renderer |
The renderer. |
| camera |
The camera used for rendering. |
- Returns: Whether a sort was dispatched this call.
.updateSphericalHarmonics( renderer : Renderer, camera : Camera ) : boolean
Updates the view-dependent spherical harmonics colors if the camera or mesh transform has changed.
| renderer |
The renderer. |
| camera |
The camera used for rendering. |
- Returns: Whether a compute pass was dispatched this call.