Spaces:
Sleeping
Sleeping
| 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); | |
| }); |