let all = sequence(); fn text_obj(name) { let black = rgba(0.0, 0.0, 0.0, 1.0); let text = text(name, "SF Mono", 0.05, black).as_drawable(); text; } fn rotate(drawable, ease) { let x = 0.8; let y = 0.55; let seq = sequence(); let static_corner = static(drawable, 0.5).as_animated(); let static_moving = static(drawable, 1.0).as_animated(); seq.add(static_corner); seq.add(move(static_moving, size(x, 0.0), ease).as_animated()); seq.add(positioned(static_corner, size(x, 0.0)).as_animated()); seq.add(positioned(move(static_moving, size(0.0, y), ease).as_animated(), size(x, 0.0)).as_animated()); seq.add(positioned(static_corner, size(x, y)).as_animated()); seq.add(positioned(move(static_moving, size(-x, 0.0), ease).as_animated(), size(0.0, y)).as_animated()); seq.add(positioned(static_corner, size(0.0, y)).as_animated()); seq.add(positioned(move(static_moving, size(0.0, -y), ease).as_animated(), size(0.0, 0.0)).as_animated()); seq.add(static_corner); seq.as_animated(); } all.add(rotate(text_obj("Linear"), ease_linear())); all.add(rotate(text_obj("Sine"), ease_sine())); all.add(rotate(text_obj("Quad"), ease_quad())); all.add(rotate(text_obj("Cubic"), ease_cubic())); let movie = movie(all.as_animated()); movie;