Declarative 3D: Achieving integration SwiftUI and 3D
summary
An iPad app for robot cake decoration moves from a brittle singleton with over 100 imperative functions became a single state-driven updater to a declarative model: one central scene state plus a renderer that diffs changes and updates SceneKit or Unity. Motion capture uses HTC-style lighthouses, a backend smooths 3D pen coordinates and serves them via REST, and robots run in a bakery in Oslo. Implementation uses a protocol-based Element3D and custom ResultBuilder with buildEither/buildOptional/buildArray to enable inline conditionals, loops and view-modifier style offsets.
AI-written summary · about
chapters (7)
- 0:00Introduction and background
- 2:38From imperative to declarative 3D
- 7:15Building a declarative 3D scene
- 12:33Under the hood of RLE Builder
- 16:11Integrating SwiftUI and 3D scene
- 18:58Summary and key takeaways
- 19:44Q&A session








