fix: bound invalid render durations

This commit is contained in:
James
2026-07-21 03:05:53 +00:00
parent 17391bbec3
commit 977e4e7911
13 changed files with 193 additions and 30 deletions
+1 -1
View File
@@ -374,7 +374,7 @@ The skeleton handles most structural rules. These are the runtime rules the skel
| `Math.random()` | Seeded PRNG (only if you need randomness) |
| `Date.now()`, `performance.now()` | Hard-coded timing or `tl.time()` in `onUpdate` |
| `setInterval`, `setTimeout` | Timeline tweens + `onUpdate` |
| `repeat: -1` | `repeat: Math.ceil(duration / cycle) - 1` |
| `repeat: -1` | `repeat: Math.max(0, Math.floor(duration / cycle) - 1)` |
| `stagger: { from: "random" }` | `from: "start"`, `"center"`, `"end"` |
| Async timeline construction | Synchronous at page load |
@@ -371,7 +371,7 @@ The cloud renderer seeks the timeline frame-by-frame. Non-deterministic or self-
| `Date.now()`, `performance.now()` | hard-coded timing or `tl.time()` in `onUpdate` |
| `setInterval`, `setTimeout` | timeline tweens + `onUpdate` |
| `requestAnimationFrame` | GSAP tweens |
| `repeat: -1` | `repeat: Math.ceil(duration / cycle) - 1` |
| `repeat: -1` | `repeat: Math.max(0, Math.floor(duration / cycle) - 1)` |
| `stagger: { from: "random" }` | `from: "start"`, `"center"`, or `"end"` |
| async timeline construction | build synchronously at page load |
| `video.play()` / `audio.play()` | the framework owns playback |