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.utils.animation import shake, rot_shake
0011 from lottie import Point, Color
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.value = Point(256, 128)
0021 
0022 shake(circle.position, 10, 15, 0, 59, 25)
0023 
0024 
0025 g = layer.add_shape(objects.Group())
0026 box = g.add_shape(objects.Rect())
0027 box.size.value = Point(200, 100)
0028 g.transform.anchor_point.value = g.transform.position.value = box.position.value = Point(256, 384)
0029 rot_shake(g.transform.rotation, Point(-15, 15), 0, 60, 10)
0030 
0031 
0032 layer.add_shape(objects.Fill(Color(1, 1, 0)))
0033 
0034 
0035 script.script_main(an)