Animation class for controlling rotation, which inherits from Animation.
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since version 4.1.0(11).
System capability: SystemCapability.Map.Core
Since: 4.1.0(11)
constructor(fromDegree: number, toDegree: number)
Constructor, which is used to construct an animation instance for rotation control.
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since version 4.1.0(11).
System capability: SystemCapability.Map.Core
Since: 4.1.0(11)
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| fromDegree | number | Yes | Start angle, in degrees. The value range is [0, 360]. For a value out of the range, the nearest boundary value is used. |
| toDegree | number | Yes | Target angle, in degrees. The value range is [0, 360]. For a value out of the range, the nearest boundary value is used. |
Example:
let animation: map.RotateAnimation = new map.RotateAnimation(15, 150);