zinehub/PageFlip ? reverse-engineered prompt

Reverse engineered prompt

Build me a small JavaScript library that makes a book or magazine feel like it’s being flipped page by page with a realistic animation.

I want it to work with either images on a canvas or normal HTML content inside pages, and it should be easy to set up with a simple root element plus a few settings like width, height, and whether the book stretches to fit the screen. It should work nicely on desktop and mobile, support both portrait and landscape layouts, and let me choose whether pages act soft or hard, especially for cover pages. Please include basic controls for going to the next or previous page, jumping to a page, and events for things like page change and orientation change. It should also be possible to update or destroy the book cleanly.

Keep it dependency free, make the API simple, and if you need current browser support details or build tool guidance, look up the latest docs online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab