StPageFlip
StPageFlip copied to clipboard
Implementation Question
Hi,
I am trying to build a book with multiple artworks, but I am building it with Konvajs and React. So essentially a page right now is a canvas. All of the details of each page are Konva node which is just canvas element.
When I try to put together with StPageFlip, I think there is too many canvas on the screen as each page is a canvas itself. I was following your tutorial on React forward Ref
import { Stage } from "react-konva";
const Page = (forwardRef) => {
return <Stage> </Stage> <= this is a canvas
}
<PageFlip>
<Page> => if I construct more that 10 page, this is extremely slow
<PageFlip />
Can you give me some pointer, on how to reuse a book flip to pass dynamic content, and how to tell the book that there is only two pages
<PageFlip>
<Page currentLeft>
<Page currentRight>
<Page nextLeft>
<Page nextRight>
<PageFlip />
I think that minimal set up is doable, as I can change the data of the Page dynamically when the user flip. Also if you have suggestions on rendering a canvas within a canvas is ideal, it is very CPU intensive.