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:
@@ -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 }
|
||||
}
|
||||
|
||||
@@ -499,8 +499,9 @@ struct MotionTimeline {
|
||||
return resolved[0]
|
||||
}
|
||||
|
||||
/// The drawable geometry at wall-clock `time`.
|
||||
func geometry(at time: Double) -> FigureGeometry {
|
||||
MotionSolver.frameGeometry(frame(at: time), prof: profile, cam: cam).1
|
||||
/// The drawable geometry at wall-clock `time`. `yawOffset` turns the camera past
|
||||
/// the exercise's authored yaw — the slow-orbit presentation.
|
||||
func geometry(at time: Double, yawOffset: Double = 0) -> FigureGeometry {
|
||||
MotionSolver.frameGeometry(frame(at: time), prof: profile, cam: cam + yawOffset).1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user