Why using Manim web instead of ManimGL or Manim Community ?
This version can run in the web browser.
- For simple animations which don't require lots of computing power, it may be easier to make the end-user render the animation instead of loading a video file
- Interactive animations can be done with it without having the end-user to install anything
Why does it use the 2d canvas API instead of WebGL ?
ManimWeb is a reimplementation of the Cairo version of Manim because the OpenGL version (ManimGL) uses geometry shaders which aren't implemented yet with WebGL (even WebGL2). Using WebGL may be possible, there is more detail on how it may be implemented in the improvements/suggestions page. It could be a lot faster but currently, the 2d canvas API is the only rendering API used.
Why using Dart instead JavaScript ?
Dart is very similar to JS. However, Dart can be compiled to Native code (as discussed in the improvements/suggestions page) and also compiles to JavaScript. Dart supports operator overloading, has a strong type system with runtime checks, has named arguments for functions, class instances are similar to function calls (new
keyword is optional), and some useful features like chaining using ..
. These features make the transition from Manim (in python) easier.