diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-02-08 18:36:10 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-02-08 18:36:10 -0700 |
commit | 5b8b3abcba8746502014266583907421b71a330b (patch) | |
tree | fc3d8a2159a17c8af1d432d93307ff01474fb053 /src/scenes/first_box.tsx | |
parent | c18b81b2f26123481558cb3fffc794c2c13f74ad (diff) | |
download | compiling-the-lambda-calculus-5b8b3abcba8746502014266583907421b71a330b.tar.gz compiling-the-lambda-calculus-5b8b3abcba8746502014266583907421b71a330b.zip |
add hungry partner function
Diffstat (limited to 'src/scenes/first_box.tsx')
-rw-r--r-- | src/scenes/first_box.tsx | 23 |
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"); }); |