News for hackers. Stuff that matters.
Re:Instant flood fill with HTML Canvas by shaneos on Tuesday May 23, 2023 @06:06PM (#36051430)
Not trolling. I haven’t played with wasm at all. Perhaps if it can fill a 2k x 2k pixel image super fast it would be indistinguishable from my solution. If someone had coded this and open sourced it I’d love to use it
Re:Instant flood fill with HTML Canvas by gfd on Tuesday May 23, 2023 @06:28PM (#36051655)
i used opencv.js a few years ago and it was fast enough to process videos frame by frame for stuff way more complicated than just floodfill. See https://docs.opencv.org/4.7.0/d5/d10/tutorial_js_root.html
Re:Instant flood fill with HTML Canvas by kragen on Tuesday May 23, 2023 @09:31PM (#36052956)
probably fill rates of 240 megapixels per second are going to be hard to reach consistently in javascript but 60 (1k × 1k) seems likely achievable without much in the way of tricks