3b1b / 3b1b/manim

FadeOut and transparency

オープン
#125 コメント 1 件 リアクション 0 件 担当者 1 名 @3b1b が担当を希望しています GitHub で見る
主要言語
Python
スター
93.9k
フォーク
7.7k
平均マージ
2日 13時間
マージ済み PR(30日)
4

説明

When fading out a composed Mobject (i. e. containing submobs), the pixels fade to black instead of the color of the mobject hidden behind it.

```
from helpers import *
from mobject import Mobject
from mobject.vectorized_mobject import *
from animation.animation import Animation
from animation.transform import *
from animation.simple_animations import *
from topics.geometry import *
from scene import Scene
from camera import Camera

class SampleScene(Scene):

def construct(self):

lines = Mobject() # VMobject()
line1 = Line(LEFT, RIGHT)
line2 = Line(UP, DOWN)
lines.add(line1, line2)

rect = Rectangle(fill_color = BLUE, fill_opacity = 1)

self.add(lines)
self.add(rect)

self.wait()

self.play(FadeOut(lines))
```

Result:

bildschirmfoto 2018-02-15 um 20 52 11

This does not happen in the exported PNG, and also not if `lines` is instantiated as a `VMobject`.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。