summaryrefslogtreecommitdiff
path: root/src/scenes/first_box.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/scenes/first_box.tsx')
-rw-r--r--src/scenes/first_box.tsx23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/scenes/first_box.tsx b/src/scenes/first_box.tsx
index b3957af..31ee631 100644
--- a/src/scenes/first_box.tsx
+++ b/src/scenes/first_box.tsx
@@ -4,8 +4,6 @@ import {
beginSlide,
createRef,
slideTransition,
- all,
- waitFor,
} from "@motion-canvas/core";
import { FunctionBox } from "../components/function_box";
@@ -23,14 +21,15 @@ export default makeScene2D(function* (view) {
yield* beginSlide("Black Box");
- for (const [a, b] of [
- [-1, 2],
+ for (const [[a, b], i] of [
+ [1, 2],
[3, 4],
- [5, 6],
- ] as [number, number][]) {
- const inputId = "(" + [a, b].join(",") + ")";
+ [1, 2],
+ [1, 2],
+ ].map((x, i) => [x, i]) as [[number, number], number][]) {
+ const inputId = "(" + [a, b, i].join(",") + ")";
- yield* all(functionBox().reset(0.25));
+ yield* functionBox().reset(0.5);
yield* functionBox().setInputs([{ val: a }, { val: b }], 0.5);
yield* beginSlide("Add Inputs " + inputId);
@@ -41,4 +40,12 @@ export default makeScene2D(function* (view) {
yield* functionBox().propogateOutput(0.5);
yield* beginSlide("Propogate Outputs of " + inputId);
}
+
+ yield* functionBox().reset(0.5);
+
+ yield* functionBox().showCode(0.85);
+ yield* beginSlide("Show Code");
+
+ yield* functionBox().hideCode(0.85);
+ yield* beginSlide("Hide Code");
});