-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Manim addons and customizability #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@eulertour and I were discussing the extensibility and modularity of rendering. I think that we could make the actual rendering parts as add-ons, since we want people to be able to add new rendering backends on their own. |
Most of that makes sense, although a Other than that it seems like we'll basically have to allow users to overwrite any function they want, which seems like it could be tricky to get right... |
Sure; the
We should discuss more about this, yes
Well, the renderer should optimally only receive and work with the data it needs... We might need to restrict its freedom in order to get this right. |
What is the latest when it comes to add-ons? I kinda sorta remember @yoshiask saying he will come back to this when manim CE stabilizes a bit. If so, I suggest we close this issue until such a time. |
Something to document here I found some doc on how plugins work. |
Update possible_words to reflect changes by NYT
@yoshiask had developed an initial structure for what seemed to be support for using addons (i.e., extra functionalities from 3rd-party libs) in manim (see his pull request at the 3b1b repo and his .pptx export extension). This idea has a lot of potential and can be generalized for many functionalities needed by manim.
First, we should implement an API like the one suggested by @yoshiask, which would allow the usage of custom options, classes and functions that interact with manim's inner structures. An example of project that could benefit from this is chanim.
Second, we should generalize this API for multiple functionalities, and allow for more customizability in manim, generally speaking. For example:
We should allow the user to pick how the video should be rendered, i.e. which rendering method should be used (this is a matter to be discussed by itself!) - @eulertour's manim web port could benefit from this. For instance, the user could pick between rendering in the browser (using @eulertour's tool) or with cairo, which would leverage the latter from being a required dependency (see Fix the installation of or completely replace cairo #14).
This will require, of course, developing an interface that abstracts rendering away. E.g.: To render a shape, we just call
render_shape(...data...)
, a function that tells the renderer to do this, which can then interpret this message as it wishes.Note that anyone would be able to create any renderer compatible with manim that they wish.
We can also, similarly, allow the user to choose how to render LaTeX (see Replace miktex with pylatex #23, Make sure that having a LaTeX distribution is optional #24). They can delegate it to an online website, should someone create an extension for this, or simply use the available installation (the default behavior). We would do this, also similarly, by abstracting away the rendering processes with an appropriate interface.
Note that the use of dataclasses (see #7) and proper organization/typings would immensely aid us here.
Comments? Suggestions?
The text was updated successfully, but these errors were encountered: