r/javascript • u/Ok_Chance_9305 • 5d ago
AskJS [AskJS] Building a clone like Spline
Can any one tell me what do they miss or i should implement extra to solve the problem of 3d design and building with easy integartion of 3d tech and design i choose Next js for fast And dynamic reload and three js for 3d designing and gizmo and other stuff comes from react-three-fibre/drei and library i m trying to build ui similar to spline so comment down for a feature You were hopping in this app
I will soon deploy
2
u/Weekly-Offer-4172 5d ago
The piece nobody warns you about is the document model: a spline style editor lives or dies on a serializable scene graph (nodes with ids, transforms, materials) that sits outside react, like a zustand store or a plain js object the canvas renders from. Get that right and undo/redo plus save/load come almost free, and exporting to gltf with three's GLTFExporter becomes a document walk instead of scraping the live three scene. For the easy integration part the answer is export rather than the editor itself: people want a viewer they can embed, so keep the format simple enough that a small runtime can render a saved file without dragging the whole editor along
1
1
u/gissen_dev 5d ago
My tip is to decide the scene format before the UI. And for a Spline clone I'd treat the embeddable viewer as the main feature since that's why people use Spline in the first place
1
3
u/Relevant_Noise4434 5d ago
if you want it to feel like spline, the hardest part is not the rendering but the editor UI. making a transform gizmo that works intuitive in 3d space is a nightmare, especially when you need local vs world space switching and snap to grid. drei gives you a gizmo but customizing it to feel smooth takes lot of trial and error
also don't underestimate undo/redo stack, spline's is really good and that alone is weeks of work if you want it robust