diff options
author | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-02-13 20:00:02 -0700 |
---|---|---|
committer | Elizabeth Hunt <elizabeth.hunt@simponic.xyz> | 2024-02-13 20:00:02 -0700 |
commit | 0c476e92e1807928ffb30864126076ef4c6a0821 (patch) | |
tree | a4992161ce4b6203edffb5d78533e9c73e61e6f1 /src/scenes/dna.tsx | |
parent | 512c245466fad78106a046c1ea6233acdcc3e4de (diff) | |
download | compiling-the-lambda-calculus-0c476e92e1807928ffb30864126076ef4c6a0821.tar.gz compiling-the-lambda-calculus-0c476e92e1807928ffb30864126076ef4c6a0821.zip |
Diffstat (limited to 'src/scenes/dna.tsx')
-rw-r--r-- | src/scenes/dna.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/scenes/dna.tsx b/src/scenes/dna.tsx new file mode 100644 index 0000000..9cb77bd --- /dev/null +++ b/src/scenes/dna.tsx @@ -0,0 +1,22 @@ +import { Video, Layout, makeScene2D } from "@motion-canvas/2d"; +import { + Direction, + beginSlide, + createRef, + slideTransition, +} from "@motion-canvas/core"; +import mitosis from "../../public/img/cell_division.mp4"; + +export default makeScene2D(function* (view) { + const layout = createRef<Layout>(); + const vid = createRef<Video>(); + + view.add( + <Video playbackRate={4} width={900} ref={vid} src={mitosis} x={0} />, + ); + + yield* slideTransition(Direction.Left); + yield vid().play(); + yield vid().loop(true); + yield* beginSlide("show mitosis"); +}); |