Get rid of ContinuallyChangingDecimal

This commit is contained in:
Grant Sanderson
2019-02-11 15:01:38 -08:00
parent b67ff10f8d
commit fd6a6482f9
15 changed files with 66 additions and 49 deletions

View File

@ -117,16 +117,17 @@ class ShowShadows(ThreeDScene):
# self.add_fixed_in_frame_mobjects(decimal)
# decimal.add_updater(update_decimal)
continual_update = ContinualChangingDecimal(
decimal,
lambda a: get_area(self.shadow),
position_update_func=lambda d: self.add_fixed_in_frame_mobjects(d)
decimal.add_updater(
lambda d: d.set_value(get_area(self.shadow))
)
decimal.add_updater(
lambda d: self.add_fixed_in_frame_mobjects(d)
)
# self.add_fixed_orientation_mobjects(label)
self.add_fixed_in_frame_mobjects(label)
self.add(label)
self.add(continual_update)
self.add(decimal)
def add_surface_area_label(self):
text = TextMobject("Surface area: ")