0

For normal animations, I can just use the following to change the time an animation takes to complete.

myLayer.on Events.Click, ->
    myLayer.animate
        properties: {x:200}
        time: .01


However, this doesn't seem to work for state based animations like:

goop.on Events.Click, ->
    goop.states.next("one", "default")
    time: .2

How do I change the speed of animating state to state?

nipponese
  • 2,813
  • 6
  • 35
  • 51

1 Answers1

2
goop.states.animationOptions =
    curve: 'linear'
    time: .1
  • Is it not possible to assign a duration to an animation with a curve of anything by linear? – nipponese Aug 29 '14 at 18:33
  • Just stumbled upon this so I figured it's a good idea to add this here — if you have any easing function that uses physics, like a spring, e.g. `curve: "spring(400,20,1)"` the time property is ignored. Instead, you control the velocity via the spring parameters and physics determine the time it takes for the animation or state switch to complete. – Sascha Michael Trinkaus Sep 26 '16 at 11:14