|
@@ -30,9 +30,9 @@ Spine animation
|
|
|
{.inline}
|
|
|
|
|
|
Property animation
|
|
|
-: All numeric properties (numbers, vector3, vector4 and quaterions) can be animated in the built in animation system, using the function `go.animate()`. The engine will automatically "tween" properties for you according to given playback modes and easing functions. You can also specify custom easing functions.
|
|
|
+: All numeric properties (numbers, vector3, vector4 and quaterions) and shader constants can be animated with the built in animation system, using the function `go.animate()`. The engine will automatically "tween" properties for you according to given playback modes and easing functions. You can also specify custom easing functions.
|
|
|
|
|
|
- {.inline}
|
|
|
+ {.inline srcset="images/animation/[email protected] 2x"}
|
|
|
{.inline}
|
|
|
|
|
|
## Playing flip-book animations
|
|
@@ -125,11 +125,11 @@ function init(self)
|
|
|
-- Play the "walk" animation on component "spinemodel" and blend against previous
|
|
|
-- animation for the first 0.1 seconds, then call callback.
|
|
|
local anim_props = { blend_duration = 0.1 }
|
|
|
- spine.play_anim("#spinemodel", "walk", go.PLAYBACK_LOOP_FORWARD, anim_props, anim_done)
|
|
|
+ spine.play_anim("#spinemodel", "run", go.PLAYBACK_LOOP_FORWARD, anim_props, anim_done)
|
|
|
end
|
|
|
```
|
|
|
|
|
|
-
|
|
|
+{srcset="images/animation/[email protected] 2x"}
|
|
|
|
|
|
If an animation is played with any of the `go.PLAYBACK_ONCE_*` modes and you have provided a callback function to `spine.play_anim()` the callback is run on animation complete. See below for information on callbacks.
|
|
|
|
|
@@ -156,7 +156,7 @@ When tweening or setting the cursor, timeline events may not fire as expected.
|
|
|
|
|
|
The individual bones in the Spine skeleton are represented internally as game objects. In the *Outline* view of the Spine model component, the full hierarchy is visible. You can see each bone's name and its place in the skeleton hierarchy.
|
|
|
|
|
|
-
|
|
|
+{srcset="images/animation/[email protected] 2x"}
|
|
|
|
|
|
With the bone name at hand, you are able to retrieve the instance id of the bone in runtime. The function [`spine.get_go()`](/ref/spine#spine.get_go) returns the id of the specified bone and you can, for instance, child other game objects under the animated game object:
|
|
|
|
|
@@ -242,11 +242,9 @@ Animation clips in Collada are not supported. To use multiple animations per mod
|
|
|
|
|
|
## The bone hierarchy
|
|
|
|
|
|
-The bones in the Model skeleton are represented internally as game objects. In the *Outline* view of the Model component, you can see the bone hierarchy and each bone's name.
|
|
|
+The bones in the Model skeleton are represented internally as game objects.
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-You can retrieve the instance id of the bone game object in runtime. The function [`model.get_go()`](/ref/model#model.get_go) returns the id of the specified bone.
|
|
|
+You can retrieve the instance id of the bone game object in runtime. The function [`model.get_go()`](/ref/model#model.get_go) returns the id of the game object for the specified bone.
|
|
|
|
|
|
```lua
|
|
|
-- Get the middle bone go of our wiggler model
|