Slowly orbit the camera around prop-free form guides

Bodyweight motions (no equipment layer, no hide list) now turn the
camera a full revolution every 24 seconds while the motion loops, so
the exercise reads from every side; machine exercises keep their
authored view, since scene equipment is a view-locked billboard and a
hide list describes a single viewpoint.

Claude-Session: https://claude.ai/code/session_01LEoff8bXGBS83tK1c55Mf7
This commit is contained in:
2026-07-06 20:43:14 -04:00
parent 3c7a790e9d
commit fd3bcb513f
5 changed files with 52 additions and 6 deletions
@@ -38,10 +38,19 @@ struct FigureAnimation {
self.props = resources.motion.props ?? []
}
/// Seconds per full camera revolution for orbiting motions.
private static let orbitPeriod: Double = 24
/// Prop-free, hide-free motions slowly orbit the camera while animating the
/// bodyweight moves. Scene equipment is a view-locked billboard and a `hide` list
/// describes one authored viewpoint, so machines keep their fixed camera.
var orbits: Bool { props.isEmpty && hide.isEmpty }
/// Drawable geometry at `time`, with limbs listed in `hide` dropped so neither they
/// nor any prop riding them are drawn.
func geometry(at time: Double) -> FigureGeometry {
var geo = timeline.geometry(at: time)
let yaw = orbits ? 360 * (time / Self.orbitPeriod) : 0
var geo = timeline.geometry(at: time, yawOffset: yaw)
for name in hide {
if let limb = FigureLimb(rawValue: name) { geo.limbs[limb] = nil }
}