The scene-to-source wiring is done by transforming the scenes AST wrapping scene objects in a group with contextual user data.
Clicking on a scene object we traverse up the Three.js scene and if this data exists we can do something with it.
Only the opened scene is transformed.
1
5
ts-morph is great for AST manipulation you can batch 'em up and save when ready.
Putting this behind a stateful Deno service and you start seeing something very powerful!
In the video on mouse up after moving an entity it calls the update api when saving it calls the save api.
Nov 28, 2022 路 10:39 AM UTC
1
2
You're also able to get types using ts-morph as it's just a wrapper over the TS compiler.
Useful for finding props on JSX elements that aren't already defined on the element in source!
1
3
I see the Deno service as an integral part of scaling an editor as it allows us to remove a lot from the critical path by loading things on demand.
It also also IMO raises the ceiling for interesting features such as undo/redo, multiplayer, and more.
1
3
It's not all roses though.
馃敗 There's a lot of edge cases to cover with ts-morph extracting types.
馃敤 The temp file flow is a bit whack and hardcoded atm
馃審 It will be a huge amount of effort to get something I'd consider production ready
1
3
I imagine the editor being a standalone app which would solve the temp file flow being whack atm.
At the end of the day I'd scope this to just a scene editor wrapped in a beautiful UI with features tailored to making us more productive with R3F/JSX.
1
6
Maybe there's an MVP release somewhere in the future for this, who knows.
I just want to make games 馃お
1
4



