let all = sequence(); let cur = scene(); 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(); } let bg = fill(rgba( 250.0 / 255.0, 224.0 / 255.0, 55.0 / 255.0, 1.0)).as_drawable(); let bg_item = static(bg, 11.0).as_animated(); cur.add(rotate(text_obj("Linear"), ease_linear()), 0.0, 0); cur.add(rotate(text_obj("Sine"), ease_sine()), 1.5, 0); cur.add(rotate(text_obj("Quad"), ease_quad()), 3.0, 0); cur.add(rotate(text_obj("Cubic"), ease_cubic()), 4.5, 0); cur.add(bg_item, 0.0, -1); let movie = movie(cur.as_animated()); movie;