Manim Web: The ManimCE fork to create interactive math animations in the web
Do you want to turn your ManimCE code into an interactive web animation? This is your library!
Main changes
- MathJax LaTeX rendering: As we're using a web browser, we can't use system's LaTeX. Instead, we use a really faster implementation called MathJax, that delivers math equations for the web. Notice that there's no
Tex, so you can doMathTex(f"\\text{{{tex_code}}}")to render LaTeX text instead ofTex(tex_code). - Text rendering without Pango (under development): As Pango needs a system, we can't render text with Pango, but we'll use JavaScript libraries to handle that stuff (you don't need any JS, just internal working). This is still under development, so if you try to call
Text("Hello, world!"), this will raise an error, becauseTextisn't still ready! - Interactive animations and integration with JavaScript: You can now create interactive animations that can be controlled by the user. This is done by using JavaScript to handle events and Manim Web to create the animations.
Installation
Wait, this is not a system library, so you don't need to install it! In fact, you must start with an HTML file that includes Pyodide and loads Manim Web with micropip.install("manim-web"). An example is at the demo section below.
Demo
You have an example at https://mathityt.github.io/manim-web-demo/. The source code is at https://github.com/MathItYT/manim-web-demo.
Usage
You can use Manim Web like you use ManimCE, but with some differences. Some objects and methods are not available, like Text mobject.
from manim import *
class MyScene(Scene):
def construct(self):
# Create a square
square = Square()
# Add the square to the scene
self.add(square)
# Wait for 1 second
self.wait(1)
# Rotate the square
self.play(square.animate.rotate(PI / 4))
# Wait for 1 second
self.wait(1)
Limitations
- No Pango text rendering: As mentioned above, Pango is not available in the web, so text rendering is not available yet. But
Textwill be available soon!
Acknowledgements
Thanks to the Manim Community developers and 3Blue1Brown for developing a great animation engine!
Metadata
Release files for manim-web 0.1.8.post0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| manim_web-0.1.8.post0.tar.gz | 368.1 kB | Without provenance | Details for manim_web-0.1.8.post0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| manim_web-0.1.8.post0-py3-none-any.whl | Python 3 | none | any | Details for manim_web-0.1.8.post0-py3-none-any.whl |
Total release size: 794.2 kB
Release files / manim_web-0.1.8.post0.tar.gz
| Download URL | manim_web-0.1.8.post0.tar.gz |
|---|---|
| Size | 368.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0b062534c6eec3ce1bc237e19d733d1ac888f870116ee0bb4d2c992188dca1fc
|
|
BLAKE2b-256 checksum How to use checksums |
81d2f501d4718c2581e04efa34b283271b4f6e6ff3250498000501c4459cf0d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.0 CPython/3.12.8 Windows/11
|
Release files / manim_web-0.1.8.post0-py3-none-any.whl
| Download URL | manim_web-0.1.8.post0-py3-none-any.whl |
|---|---|
| Size | 426.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5be43a80d7c72dbcb001fd57e131084feb15d34782cf72f31d5f6af2530d082a
|
|
BLAKE2b-256 checksum How to use checksums |
0515c0c4d5b4fad81049d29c314d2e140c7dbf63fba6f1203bebb573652fe91a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.0 CPython/3.12.8 Windows/11
|
Security for manim-web 0.1.8.post0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.