Open hyrious opened 2 years ago
Some further ideas/info about this repo:
<canvas>
and draw-calls. Some elements can be drawn at once (like same-color strokes and shapes). On the other hand, a canvas is a linear memory, which has its size limit. So we'd better only create canvases at a maximum size, then concat them visually on the screen. This also avoids memory-leak on iOS.
Graphics isn't an easy thing at all. Even on the web. This repo is intended to paint one important thing on canvas -- Strokes, which are often provided by ✏️ pen input devices (like wacom tablets or apple pencil). i.e. I don't care about other shapes or functions (embedding a note pad in the canvas?, no). But everything related to simulating a
should be implemented. I came up with these (maybe not completed):<canvas>
><svg>
>{}/()=>{}
. Don't create them, reuse them.Resources: