Add the exercise reference library, animated exercise figures, and exercise categories
Exercise Library/ holds per-exercise reference docs (setup, cues, mistakes, progressions) with SVG visuals and a Python-rendered motion pipeline; Workouts/ExerciseFigure renders the bundled *.motion.json rigs as animated stick figures on the exercise screen. Exercises gain a warm-up/main-circuit category, timed exercises display hold time via planSummary, and a completed exercise reopens to a check screen instead of its timers.
This commit is contained in:
@@ -35,6 +35,24 @@ enum LoadType: Int, CaseIterable, Codable, Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
/// Which segment of a split an exercise belongs to — the split screen groups its
|
||||
/// exercise list by this. Persisted as its raw `Int` value; `main` is the default
|
||||
/// (and what older documents without the field decode to).
|
||||
enum ExerciseCategory: Int, CaseIterable, Codable, Sendable {
|
||||
case main = 0
|
||||
case warmup = 1
|
||||
|
||||
/// Order the categories appear on screen: warm-up first, then the main circuit.
|
||||
static let displayOrder: [ExerciseCategory] = [.warmup, .main]
|
||||
|
||||
var displayName: String {
|
||||
switch self {
|
||||
case .main: "Main Circuit"
|
||||
case .warmup: "Warm-up"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The kind of training a split represents — used to tag the Apple Health workout
|
||||
/// so it lands in the right category (and credits the rings correctly), and to pick
|
||||
/// a MET value when the phone has to estimate calories without watch sensor data.
|
||||
|
||||
Reference in New Issue
Block a user