MCPcopy
hub / github.com/ManimCommunity/manim / construct

Method construct

example_scenes/basic.py:113–130  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

111
112class UpdatersExample(Scene):
113 def construct(self):
114 decimal = DecimalNumber(
115 0,
116 show_ellipsis=True,
117 num_decimal_places=3,
118 include_sign=True,
119 )
120 square = Square().to_edge(UP)
121
122 decimal.add_updater(lambda d: d.next_to(square, RIGHT))
123 decimal.add_updater(lambda d: d.set_value(square.get_center()[1]))
124 self.add(square, decimal)
125 self.play(
126 square.animate.to_edge(DOWN),
127 rate_func=there_and_back,
128 run_time=5,
129 )
130 self.wait()
131
132
133class SpiralInExample(Scene):

Callers

nothing calls this directly

Calls 10

DecimalNumberClass · 0.85
SquareClass · 0.85
waitMethod · 0.80
to_edgeMethod · 0.45
add_updaterMethod · 0.45
next_toMethod · 0.45
set_valueMethod · 0.45
get_centerMethod · 0.45
addMethod · 0.45
playMethod · 0.45

Tested by

no test coverage detected