gltfjsx
Generate a reusable React Three Fiber component from a glTF or GLB model with a command-line tool.
What it does
gltfjsx is a command-line converter for glTF and GLB assets. The official usage guide shows it generating a React Three Fiber JSX component with named meshes and materials, letting developers address model parts in code. --types adds TypeScript definitions; --transform creates a separate optimised GLB for the web. Use these options only when the asset needs them.
Who might use it
React developers who need to place, reuse or make model parts interactive in a React Three Fiber scene are its audience. Spline is a visual tool for designing interactive 3D scenes. gltfjsx starts with an exported model and produces code; it is not a modelling editor.
First step and limits
Run npx gltfjsx model.glb on a model you can use, place the asset in the app’s public folder, then import the generated component into a Canvas. The guide lists Node.js and React Three Fiber dependencies. Inspect node names, materials and animations before adding interactions. Conversion does not grant rights to textures or geometry. Check optimisation options against your model’s appearance and behaviour.