mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Changed implementation of TransformFromCopy
This commit is contained in:
parent
72c5c53c1e
commit
f1b847deff
1 changed files with 10 additions and 3 deletions
|
@ -91,12 +91,19 @@ class ReplacementTransform(Transform):
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class TransformFromCopy(ReplacementTransform):
|
class TransformFromCopy(Transform):
|
||||||
|
"""
|
||||||
|
Performs a reversed Transform
|
||||||
|
"""
|
||||||
|
|
||||||
def __init__(self, mobject, target_mobject, **kwargs):
|
def __init__(self, mobject, target_mobject, **kwargs):
|
||||||
ReplacementTransform.__init__(
|
Transform.__init__(
|
||||||
self, mobject.deepcopy(), target_mobject, **kwargs
|
self, target_mobject, mobject, **kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def interpolate(self, alpha):
|
||||||
|
super().interpolate(1 - alpha)
|
||||||
|
|
||||||
|
|
||||||
class ClockwiseTransform(Transform):
|
class ClockwiseTransform(Transform):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue