-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Manim redesign proposal draft
Darylgolden edited this page Jan 25, 2022
·
3 revisions
- Updaters are just functions that are added to the scene, and not necessarily tied to any mobject
- Base updaters are nullary (argumentless)
- Special updaters: dt updaters, total_time updaters
- these partially applicate to base updaters
- Alpha updater: just a total time updater with some extra processing with rate func
- Mobject updaters: Mobject versions of the above, partially applicate to non-mobject versions
- Updaters with a known runtime (how to specify the runtime? what if the updater actually takes longer or shorter than what it says it'll run for?) gets shown in the CLI with a progress bar. Updaters with an unknown runtime also gets shown in the CLI but doesn't have a progress bar
- Animations are essentially just the blueprint for an updater- Animations don't have to be tied to Mobjects
- The play method constructs the alpha updater from the specified start and run time. The start time must be equal or greater to the scene time when method is called.
- Blocking (non-asynchronous) play calls blocks further evaluation of the
construct
method until its run-time is over (how do we actually do this?) (actually, doesn't manim already do this? time only progresses when the construct method is stuck (by the play or wait methods)) - What happens when the construct method finishes and there's still an updater with some lifetime in it?
- The scene progresses through a sequence of "time-stops"
- There are two types of time-stops: frame time-stops and special time-stops
- At frame time-stops, the scene is evaluated (mobjects and cameras position updated) and then captured and sent to the renderer
- At special time-stops, the scene is also evaluated, but is not captured and sent to the renderer (if the entire scene is evaluated, won't this cause problems with updaters being called more times than they should? I think each time-stop has to be tied to a specific action. but how? and will it cause other problems?)
- We need special time-stops (see #manim-dev)
- Every frame, the scene sends rendering related data to the renderer
- Special types of renderers: null renderers and storage renderers
- Null renderers do absolutely nothing with the data. perhaps useful for tests, or skipping animations
- Storage renderers store the data sent to it. Maybe useful for time-travelling renderers like maki
- For non special renderers, it's their job to write to the framebuffer, which the file writer will use to output the video