Scale
The Scale action changes the node's scale over time.
The options object for the Scale action has the following properties:
scale: The scale of the node once the Action has completed. This is a ratio, so a value of 2 will double the size of the node.duration: The duration of the animation in milliseconds.runDuringTransition: A boolean indicating whether the action should run during a transition. This is an optional property. If not specified, the default isfalse.
The below example will scale the circle to 2.5 times its original size when the button is clicked.
clickMeButton.onTapDown(() => {
circle.run(Action.scale({
scale: 2.5,
duration: 1000,
}));
console.log("Circle scale action has begun.");
});
As in the Move example, repeated clicks will run the action again, but because the circle is already at its destination scale, there will be no visible change.
Loading...