mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +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;
|
||||
widget.canvas.onclick = function () {
|
||||
animIndex++;
|
||||
let animations = widget.skeleton.data.animations;
|
||||
var animations = widget.skeleton.data.animations;
|
||||
if (animIndex >= animations.length) animIndex = 0;
|
||||
widget.setAnimation(animations[animIndex].name);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user