python-lottie  0.6.8+dev6bb61be
A framework to work with lottie files and telegram animated stickers (tgs)
lottie.objects.properties.AnimatableMixin Class Reference
Inheritance diagram for lottie.objects.properties.AnimatableMixin:
[legend]

Public Member Functions

def __init__ (self, value=None)
 
def clear_animation (self, value)
 Sets a fixed value, removing animated keyframes. More...
 
def add_keyframe (self, time, value, interp=easing.Linear(), *args, **kwargs)
 
def get_value (self, time=0)
 Returns the value of the property at the given frame/time. More...
 
def to_dict (self)
 
def __repr__ (self)
 
def __str__ (self)
 
def merge_keyframes (cls, items, conversion)
 
def load (cls, lottiedict)
 

Public Attributes

 value
 Non-animated value. More...
 
 property_index
 Property index. More...
 
 animated
 Whether it's animated. More...
 
 keyframes
 Keyframe list. More...
 

Static Public Attributes

 keyframe_type = Keyframe
 

Detailed Description

Definition at line 231 of file properties.py.

Constructor & Destructor Documentation

◆ __init__()

def lottie.objects.properties.AnimatableMixin.__init__ (   self,
  value = None 
)

Member Function Documentation

◆ __repr__()

def lottie.objects.properties.AnimatableMixin.__repr__ (   self)

Definition at line 326 of file properties.py.

◆ __str__()

def lottie.objects.properties.AnimatableMixin.__str__ (   self)

Definition at line 333 of file properties.py.

◆ add_keyframe()

def lottie.objects.properties.AnimatableMixin.add_keyframe (   self,
  time,
  value,
  interp = easing.Linear(),
args,
**  kwargs 
)
Parameters
timeThe time this keyframe appears in
valueThe value the property should have at time
interpThe easing callable used to update the tangents of the previous keyframe
argsExtra arguments to pass the keyframe constructor
kwargsExtra arguments to pass the keyframe constructor
Note
Always call add_keyframe with increasing time value

Definition at line 252 of file properties.py.

◆ clear_animation()

def lottie.objects.properties.AnimatableMixin.clear_animation (   self,
  value 
)

Sets a fixed value, removing animated keyframes.

Definition at line 244 of file properties.py.

◆ get_value()

def lottie.objects.properties.AnimatableMixin.get_value (   self,
  time = 0 
)

Returns the value of the property at the given frame/time.

Reimplemented in lottie.objects.properties.Value.

Definition at line 282 of file properties.py.

◆ load()

def lottie.objects.properties.AnimatableMixin.load (   cls,
  lottiedict 
)

Reimplemented in lottie.objects.properties.PositionValue.

Definition at line 363 of file properties.py.

◆ merge_keyframes()

def lottie.objects.properties.AnimatableMixin.merge_keyframes (   cls,
  items,
  conversion 
)
@todo Remove similar functionality from SVG/sif parsers

Definition at line 339 of file properties.py.

◆ to_dict()

def lottie.objects.properties.AnimatableMixin.to_dict (   self)

Definition at line 316 of file properties.py.

Member Data Documentation

◆ animated

lottie.objects.properties.AnimatableMixin.animated

Whether it's animated.

Definition at line 240 of file properties.py.

◆ keyframe_type

lottie.objects.properties.AnimatableMixin.keyframe_type = Keyframe
static

Definition at line 232 of file properties.py.

◆ keyframes

lottie.objects.properties.AnimatableMixin.keyframes

Keyframe list.

Definition at line 242 of file properties.py.

◆ property_index

lottie.objects.properties.AnimatableMixin.property_index

Property index.

Definition at line 238 of file properties.py.

◆ value

lottie.objects.properties.AnimatableMixin.value

Non-animated value.

Definition at line 236 of file properties.py.


The documentation for this class was generated from the following file: