From 0c476e92e1807928ffb30864126076ef4c6a0821 Mon Sep 17 00:00:00 2001
From: Elizabeth Hunt <elizabeth.hunt@simponic.xyz>
Date: Tue, 13 Feb 2024 20:00:02 -0700
Subject: add all the stuff

---
 src/scenes/boolean_encoding.tsx | 42 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 src/scenes/boolean_encoding.tsx

(limited to 'src/scenes/boolean_encoding.tsx')

diff --git a/src/scenes/boolean_encoding.tsx b/src/scenes/boolean_encoding.tsx
new file mode 100644
index 0000000..60a0ea9
--- /dev/null
+++ b/src/scenes/boolean_encoding.tsx
@@ -0,0 +1,42 @@
+import { Layout, Txt, makeScene2D } from "@motion-canvas/2d";
+import {
+  Direction,
+  beginSlide,
+  createRef,
+  slideTransition,
+} from "@motion-canvas/core";
+import { theme } from "../theme";
+
+const boolE = [
+  "true = λ t . λ f . t",
+  "false = λ t . λ f . f",
+  "if = λ b . λ x . λ y . b x y",
+  "not = λ b . b false true",
+  "and = λ b . λ c . b c false",
+];
+
+export default makeScene2D(function* (view) {
+  const numerals = createRef<Txt>();
+
+  view.add(
+    <Layout layout direction="column" alignItems="center">
+      <Txt fontSize={40} fontFamily={theme.font} fill={theme.text.hex}>
+        Boolean Encoding
+      </Txt>
+      <Txt
+        ref={numerals}
+        fontSize={30}
+        fontFamily={theme.font}
+        fill={theme.text.hex}
+      ></Txt>
+    </Layout>
+  );
+
+  yield* slideTransition(Direction.Right);
+  yield* beginSlide("The Lambda Calculus - Boolean Encoding");
+
+  for (const bool of boolE) {
+    yield* numerals().text(numerals().text() + "\n\n" + bool, 1);
+    yield* beginSlide("boolean - " + bool);
+  }
+});
-- 
cgit v1.3

