This example adds a single image item and then scripts it with an elastic bounce.
height are set to 70 percent which overrides the image’s default aspect ratio. The focal point of the stretches is defined by setting the transformOrigin to the bottom, center of the image.
The animation is performed with three scripts, which all execute at the same time. The first script performs two actions. It scales the image up to 140 percent, and nudges the position down a bit. The position is moved to compensate for the extra whitespace in the image. The second action simply returns the position.
The second and third scripts have a single action each. They both
delay the same amount of time as the scaling action in the first script. They then take over the scaling and bring it back to 100%.
Two scripts are used so that the dimensions can be animated with different eases.