phetsims / twixt

Animation library for interactive HTML5 graphics
MIT License
1 stars 3 forks source link

SlidingScreen should have a speed option #8

Closed samreid closed 6 years ago

samreid commented 6 years ago

It looks like the speed is currently hard-coded to 2/sec, if I'm understanding this line properly:

this.ratio = Math.min( 1, this.ratio + 2 * dt );

Discovered in https://github.com/phetsims/area-model-common/issues/99

jonathanolson commented 6 years ago

So I hate to do this so quickly, but should be deprecate SlidingScreen in favor of TransitionNode (particularly once it is reviewed/etc.)?

Transition supports providing durations of the animations.

samreid commented 6 years ago

Yep, we should delete SlidingScreen and replace usages with TransitionNode.