File size: 423 Bytes
96fb70e
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import {Latex, makeScene2D} from '@motion-canvas/2d';
import {createRef, waitFor} from '@motion-canvas/core';

// Visit https://motioncanvas.io/docs/latex/ for more information.
export default makeScene2D(function* (view) {
  view.fill('white');
  const tex = createRef<Latex>();
  view.add(<Latex ref={tex} tex="{{1}} + {{2}}" fill="black" />);

  yield* waitFor(0.5);
  yield* tex().tex(['2', '+', '3', '+', '4'], 1);
});