News for hackers. Stuff that matters.
Re:Show HN: LegraJS – Draw using Lego-like brick shapes on C... by marclave on Sunday November 24, 2019 @03:25PM (#21623097)
What would the optimizations be for a larger canvas?

Does it redraw the whole canvas when an update is made* to a single line when there are several other lines on the canvas?

*edit for spelling mistakes

Re:Show HN: LegraJS – Draw using Lego-like brick shapes on C... by shihn on Sunday November 24, 2019 @03:46PM (#21623259)
It doesn't redraw the whole canvas. The optimizations are really needed when 'filling' a shape. If you draw a large polygon, it may take a little longer to fill it with bricks. Optimizations can be made by using WebGL instead.