mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[ts] Fixed widget example, using var instead of let
This commit is contained in:
parent
0ebff170bf
commit
2585dc16ab
@ -81,7 +81,7 @@ new spine.SpineWidget("spine-widget", {
|
|||||||
var animIndex = 0;
|
var animIndex = 0;
|
||||||
widget.canvas.onclick = function () {
|
widget.canvas.onclick = function () {
|
||||||
animIndex++;
|
animIndex++;
|
||||||
let animations = widget.skeleton.data.animations;
|
var animations = widget.skeleton.data.animations;
|
||||||
if (animIndex >= animations.length) animIndex = 0;
|
if (animIndex >= animations.length) animIndex = 0;
|
||||||
widget.setAnimation(animations[animIndex].name);
|
widget.setAnimation(animations[animIndex].name);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user