Close Show/hide page

3D Page Curl Effect using Papervision3D

Thumbnail - Click me
The venerable Flash effect of turning a page in a book done in 3D. I originally designed and programmed this effect in Actionscript 2 using a home-grown 3D class library at about the time Papervision was entering public beta. This implementation using Papervision3D and AS3 runs a few times faster.

Press ENTER to create new instances of the book. Press it several more times and watch your browser chug :).

Here’s the main class for the page turn effect. I used the code for the PV3D Plane class as a starting point (but, in hindsight, probably should have subclass’ed from it instead). To create the appearance of a rotation of the 3D object, the individual vertices are rotated around the Y axis by increasing amounts depending on their (original) position along the X axis.

Version: 0.9B – Last updated on 4/22/2007

Licensed under a Creative Commons Attribution 3.0 License.

22 Responses to “3D Page Curl Effect using Papervision3D”

  1. Flash Game Guy:

    Great Job! I’ve seen a bunch of these, and have worked on creating dynamic catalogs with one of the more popular ones online. I really like this one though. Are there any plans to add shadowing and the ability to flip pages from the corners in?

  2. Skyler:

    Hello Lee,

    Fantastic demo with the page Curl. Great work!

    Thank you also very much for sharing the CurlingPlane class. However, when I try to use it I don’t get anything showing on screen (though I have succesfully gotten Collada files, and other primitives in papervision to display).

    I’m calling the constructor with a reference to a bitmapdata object embedded in the FLA:

    var myBD:LibraryBitmap = new LibraryBitmap (0, 0);
    var myBook:CurlingPlane = new CurlingPlane(myBD);
    scene.addChild(myBook);

    I have the class imported and have tried various things but to no avail. I don’t get any compile errors but nothing shows. Please assist.

    thanks,

    Skyler

  3. Ade:

    Does this still work with Papervision version 1.5? Like Skyler, I can’t get anything to show, but no errors are produced

  4. beastriker:

    WoW! nice!! like a real paper book =)

  5. Pedro:

    Great work!

  6. cali:

    nice work…but if u let us download it we wouldnt had to steal it… :P
    thnx

  7. romantic:

    Great!!! like a real book!!!

  8. Marcio:

    Papervision 3D GreatWhite, no have the Mesh3D.as, how i can fix this?

  9. memo:

    Really love the way the pages have momentum so if you start moving and let go, sometimes it goes up but falls back down, otherwise it completes the turn on its own… nice touch.

  10. Rhye:

    Very Nice Congratulations!!!

  11. Trambroid:

    Very good! I like it! nice job!

  12. kartec:

    Great. Very fluid. Nice job.

  13. Bastik:

    like a real paper book! cool!

  14. salman:

    how can i use it where i want to use it in the protfolio…
    hope to hear from you

    its really a nice script

  15. gern:

    very nice!

    any chance this will let me put video on the pages or create two-page spreads?

  16. admin:

    With some modifications, for sure…

  17. Bristol Web Design:

    This demo is extended here:

    http://danro.net/2007/11/08/pv3d-pageflip-demo/

    Very useful!

    Holland Risley

  18. Meiji:

    Awesome! This is a very nice example! However, I keep getting this problem:

    TypeError: Error #2023: Class CurlingPlane$ must inherit from Sprite to link to the root.

    And then it shows nothing. I’m trying to run the project from Flex, am I missing something?

    Thanks in advance!
    Meiji

  19. Lee:

    Meiji, the attached class isn’t designed to be run as a document class. You’d want to create an instance of the class in order to use it. Please note that it was made with an old version of Papervision (1.5), so you’ll also have to do some … investigative refactoring. Thanks.

  20. Dan:

    Really Great Work.

    I got a main class and instantiate your class inside. Doesn’t really work.
    Would you mind showing us the rest of the code?

    I’m really interested in this project and how you did it?

    At least a hint to get it running would be awesome ;)

    Thanks in advance!
    Dan

  21. David:

    By any chance has anyone already done the “investigative refactoring?” :)

  22. jayan Ramesh:

    Marveious Work!!!!

Leave a Reply