File indexing completed on 2025-01-19 04:00:00

0001 #!/usr/bin/env python3
0002 import sys
0003 import os
0004 sys.path.insert(0, os.path.join(
0005     os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
0006     "lib"
0007 ))
0008 from lottie.utils import script
0009 from lottie import objects
0010 from lottie import Point, Color
0011 
0012 an = objects.Animation(59)
0013 
0014 layer = objects.ShapeLayer()
0015 an.add_layer(layer)
0016 
0017 
0018 g1 = layer.add_shape(objects.Group())
0019 circle = g1.add_shape(objects.Ellipse())
0020 circle.size.value = Point(100, 100)
0021 circle.position.value = Point(200, 100)
0022 g1.add_shape(objects.Fill(Color(1, 0, 0)))
0023 g1.add_shape(objects.Stroke(Color(0, 0, 0), 5))
0024 
0025 g2 = layer.add_shape(objects.Group())
0026 star = g2.add_shape(objects.Star())
0027 star.inner_radius.value = 20
0028 star.outer_radius.value = 50
0029 star.position.value = Point(300, 100)
0030 g2.add_shape(objects.Fill(Color(0, 1, 0)))
0031 g2.add_shape(objects.Stroke(Color(0, 0, 0), 5))
0032 
0033 g3 = layer.add_shape(objects.Group())
0034 rect = g3.add_shape(objects.Rect())
0035 rect.size.value = Point(100, 100)
0036 rect.position.value = Point(100, 100)
0037 g3.add_shape(objects.Fill(Color(0, 0, 1)))
0038 g3.add_shape(objects.Stroke(Color(1, 1, 1), 5))
0039 
0040 
0041 script.script_main(an)