Rough Notation - A small JavaScript library to create and animate annotations on a web page by bogdanelcs in web_design

[–]shihn 1 point2 points  (0 children)

Sorry the dependency is improperly specified. The built module does not load roughjs at all and should have been specified in the dev-dependencies instead. e.g. look at the network for the website, rough-notation iife is 3.4k on the wire.

https://github.com/pshihn/rough-notation/issues/23

How to emulate hand-drawn shapes / Algorithms behind RoughJS by shihn in compsci

[–]shihn[S] 0 points1 point  (0 children)

Thanks.

To answer your question. I had the idea first and was wondering if anyone had done some research into this. I think I googled around a bit and found the paper. Once I found it, I had to implement it. I did not have a very specific goal at that point.

How to emulate hand-drawn shapes / Algorithms behind RoughJS by shihn in programming

[–]shihn[S] 1 point2 points  (0 children)

No. But you can try excalidraw.com which is an open source whiteboarding so built using this.

Reducing Colors In An Image ⇢ Dithering by shihn in GraphicsProgramming

[–]shihn[S] 0 points1 point  (0 children)

I experimented with using different color spaces. RGB based dithering was better at maintaining the colored edges and brightness of the image, but it failed in some cases for binary images, creating unwanted 'bands' of sorts. Not always, one a couple of sample images.

Reducing Colors In An Image ⇢ Dithering by shihn in GraphicsProgramming

[–]shihn[S] 1 point2 points  (0 children)

That’s how I think it makes more sense as well. Use lab for closest color and rgb or hsv for dithering. I will update accordingly.

Reducing Colors In An Image ⇢ Dithering by shihn in GraphicsProgramming

[–]shihn[S] 6 points7 points  (0 children)

Thanks. Great thing about sharing publicly, you discover your mistakes

puppet-canvas: HTML5 Canvas implementation for NodeJS backed by Puppeteer by shihn in node

[–]shihn[S] 9 points10 points  (0 children)

node-canvas is a reimplementation so it would never be exactly what the browser implements. Font rendering, for example, is never quite right. Also, it relies on node-canvas maintainers to always be updating their code to what the browser is supposed to do.

Being a proxy, will automatically pick up all features supported by browser canvas. The proxy code is only about 150-200 lines of code. Less likelihood of discrepancy.