Collin Craig
Back to the wall

How it works

MartyGraphics

A Swift library for interactive 2D and 3D teaching visuals.

Open sourceView on GitHub

Stage
Early preview
Language
Swift
My part
Direct and review AI agents
License
Apache-2.0
MartyGraphics render of a jet engine with a section cut away. It is a teaching model, not a real engine design.

The job

A Swift library that turns validated JSON into interactive 2D and 3D teaching visuals.

What it draws

Gear trains, slider-cranks and algorithm walkthroughs.

How it is built

Open source under the Apache-2.0 license, in early preview.

It is a library from the Morrowdock project.

AI agents build it, and I direct and review the work.

The export that stalled

MartyGraphics can turn a teaching animation into an MP4 video. In the iOS simulator, one export stalled partway until a five-minute watchdog stopped it. Sampling the stalled export found it waiting for one of only three frame buffers while the system set up its color conversion. Held buffers were the likely cause.

The fix raised the pool to eight and put a 10-second limit on each wait for the encoder to be ready or for a free buffer. A stall now ends in a clear "writer stalled" error, and the partial file is removed. Eight is the smallest pool the tests showed working, not a proven limit.

I direct AI agents and review the work. The lesson: a wait needs a limit, so that a hang becomes an error you can test.

The fix: pull request #85 on GitHub.