demo/animated-model/animate/animation-target.js
function ToggleAnimation (AppState) {
  var state = AppState.get()
  if (
    state.currentAnimation[0] === animationDictionary.bend[0] &&
    state.currentAnimation[1] === animationDictionary.bend[1]
  ) {
    state.currentAnimation = animationDictionary.jump
  } else {
    state.currentAnimation = animationDictionary.bend
  }

  AppState.set(state)
}
function ToggleAnimation (AppState) {
  var state = AppState.get()
  if (
    state.currentAnimation[0] === animationDictionary.bend[0] &&
    state.currentAnimation[1] === animationDictionary.bend[1]
  ) {
    state.currentAnimation = animationDictionary.jump
  } else {
    state.currentAnimation = animationDictionary.bend
  }

  AppState.set(state)
}
function ToggleAnimation ( AppState ) { var state = AppState . get ( ) if ( state . currentAnimation [ 0 ] === animationDictionary . bend [ 0 ] && state . currentAnimation [ 1 ] === animationDictionary . bend [ 1 ] ) { state . currentAnimation = animationDictionary . jump } else { state . currentAnimation = animationDictionary . bend } AppState . set ( state ) }
We have two animations This switches from one animation to the other
We have two animations This switches from one animation to the other