mirror of
https://github.com/vercel-labs/json-render.git
synced 2026-09-14 13:41:32 +08:00
c604e5983c
* feat: add @json-render/gsplat package 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> * feat: add GaussianSplat component to react-three-fiber 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> * feat: add standalone gsplat example 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> * feat: add react-three-fiber gsplat example 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> * docs: add gsplat API reference and update navigation 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> * chore: add changeset and update lockfile for gsplat 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> * fix: wire up GaussianSplatViewer props to gsplat.js API 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> * fix(gsplat): address review issues — transforms, progress bar, themeable 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> * fix(gsplat): pass required progress color props in example 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> * refactor(gsplat): drop standalone @json-render/gsplat package Per discussion in #259, the standalone gsplat viewer is better positioned as an experimental example than as a published package — there's no real spec tree to compose, and the R3F GaussianSplat component already covers the productized use case. - Remove packages/gsplat (was @json-render/gsplat) - Inline the viewer component into examples/gsplat as an experimental demo - Drop @json-render/{core,react,gsplat} deps from the example - Remove gsplat from changeset config and feat-gsplat.md - Remove docs/api/gsplat page and its navigation entries - Update README to drop the standalone install/snippet * fix(gsplat): address review issues, add ExtrudedText component, improve a11y - Fix GridHelper prop names (color1/color2 → color/secondaryColor) in all R3F scene files - Fix Text3D prop mismatch in splat-with-primitives (size → fontSize, remove unsupported bevel/font props) - Fix autoRotate to orbit around camera target instead of world origin - Add ExtrudedText component to @json-render/react-three-fiber (geometry-based 3D text with depth, bevel, and custom font support) - Add multi-offset scene to gsplat example to demonstrate off-center orbit - Redesign splat-with-primitives scene (triangle logo + extruded label, remove floor plane) - Improve gsplat example accessibility (ARIA labels, keyboard nav, semantic HTML, focus management) - Debounce resize handler and use consistent 100dvh in gsplat viewer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Lucian Fialho <lucianfialhobp@hotmail.com>
30 lines
880 B
JSON
30 lines
880 B
JSON
{
|
|
"name": "example-gsplat",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"predev": "command -v portless >/dev/null 2>&1 || (echo '\\nportless is required but not installed. Run: npm i -g portless\\nSee: https://github.com/vercel-labs/portless\\n' && exit 1)",
|
|
"dev": "portless gsplat-demo.json-render next dev --turbopack",
|
|
"dev:local": "next dev --turbopack",
|
|
"build": "next build",
|
|
"start": "next start",
|
|
"lint": "eslint --max-warnings 0",
|
|
"check-types": "tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"gsplat": "^1.2.9",
|
|
"next": "16.1.6",
|
|
"react": "19.2.4",
|
|
"react-dom": "19.2.4"
|
|
},
|
|
"devDependencies": {
|
|
"@internal/eslint-config": "workspace:*",
|
|
"@types/node": "^22.10.0",
|
|
"@types/react": "19.2.3",
|
|
"@types/react-dom": "19.2.3",
|
|
"eslint": "^9.39.1",
|
|
"typescript": "^5.7.2"
|
|
}
|
|
}
|