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 an = objects.Animation(59)
0014 
0015 layer = objects.ShapeLayer()
0016 an.add_layer(layer)
0017 
0018 circle = layer.add_shape(objects.Ellipse())
0019 circle.size.value = Point(100, 100)
0020 circle.position.add_keyframe(0, Point(0, 256))
0021 circle.position.add_keyframe(20, Point(256, 256))
0022 circle.position.add_keyframe(40, Point(256, 0))
0023 circle.position.add_keyframe(60, Point(0, 256))
0024 
0025 
0026 fill = layer.add_shape(objects.Fill(Color(1, 1, 0)))
0027 fill.opacity.add_keyframe(0, 100)
0028 fill.opacity.add_keyframe(30, 10)
0029 fill.opacity.add_keyframe(60, 100)
0030 
0031 
0032 script.script_main(an)
0033 
0034