An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
fix(engine): the frame step is frameStep, so chapters may name a helper step
yzrb2179ecb6c18
diff --git a/engine/engine.js b/engine/engine.jsindex 68b5f5a..a452cd7 100644--- a/engine/engine.js+++ b/engine/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/elementary-algebra/lib/engine.js b/site/elementary-algebra/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/elementary-algebra/lib/engine.js+++ b/site/elementary-algebra/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/joke-collection/lib/engine.js b/site/joke-collection/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/joke-collection/lib/engine.js+++ b/site/joke-collection/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/little-red-riding-hood/lib/engine.js b/site/little-red-riding-hood/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/little-red-riding-hood/lib/engine.js+++ b/site/little-red-riding-hood/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/madness-shorts/lib/engine.js b/site/madness-shorts/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/madness-shorts/lib/engine.js+++ b/site/madness-shorts/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/madness/lib/engine.js b/site/madness/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/madness/lib/engine.js+++ b/site/madness/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/math-notebook/lib/engine.js b/site/math-notebook/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/math-notebook/lib/engine.js+++ b/site/math-notebook/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/physics-notebook/lib/engine.js b/site/physics-notebook/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/physics-notebook/lib/engine.js+++ b/site/physics-notebook/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/science/lib/engine.js b/site/science/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/science/lib/engine.js+++ b/site/science/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/shooting-an-elephant/lib/engine.js b/site/shooting-an-elephant/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/shooting-an-elephant/lib/engine.js+++ b/site/shooting-an-elephant/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;diff --git a/site/three-little-pigs/lib/engine.js b/site/three-little-pigs/lib/engine.jsindex 68b5f5a..a452cd7 100644--- a/site/three-little-pigs/lib/engine.js+++ b/site/three-little-pigs/lib/engine.js@@ -1444,13 +1444,13 @@ function filmDone() {}let last = performance.now();function frame(now) {- step(now, .1);+ frameStep(now, .1);requestAnimationFrame(frame);}// A hidden tab gets no animation frames: a timer keeps the film going, so a beat that ends there still starts the next// one (a tab playing sound keeps its timers). Its ticks come late, so they may move the clock further at once.-setInterval(() => { if (document.hidden) step(performance.now(), 1.5); }, 250);-function step(now, most) {+setInterval(() => { if (document.hidden) frameStep(performance.now(), 1.5); }, 250);+function frameStep(now, most) {const dt = Math.min(most, Math.max(0, now - last) / 1000);last = now;clock += dt;