Animation » A layer’s animation options
A layer’s animation options
Instead of setting the options
for every single animation, you can also define them for all the animations on a layer.
# options for all the layer’s animations
purpleSquare.animationOptions =
time: 6
looping: yes
With the above options, any animation that we start on the layer will last six seconds and will repeat forever.
# rotate around the Z axis
purpleSquare.animate
rotation: 360
# and also around the Y axis
purpleSquare.animate
rotationY: 360
When you find yourself setting the same animation options on different layers, know that you can set a default for all the animations in your project.