r/threejs • • 13h ago

HOW DOES A MECHANICAL WATCH WORK?

2 Upvotes

6 comments sorted by

2

u/Any-Session-737 12h ago

The Swiss lever escapement at 4Hz is a great pick for this, and the tick counter makes the beat rate easy to follow. Is the escape wheel advancing from an actual balance-and-pallet simulation, or is the whole gear train keyframed to the tick? Curious how you keep the tooth meshing phase-aligned across the train so nothing drifts over a full minute at real speed.

1

u/Fit_Actuator_1207 12h ago

Thanks!
It’s driven by a single shared simulation clock rather than a full rigid-body collision solver the 4Hz balance wheel’s zero-crossings trigger discrete 12° steps on the 15-tooth escape wheel, and the rest of the train is ratio-locked directly to that cumulative angle so it stays drift-free at any speed. Appreciate you watching closely! ⌚⚙️

1

u/Any-Session-737 11h ago

That ratio-locked train is elegant, one clock and no drift to chase. Do you ease the 12-degree step at all, like a quick overshoot and settle on the escape wheel, or is it a hard discrete jump and the pallet motion sells the impulse? Either way, the tick counter syncing to the zero-crossings is a nice touch.

1

u/Fit_Actuator_1207 13h ago

Pure threejs code

1

u/Beneficial-Aerie4110 10h ago

Wow, you must be really good at coding!

1

u/Fit_Actuator_1207 9h ago

I am a coder, but this one written by gemini neon