3 ms·
That's the goal. Missing the 2d path api mainly. There are some interesting technical limitation for fill vs stroke. But for a fun hobby project, only limited
by shihn 7y ago
That's the goal. Missing the 2d path api mainly.
There are some interesting technical limitation for fill vs stroke. But for a fun hobby project, only limited time. :)
- pacaro 7y agoCan't you just replicate the entire 2d context api and pass through to an appropriately scaled (1px per block) offscreen canvas? Then pull the image from that and legoify it up to the display scale. That seems like a lot of unfun boilerplate to write, but ultimately an easier way to implement this, which would give all the gnarly parts of canvas without having to pull in external libraries ¯\_(ツ)_/¯
- shihn 7y agoTrue but having raw parts would give it more flexibility when animating or changing sections of the image. Especially when the canvas size is large, it won't be as optimal
- pacaro 7y agoOptimality may be a function of effort, but your approach definitely seems like a more engaging approach. It's a cool project, thank you.
- shihn 7y agobtw Legra does the offscreen canvas trick when rendering images, but not when drawing primitives