funblaster22 / MathMan

Math workbook with tagging and review
https://funblaster22.github.io/MathMan/
0 stars 0 forks source link

Panning/zooming #2

Open funblaster22 opened 9 months ago

funblaster22 commented 9 months ago

In order to do this, I would probably want to chunk the canvas (as opposed to continually expanding the main canvas)

Considered making each stroke its own entity, which would make undoing easy, but massively complicates erasing

Leaning towards making screen-sized chunks, that way I can easily check if crossing chunks with a x/y

To do: further deliberate pros and cons, such as memory consumed, drawing across chunks, and more as I think of them

funblaster22 commented 9 months ago

Actually, it might just be easier to use a library. See this fabric.js demo, or tldraw which has a lot more features I want.

funblaster22 commented 9 months ago

More research: Excalidraw seems like it has better documentation & svg import/export, but both use React, so might need to rewrite (ok since a majority of the app is the drawing logic, which would be replaced). There's also MethodDraw, but it's an app, not a library. I also realized drawing to SVG isn't that difficult, but I might want a smoothing/simplifying library