Three.js-based implementation of 3D Gaussian splatting
Viewer.removeSplatScene()
when there was only a single splat scene loaded (Thanks @pesa2000 for the heads up and help with testing)create-ksplat.js
script (Thanks @gotoeasy for finding this bug and providing the fix!)Viewer.setOrthographicMode()
SplatMesh.setSplatScale()
to set the value by which splats are scaled in screen-space (default is 1.0)SplatMesh.setPointCloudMode()
to enable/disable point-cloud mode, where each splat is rendered as a filled circleViewer.removeSplatScene()
Viewer
parameter 'antialiased': true
.halfPrecisionCovariancesOnGPU
is now false
by default. It was causing issues for very small models.Bug fixes:
esbuild
not properly handling static class members in web workersUpdates:
Viewer
constructor parameter for choosing scene reveal mode: sceneRevealMode
.ply
format..ply
files and compressed .ply
files.Fixed a bug with loading .ply
files using Viewer.addSplatScene()
and Viewer.addSplatScenes()
The Viewer
class now accepts a new parameter renderMode
, which lets you control when the viewer renders. It is of the type RenderMode
:
const RenderMode = {
Always: 0,
OnChange: 1,
Never: 2
};
Always
is the default and will cause the viewer to render every frame.OnChange
will make the viewer only render when a visual element in the scene changes (camera position, camera orientation etc.)Never
prevents the viewer from doing any renderingAdditionally the new function Viewer.setRenderMode()
allows this setting to be changed at runtime
Small bug fixes for the progressive loading feature:
Support progressive loading for .ksplat
and .splat
files. Support for streaming .ply
files will be included in a future release.
streamView
option to addSplatScene
. It is false
by default to preserve existing behavior.Viewer.dispose()
to be called while scene loading is in progressBeaking Changes:
.ksplat
format so that it can be streamed, and to allow for better compression, multiple scene sections, and an optimized layout that yields better sorting performance. Older versions of .ksplat
files will no longer be supported.showLoadingSpinner
parameter for Viewer
constructor is now showLoadingUI
Thanks to @gotoeasy for helping me test this feature out and find bugs!