Now I need to create custom button to change animation. Please help my to do this. I tried:
<div class="my_button" onclick="change_animation()"></div>
<script>
function change_animation() {
SpinePlayer.setAnimation('jump');
}
</script>
But I'm geting "SpinePlayer is not defined" error.<script>
function change_animation() {
SpinePlayer.setAnimation('jump');
}
</script>