File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
docs/source/contributing/docs Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -97,3 +97,21 @@ Béziers
97
97
98
98
Functions
99
99
---------
100
+ Throughout the codebase, many different types of functions are used. The most obvious example
101
+ is a rate function, which takes in a float and outputs a float (``Callable[[float], float] ``).
102
+ Another example is for overriding animations. One will often need to map a :class: `.Mobject `
103
+ to an overridden :class: `Animation `, and for that we have the ``FunctionOverride `` typehint.
104
+
105
+ ``PathFuncType `` and ``MappingFunction `` are more niche, but are related to moving objects
106
+ along a path, or applying functions. If you need to use it, you'll know.
107
+
108
+
109
+ Images
110
+ ------
111
+ There are several representations of images in manim. The most common is
112
+ the representation as a numpy array of floats representing the pixels of an image.
113
+ This is especially common when it comes to the OpenGL renderer.
114
+
115
+ This is the usecase of the ``Image `` typehint. Sometimes, manim may use ``PIL.Image ``,
116
+ in which case one should use that typehint instead.
117
+ Of course if a more specific type of image is needed, it can be annotated as such.
You can’t perform that action at this time.
0 commit comments