How to do a JavaScript HTML 5 Canvas image “page flip” like you commonly see in Flash?

StackOverflow https://stackoverflow.com/questions/1835321

  •  11-09-2019
  •  | 
  •  

Question

Has anyone tried recreating the page flip effect with images like you commonly see in Adobe Flash with JavaScript and HTML 5's canvas tag?

Are there any frameworks or JQuery plug-ins that do this type of effect?

The page flip in Flash allows you to grab a corner of the simulated book page and flip the page like you would flip a real book's page.

I really want to learn how to do this with JavaScript and HTML 5's canvas tag, but not sure where to start nor what formulas would be necessary.

Example page flip in flash

Was it helpful?

Solution

You might have a look at another (nice one) implementation of HTML5-based page flipper: http://jpageflipper.codeplex.com/

It's really nice and it's implemented as a jQuery plugin.

OTHER TIPS

You can try jFlip, it's a jQuery Plugin, It's not IE-compliant but I guess it's not a problem for you since you are asking for HTML5.

This one is a jquery plugin and pretty nifty

http://www.turnjs.com/#home

Here is an HTML5 Page flip App that I built using HTML5's Canvas Element & jQuery. It's called RectoVerso.

I also ran across this one: http://romancortes.com/ficheros/page-flip.html
Which is done with only CSS3.

There is a clear and informative case study about creating your own page flip effect based on the one in the 20 Things I Learned About Browsers and the Web book that Narendrakumar linked to. It’s a great implementation to imitate, the case study is clear with relevant code samples, and it was written by a senior interactive developer for Fi, the company who developed the book.

http://js1k.com/2010-first/demo/441
As compact as possible :D

This is better done with SVG's <foreignObject> element and SVG transforms. This blog post by Mark Finkle has some info on rotating stuff as you would need to do in a "page flip/turn" effect. As far as I know, only Gecko 1.9+ and WebKit support this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top