feat: add Gaussian Splatting support#259
Conversation
Standalone Gaussian Splatting renderer using Hugging Face's gsplat.js. Provides GaussianSplat and GaussianSplatViewer components with progress indicator, orbit controls, and Zod-based catalog definitions — no Three.js dependency required. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds GaussianSplat to the R3F renderer using drei's Splat loader, bringing the component count to 20. Splats are composable with all existing R3F components (lights, controls, post-processing, etc.). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Demo app showcasing @json-render/gsplat with 5 scenes (bonsai, garden, bicycle, kitchen, stump) loaded from Hugging Face datasets. Includes scene selector, live JSON spec viewer, and progress indicator. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Demo app showcasing GaussianSplat in R3F with 5 scenes: splat showroom, splat with primitives, multi-splat, post-processing effects (bloom + vignette), and animated floating splat with sparkles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds API documentation for @json-render/gsplat, updates the R3F docs to reflect 20 components, and registers both example apps in the docs navigation, examples list, and page titles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds @json-render/gsplat to the fixed version group and creates a changeset for the minor release of gsplat and react-three-fiber. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@ManzoliW is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
The catalog declared controls, autoRotate, autoRotateSpeed, cameraPosition, cameraTarget, and fov props but the component silently ignored them. Now: - cameraPosition sets camera.position via SPLAT.Vector3 - cameraTarget calls controls.setCameraTarget() - fov converts to focal length via camera.data.fx/fy - controls=false skips OrbitControls creation - autoRotate rotates the camera around Y in the render loop - Updated gsplat.d.ts with full Camera/OrbitControls type surface Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ctate
left a comment
There was a problem hiding this comment.
Thanks for this contribution, @ManzoliW — great feature and nice example apps! I reviewed the code, ran the build, and tested both examples in a browser. A few things to address:
- Splat transforms not applied —
position,rotation, andscaleon each splat inGaussianSplatViewerare in the schema but never applied to the scene. Everything renders at origin. - Unused props in
GaussianSplat(gsplat pkg) —quality,alphaHash,toneMapped,visibleare in the Zod schema but never forwarded to the renderer. fovis only read at mount — changing it after init has no effect.- Hardcoded UI colors in progress/error indicators — not themeable.
- Progress bar can jump backwards when splats load out of order.
Build and lint pass, both examples render and work correctly. Once these are addressed this is good to go!
…ble colors - Apply per-splat position/rotation/scale after LoadAsync (splats were rendering at origin regardless of config) - Add eulerToQuaternion helper to convert Vec3 degrees to Quaternion - Expose Splat class and correct LoadAsync return type (Promise<Splat>) in gsplat.d.ts so transforms can be applied imperatively - Forward visible prop through GaussianSplatHandle and SplatEntry - Fix progress bar regression: use Math.max so bar never jumps backwards - Make ProgressIndicator colors themeable via progressBarColor, progressTrackColor, progressTextColor, progressBackgroundColor props on GaussianSplatViewer - Remove quality/alphaHash/toneMapped from standalone gsplat catalog — these gsplat.js renderer has no equivalent API for them (they remain in @json-render/react-three-fiber where drei's Splat supports them) - Fix pre-existing TS2769/TS2322 Vec3 type errors in GaussianSplat.tsx Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The new themeable progress indicator props are nullable (required keys that accept null) in the catalog schema. The example was missing them, causing TS2739 in CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thanks for this contribution, @ManzoliW! The R3F I'd like to discuss the standalone Every direction this could grow (annotations, multi-splat scenes, camera waypoints) would mean rebuilding parts of a 3D scene graph, which the R3F integration already provides. I'm hesitant to take on a new published package with a maintenance commitment when the use case is better served by the R3F path. Would you be open to:
The code quality isn't the issue here. This is well-written. It's more about whether the standalone package earns its place in the published surface area. |
|
Thanks, @ctate — you are right. The R3F solution already covers everything I need, and future scenarios (multiple splats, camera paths, annotations) would just be reinventing functionality that R3F already provides. i think we can:
|
Summary
@json-render/gsplatpackage: Standalone Gaussian Splatting renderer using Hugging Face's gsplat.js — no Three.js dependency required. IncludesGaussianSplatandGaussianSplatViewercomponents with progress indicator, orbit controls, and Zod-based catalog definitions.GaussianSplatcomponent for@json-render/react-three-fiber: Integrates splats into R3F scenes via drei'sSplatloader, composable with all existing components (lights, controls, post-processing). Brings component count to 20.202604032347.mp4