4 sys.path.insert(0, os.path.join(
5 os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
9 from lottie
import objects
11 from lottie
import Point, Color
13 an = objects.Animation(59)
15 layer = objects.ShapeLayer()
18 circle = layer.add_shape(objects.Ellipse())
19 circle.size.value =
Point(100, 100)
20 circle.position.value =
Point(256, 128)
22 shake(circle.position, 10, 15, 0, 59, 25)
25 g = layer.add_shape(objects.Group())
26 box = g.add_shape(objects.Rect())
27 box.size.value =
Point(200, 100)
28 g.transform.anchor_point.value = g.transform.position.value = box.position.value =
Point(256, 384)
32 layer.add_shape(objects.Fill(Color(1, 1, 0)))
35 script.script_main(an)
def rot_shake(rotation_prop, angles, start_time, end_time, n_frames)
def shake(position_prop, x_radius, y_radius, start_time, end_time, n_frames, interp=easing.Linear())