blasten / turn.js

The page flip effect for HTML5
www.turnjs.com
Other
7.25k stars 2.48k forks source link

Can a called turn mimic a corner-peel animation? #20

Open p-b opened 12 years ago

p-b commented 12 years ago

Is it possible to have a called page turn (from a button or a swipe event) be set to do a default corner-peel type animation rather than sliding over as a straight horizontal wipe? Thanks!

blasten commented 12 years ago

Not right now, I think it would be a great idea.

cipnt commented 12 years ago

Agree! +1

blasten commented 12 years ago

How do you think it should work? How would you like to implement that?

p-b commented 12 years ago

I was initially envisioning it as either setting a pixel or % offset --so a corner is 'dragged' to a point on the binding that is +- Xpx or X% from the edge and then released and the animation continues normally.

So a typical turn would be to drag the bottom corner up 25-35% of the magazine height for the first half of the animation, then 'let go.'

Alternately, an offset-angle or angle-range could be set for the leading edge of the turning page. This might be the more concise solution once vertical paging and other features go in, as you would not need to specify a corner, that would be automatic based on the angle, and could vary from turn to turn if a wide range such as -30 to 30 was used.

Not sure which of those would be easier to implement...

blasten commented 12 years ago

Something like: $('sel').turn('move', {x:50, y:50}); You right, there will be necessary a coordinate system, I think % offset sounds like the most convient way.

FlashJunior commented 12 years ago

+1

jonaslund commented 12 years ago

+2