Skip to content

Instantly share code, notes, and snippets.

@koaning
Last active July 14, 2026 15:31
Show Gist options
  • Select an option

  • Save koaning/d10cb73fafe5e1355237d17fa7b5d5cf to your computer and use it in GitHub Desktop.

Select an option

Save koaning/d10cb73fafe5e1355237d17fa7b5d5cf to your computer and use it in GitHub Desktop.
manim-web-demo
const player = new manim.Player(container, {
width,
height,
autoPlay: true,
backgroundColor: manim.BLACK,
});
player.sequence(async (scene) => {
const circle = new manim.Circle({ radius: 1.5, color: manim.BLUE, fillOpacity: 1 });
await scene.play(new manim.Create(circle));
await scene.wait(0.5);
const square = new manim.Square({ sideLength: 3, color: manim.RED, fillOpacity: 1 });
await scene.play(new manim.Transform(circle, square));
await scene.play(new manim.Indicate(circle));
const triangle = new manim.Triangle({ color: manim.GREEN, fillOpacity: 1 });
triangle.scale(2);
await scene.play(new manim.Transform(circle, triangle));
await scene.play(new manim.Rotate(circle, { angle: Math.PI }));
await scene.play(new manim.FadeOut(circle));
const circle2 = new manim.Circle({ radius: 1, color: manim.YELLOW, fillOpacity: 1 });
await scene.play(new manim.FadeIn(circle2));
await scene.wait(1);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment