Sprite Animation glitch

So I have a demo using the new SpriteMixer system ( which is AWESOME, btw, nice job, @felixmariotto ) ! Keep up the great work! :slight_smile: I for some reason can’t get the animation sequence to play correctly when I’m holding the up key or W key. It just waits until the key is up & then plays the looped animation sequence.

Here is the spritesheet{s} :


link-walk.png :

link-walk

link-air-sword.png :

link-air-sword


Here is the demo :

http://babylontesting.epizy.com/Three.js/three-SpriteMixer-master/

Here is the source :

view-source:http://babylontesting.epizy.com/Three.js/three-SpriteMixer-master/js/mainframes/brain-mainframe.js

Line{s} 24 - 28 & 230 - 247


Can you please copy here the part of your code that listen for keyboard events ?

@felixmariotto: Yes.


This is mainframe I created to use key events :

view-source:http://babylontesting.epizy.com/Three.js/three-SpriteMixer-master/js/mainframes/keys-mainframe.js


Here’s where the code listens for keyboard events ( mainly used for keydown ) :

view-source:http://babylontesting.epizy.com/Three.js/three-SpriteMixer-master/libs/plugins/threex/threex.keyboardstate/threex.keyboardstate.js

Here’s the other key library that listen for keyboard events ( mainly used for keypress / keyup ) :

view-source:http://babylontesting.epizy.com/Three.js/three-SpriteMixer-master/libs/plugins/stemkoski-keyboardstate/KeyboardState.js


Apparently there is a problem with how you use this keystate library, I never ised it, I cannot help you.

@felixmariotto : What do you mean there is a problem with the keystate library? it works fine for anything else???

@felixmariotto : Never mind, I got it working! Thank You! :slight_smile: