python-lottie  0.6.10+dev2509936
A framework to work with lottie files and telegram animated stickers (tgs)
repeater.py
1 #!/usr/bin/env python3
2 import sys
3 import os
4 sys.path.insert(0, os.path.join(
5  os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
6  "lib"
7 ))
8 from lottie.utils import script
9 from lottie import objects
10 from lottie import Point, Color
11 
12 
13 an = objects.Animation(59)
14 
15 layer = objects.ShapeLayer()
16 an.add_layer(layer)
17 
18 group = layer.add_shape(objects.Group())
19 
20 star = group.add_shape(objects.Star())
21 star.inner_radius.value = 20
22 star.outer_radius.value = 50
23 star.position.value = Point(91, 91)
24 
25 fill = group.add_shape(objects.Fill(Color(1, 1, 0)))
26 stroke = group.add_shape(objects.Stroke(Color(0, 0, 0), 5))
27 
28 repeater = layer.add_shape(objects.Repeater(4))
29 repeater.transform.position.value.x = 110
30 repeater.transform.end_opacity.value = 20
31 
32 repeater1 = layer.add_shape(objects.Repeater(4))
33 repeater1.transform.position.value = Point(0, 110)
34 repeater1.transform.end_opacity.value = 20
35 
36 script.script_main(an)
37 
lottie.nvector.Point
def Point(x, y)
Definition: nvector.py:135
lottie.utils
Definition: __init__.py:1