3b1b / 3b1b/manim

The get_all_mobjects_to_update method in the Animation class will result in returning duplicate Mobjects.

未关闭
#2,039 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
93.8k
派生
7.7k
PR 合并指标
PR 指标待抓取

描述

### Describe the error
When the always_rotate function and the FadeIn function are applied to a mobject simultaneously, some errors may occur. In the Animation class, the get_all_mobjects_to_update method would cause duplicate Mobjects to be returned, and update was performed on all of them.

### Code and Error
**Code**:
```
class AnimationIssue(ThreeDScene):

def construct(self) -> None:
day_texture = "https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Whole_world_-_land_and_oceans.jpg/1280px-Whole_world_-_land_and_oceans.jpg"
night_texture = "https://upload.wikimedia.org/wikipedia/commons/thumb/b/ba/The_earth_at_night.jpg/1280px-The_earth_at_night.jpg"
sphere = Sphere(radius=RADIUS)

surface = TexturedSurface(sphere, day_texture, night_texture)
always_rotate(surface)
self.play(FadeIn(surface, run_time=2))
self.wait(3)

```

**Error**:
In the Animation class, the get_all_mobjects_to_update method would cause duplicate Mobjects to be returned, and update was performed on all of them.

### Solution
https://github.com/3b1b/manim/pull/2036

### Environment
**OS System**: windows 11
**manim version**: v1.6.1
**python version**: 3.11

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。