Skip to main content

No project description provided

Project description

manim-skia

Manim plugin that adds Skia as a renderer

Example

Run it as a normal manim scene but importing manim_skia and using SkiaScene instead of Scene

from manim import *
from manim_skia import *

class Example(SkiaScene):
    def construct(self):
        self.play(Create(Circle()))
        self.wait()

How does it work?

Oof, that's the worst question you could have ever done. Ok let's talk about this.

Manim has a ton of stuff using CairoRenderer. VMobjects, utils functions, auxiliary classes... It works for base Manim, but if someone wants to implement a different renderer it becomes a mess and the best solution is to create a fork and do the necessary modifications.

Unlucky you, this repo does not have the best solution. What this thing does is let Manim think the renderer is CairoRenderer but then substitute it in the SkiaScene class.

Bad solution, probably will raise a ton of issues, it does not actually improve the speed and surely it will fail everywhere.

Next question.

Does it work?

Kinda. At this moment just as a substitute for Scene, not ThreeDScene or MovingCameraScene or fancy things like that. Also, some of the examples portrayed on the Manim Community web page do not work. Sooner or later I will fix it, just give me some time.

Why?

Three main reasons:

  1. I felt like it. I just wanted to try and have some fun with Manim's internals and what a better way than implementing a new rendering system? I did have fun and I did learn a lot in the process. What a time to be alive!

  2. Manim sometimes feels reaaaaaally slow. I wanted to improve that by replacing the renderer. I know there are other bottlenecks, python being one of them, but I firmly believe that implementing a different renderer like Skia or PyGFX would benefit the library a lot. This will work as a prove of concept.

  3. As lots of parts of this repo, this third reason is under construction with no ETA.

Should I use it?

Yeah, why not? I am a readme, not a cop, so telling you not to use it is just pointless.

In fact, you can just use it as a drop in replacement like this:

from manim import *
from manim_skia import SkiaScene as Scene

class Example(Scene):
    def construct(self):
        self.play(Create(Circle()))
        self.wait()

However, keep in mind that this is just garbage and, as the garbage it is, the output is buggy, way faster than it should (its almost like the easing functions do not work as expected) and full of artifacts.

Will this work someday?

Maybe. Probably not. Just maybe.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

manim_skia-0.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

manim_skia-0.0.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file manim_skia-0.0.1.tar.gz.

File metadata

  • Download URL: manim_skia-0.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.1 Windows/11

File hashes

Hashes for manim_skia-0.0.1.tar.gz
Algorithm Hash digest
SHA256 bbcf1eef8ed18aa5112090d4d40cb59cbe35f722296567a3d18ac2c05d384753
MD5 d1e62ffecd72298c13a82289363556dc
BLAKE2b-256 34929eb15fb4ec091d0138c0e30e9c1af748ec4e2e1774cd4d72e34f4c694716

See more details on using hashes here.

File details

Details for the file manim_skia-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: manim_skia-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.13.1 Windows/11

File hashes

Hashes for manim_skia-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 285ed55a17209a5f0e1caba2bea2b8f69d1fa3a8e1a0fe9596788ae4f85ff722
MD5 b27c1227fa746a9c1d30d003f5449d32
BLAKE2b-256 aa39cc034bfb8ca9eea7de0aee352105a0451e85d66bff56c9afd1edda33c800

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page