Skip to content

feat: add Gaussian Splatting support#259

Open
ManzoliW wants to merge 9 commits intovercel-labs:mainfrom
ManzoliW:feat/gsplat
Open

feat: add Gaussian Splatting support#259
ManzoliW wants to merge 9 commits intovercel-labs:mainfrom
ManzoliW:feat/gsplat

Conversation

@ManzoliW
Copy link
Copy Markdown
Contributor

@ManzoliW ManzoliW commented Apr 4, 2026

Summary

  • New @json-render/gsplat package: Standalone Gaussian Splatting renderer using Hugging Face's gsplat.js — no Three.js dependency required. Includes GaussianSplat and GaussianSplatViewer components with progress indicator, orbit controls, and Zod-based catalog definitions.
  • GaussianSplat component for @json-render/react-three-fiber: Integrates splats into R3F scenes via drei's Splat loader, composable with all existing components (lights, controls, post-processing). Brings component count to 20.
  • Two example apps: Standalone gsplat viewer (5 scenes from Hugging Face datasets) and R3F composition demo (showroom, multi-splat, post-processing, animated floating splat).
202604032347.mp4

ManzoliW and others added 6 commits April 3, 2026 22:04
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>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 4, 2026

@ManzoliW is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 4, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgsplat@​1.2.98110010083100

View full report

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>
Copy link
Copy Markdown
Collaborator

@ctate ctate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Splat transforms not appliedposition, rotation, and scale on each splat in GaussianSplatViewer are in the schema but never applied to the scene. Everything renders at origin.
  2. Unused props in GaussianSplat (gsplat pkg) — quality, alphaHash, toneMapped, visible are in the Zod schema but never forwarded to the renderer.
  3. fov is only read at mount — changing it after init has no effect.
  4. Hardcoded UI colors in progress/error indicators — not themeable.
  5. 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>
@lucianfialho
Copy link
Copy Markdown
Contributor

Hey @ManzoliW — great feature! I picked up the 5 items from the maintainer review and opened #261 on top of your work. Feel free to cherry-pick or close if you'd prefer to handle them yourself.

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>
@ctate
Copy link
Copy Markdown
Collaborator

ctate commented Apr 7, 2026

Thanks for this contribution, @ManzoliW!

The R3F GaussianSplat component is a great addition. It slots in naturally as a composable element alongside lights, cameras, and controls, which is exactly where json-render shines. Happy to merge that part.

I'd like to discuss the standalone @json-render/gsplat package before shipping it. The JSON spec for the viewer is essentially just props for a single component. There's no real element tree to compose, which is where the declarative spec layer adds value. The splat URLs and transforms also live outside the spec (in a separate splats prop), so the spec itself doesn't fully describe the scene.

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:

  1. Merging the R3F GaussianSplat component + its example app as-is
  2. Moving the standalone gsplat viewer to examples/ as an experimental demo rather than a published package, or alternatively, if there's a concrete use case that requires zero Three.js dependency, let's discuss that first

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.

@ManzoliW
Copy link
Copy Markdown
Contributor Author

ManzoliW commented Apr 7, 2026

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:

  • Keep the R3F GaussianSplat component and its example app as-is for merge
  • Remove packages/gsplat to examples/gsplat since is a experimental demo (removing publish config and changeset entry)
  • Update the docs navigation and remove the gsplat API reference page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants