How do I detect which take I'm on, to do a "if" statement?

(Pierre Savoie) #1

Example of what I think I should do :

			$("#button_1").on("click", function (event) {
			if (animations = [0][0]) {
			sketchfabAPIUtility.api.seekTo( 3.1 );
			} else {;
			setTimeout(function(){ sketchfabAPIUtility.api.setCurrentAnimationByUID( Take002 ); }, 1200);


I just want to do “x” if I’m in take 01 or “y” if I’m in another take.


Hmm. I don’t think it’s possible yet to get the current animation, we would probably need to add a new method.

What’s the use case?

(Pierre Savoie) #3

I want to create animation transition between take.

It would go like this:

  • Click on button 01, animation 1intro plays and then goes to animation 1idle.
  • If I click on button 02, it detect I’m on 1idle, plays 1outro then goes to 2intro to 2idle.