phetsims / twixt

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

"wipe" transition for games #5

Closed pixelzoom closed 6 years ago

pixelzoom commented 6 years ago

In https://github.com/phetsims/vegas/issues/65#issuecomment-380930042, we identified scenarios where we want to use a "wipe" transition between user-interfaces in games.

@jonathanolson implemented a "swipe" (sic) transition for make-a-ten (see https://github.com/phetsims/make-a-ten/issues/255), and in https://github.com/phetsims/vegas/issues/18#issuecomment-380152353 said:

It's SUN/SlidingScreen, but as noted it could probably be moved to TWIXT.

So that I can use this in Equality Explorer, I started to move SlidingScreen to TWIXT. But I discovered another SlidingScreen implementation in make-a-ten which is significantly different. I'm going to proceed on the assumption that the one is vegas is the one that I should be using, and that @jonathanolson will replace/remove the implementation in make-a-ten (see https://github.com/phetsims/make-a-ten/issues/283).

phet-steele commented 6 years ago

@pixelzoom area model is failing in CT with:

Error: Assertion failed: not namespaced: twixt.SlidingScreen
    at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/assert/js/assert.js:22:13)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/joist/js/checkNamespaces.js?bust=1523646542278:79:17
    at visit (https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/joist/js/checkNamespaces.js?bust=1523646542278:64:11)
    at checkNamespaces (https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/joist/js/checkNamespaces.js?bust=1523646542278:78:5)
    at Object.launch (https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/joist/js/SimLauncher.js?bust=1523646542278:136:17)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/area-model-algebra/js/area-model-algebra-main.js?bust=1523646542278:34:15
    at Object.execCb (https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/sherpa/lib/require-2.1.11.js:1650:25)
    at Module.check (https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/sherpa/lib/require-2.1.11.js:866:35)
    at Module.<anonymous> (https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/sherpa/lib/require-2.1.11.js:1113:20)
    at https://bayes.colorado.edu/continuous-testing/snapshot-1523644911717/sherpa/lib/require-2.1.11.js:132:17

Not sure if this is a twixt problem or area-model problem, so I'm reporting this at the source of the motivation.

pixelzoom commented 6 years ago

Fixed namespace bug, closing.

pixelzoom commented 6 years ago

Reopening... @jonathanolson suggested that SlidingScreen be renamed Wipe*. Sounds good to me, but I really can't spend any more time on this, so assigning to him.

pixelzoom commented 6 years ago

SlidingScreen is now used in Equality Explorer, so please rename there as well.

jonathanolson commented 6 years ago

I actually looked up some terminology for "wipe", and it's actually a different type of animation, see https://en.wikipedia.org/wiki/Wipe_(transition).

I implemented slides/wipes/dissolve in Transition/TransitionNode, and added a 4th screen to the TWIXT demo to show how they work.

jonathanolson commented 6 years ago

Assigning @samreid for review/collaboration.

samreid commented 6 years ago

The proposal is to deprecate/delete SlidingScreen and proceed with Transition/TransitionNode, see https://github.com/phetsims/twixt/issues/10