ManimCommunity / ManimCommunity/manim
Support classless construct
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## Description of proposed feature
It would be nice if the `manim` commands supports construct functions with a surrounding class, similar to how the `manimator` does it on discord.
```py
from manim import *
def construct(self: Scene) -> None:
self.add(Circle())
```
## How can the new feature be used?
1. Makes it easier to set up small scenes.
2. Makes it easier to use snippets that were shared on discord.
## Additional comments
The `manimator` also supports omitting the
```py
from manim import *
```
but I haven't decided on whether I would like to see support of that too.
Contributor guide
Research direction
Start at the existing `manim` command entry point that loads scene classes, then compare that flow with the classless `construct(self: Scene)` example in the issue. Define completion as accepting the proposed construct function while preserving existing class-based scenes; determine separately whether omitting `from manim import *` is in scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100