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

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 
0013 last_frame = 180
0014 an = objects.Animation(last_frame)
0015 
0016 layer = objects.ShapeLayer()
0017 an.add_layer(layer)
0018 
0019 group = layer.add_shape(objects.Group())
0020 
0021 star = group.add_shape(objects.Star())
0022 star.inner_radius.value = 40
0023 star.outer_radius.value = 100
0024 star.position.value = Point(256, 256)
0025 
0026 star = group.add_shape(objects.Star())
0027 star.inner_radius.value = 20
0028 star.outer_radius.value = 50
0029 star.position.value = Point(256, 256)
0030 
0031 round = layer.add_shape(objects.RoundedCorners())
0032 round.radius.add_keyframe(0, 0)
0033 round.radius.add_keyframe(last_frame/2, 30)
0034 round.radius.add_keyframe(last_frame, 0)
0035 
0036 stroke = group.add_shape(objects.Stroke(Color(1, 1, 0), 10))
0037 
0038 
0039 script.script_main(an)
0040