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");
});
