Looks like you are building something like a book flip animation. I saw your other Question as well. You cannot possibly fold a single surface from its middle. You can create a View
with two surfaces and add functions in the View
to flip only the right surface as you are doing now.
But you should first Take a look at using the concept of Views
and constructors. A good start will be the SlideShow
tutorial they already have in place.
http://famo.us/university/lessons/#/famous-101/slideshow/1
In your case you probably will have to pass your ajax URL
to a slide view and process it in Constructor to load data on demand. The SlideShow view will correspond to a book View and a SlideView
will correspond to a open page with left
and right
as two surfaces in the View
. You need references to left and right surfaces' modifiers
, which you can use to carryout the animations.