|
2 | 2 |
|
3 | 3 | Animation clips only describe the animation data of a certain type of object, such as a character running, walking, jumping, etc., but are not bound to the specific object to be animated. Animation states are Animation Clips that are used to control the animation on a certain object, similar to a player. In addition to providing simple control functions that are also available for Animation components, they also provide more animation information and an animation control interface that allows control of animation playback such as speed control, setting loop mode, etc. An Animation Clip can be used by multiple animation states at the same time.
|
4 | 4 |
|
5 |
| -Animation states are managed by [Class `AnimationState`](__APIDOC__/en/#/docs/3.3/en/animation/Class/AnimationState). |
| 5 | +Animation states are managed by [Class `AnimationState`](__APIDOC__/en/#/docs/3.4/en/animation/Class/AnimationState). |
6 | 6 |
|
7 | 7 | ## Setting the playback speed
|
8 | 8 |
|
9 |
| -First get the animation state by [getState()](__APIDOC__/en/#/docs/3.3/en/animation/Class/Animation?id=getstate): |
| 9 | +First get the animation state by [getState()](__APIDOC__/en/#/docs/3.4/en/animation/Class/Animation?id=getstate): |
10 | 10 |
|
11 | 11 | ```ts
|
12 | 12 | // Get the Animation component
|
@@ -34,14 +34,14 @@ The animation state records the **cumulative play time** of the animation. Initi
|
34 | 34 |
|
35 | 35 | The playback position of the animation at any given moment is called **progress time**, so the progress time is always in the range `[0, animation period]`.
|
36 | 36 |
|
37 |
| -- The **cumulative play time** is obtained from the [time](__APIDOC__/en/#/docs/3.3/en/animation/Class/AnimationState?id=time) field of `AnimationState`, and can be set explicitly. |
38 |
| -- The **progress time** is obtained from the [current](__APIDOC__/en/#/docs/3.3/en/animation/Class/AnimationState?id=current) field of `AnimationState`, and is **read-only**. |
| 37 | +- The **cumulative play time** is obtained from the [time](__APIDOC__/en/#/docs/3.4/en/animation/Class/AnimationState?id=time) field of `AnimationState`, and can be set explicitly. |
| 38 | +- The **progress time** is obtained from the [current](__APIDOC__/en/#/docs/3.4/en/animation/Class/AnimationState?id=current) field of `AnimationState`, and is **read-only**. |
39 | 39 |
|
40 | 40 | The wrap mode and repeat count of the animation determines the progress time of the animation when it reaches a certain time, whether the **cumulative play time** is increased by time or changed by direct setting, the **progress time** will be changed accordingly.
|
41 | 41 |
|
42 | 42 | ## Wrap Mode and Repeat Count
|
43 | 43 |
|
44 |
| -Animation can be played to the end and stop, or it can be looped all the time, or it can be played to the end and then looped from the end to the beginning, these are collectively called wrap modes and are represented by the enumeration [`AnimationClip.WrapMode`](__APIDOC__/en/#/docs/3.3/en/animation/Class/AnimationState?id=wrapmode), the following are included: |
| 44 | +Animation can be played to the end and stop, or it can be looped all the time, or it can be played to the end and then looped from the end to the beginning, these are collectively called wrap modes and are represented by the enumeration [`AnimationClip.WrapMode`](__APIDOC__/en/#/docs/3.4/en/animation/Class/AnimationState?id=wrapmode), the following are included: |
45 | 45 |
|
46 | 46 | | Wrap Mode | Description |
|
47 | 47 | | :--- | :--- |
|
@@ -92,4 +92,4 @@ The relationship between the playback control and the playback state is shown in
|
92 | 92 |
|
93 | 93 | 
|
94 | 94 |
|
95 |
| -The animation state allows getting information about all the animations in order to use this information to determine what needs to be done. For more interfaces, please refer to [Class `AnimationState`](__APIDOC__/en/#/docs/3.3/en/animation/Class/AnimationState). |
| 95 | +The animation state allows getting information about all the animations in order to use this information to determine what needs to be done. For more interfaces, please refer to [Class `AnimationState`](__APIDOC__/en/#/docs/3.4/en/animation/Class/AnimationState). |
0 commit comments