(a?: string)
| 50 | |
| 51 | /** Parse an angle preset name or "yaw,pitch" degrees into a Camera. */ |
| 52 | export function parseAngle(a?: string): Camera { |
| 53 | if (!a) return { yaw: 0, pitch: 0 }; |
| 54 | const preset = ANGLE_PRESETS[a]; |
| 55 | if (preset) return { yaw: preset[0], pitch: preset[1] }; |
| 56 | const [y, p] = a.split(",").map((n) => Number.parseFloat(n)); |
| 57 | return { yaw: Number.isFinite(y) ? y! : 0, pitch: Number.isFinite(p) ? p! : 0 }; |
| 58 | } |
| 59 | |
| 60 | /** Resolve which animated selectors a `--shot --selector SCOPE` should sample. |
| 61 | * |
no outgoing calls
no test coverage detected