0

i have 2 views in fame.us app, and slide in EdgeSwapper view, and i want change default effect of EdgeSwapper.show(). I want effect like a smooth transition forward and backwards, how i can do it?

1 Answers1

0

Famo.us is open source, so you could make a copy (clone) of the EdgeSwapper view.

Change the _transformMap function in your new view to a new transform.

Here is a jsBin of a new view called BackSwapper that has a new transform as follows:

function _transformMap(zMax, progress) {
    //return Transform.translate(this._size[0] * (1 - progress), 0, zMax * (1 - progress));
  return Transform.translate(0, 0, -this._size[0] * (1 - progress));
}
talves
  • 13,993
  • 5
  • 40
  • 63