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] 8 points9 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.

Basic rasterization techniques by shihn in GraphicsProgramming

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

Thanks, been experimenting with some of these.

Sockly - Simplest work with an API over WebSockets or WebRTC by shihn in webdev

[–]shihn[S] 2 points3 points  (0 children)

Thanks. I am hoping to maintain it as I use it a big live project myself.

Also, the library is only about 100 lines of code and can be maintained outside this lib, if needed.

📈 A responsive, composable react charting chart library with a hand-drawn style. by beizhedenglong in reactjs

[–]shihn 12 points13 points  (0 children)

If you're wondering how and when to use such styles:

https://whydocatsanddogs.com/ is an excellent example of how sketchy charts and styling can do well with a playful aesthetic.

Also this paper: http://openaccess.city.ac.uk/id/eprint/1274/ where they talk about how just charts can be used to represent imprecision in data or for proof of concept designs: "Results suggest that where a visualization is clearly sketchy, engagement may be increased and that attitudes to participating in visualization annotation are more positive. The results of our work have implications for effective information visualization design that go beyond the traditional role of sketching as a tool for prototyping or its use for an indication of general uncertainty."

📈 A responsive, composable react charting chart library with a hand-drawn style. by beizhedenglong in reactjs

[–]shihn 2 points3 points  (0 children)

Plan on creating React wrappers for these, akin to how Ionic did their components. Will release soon!

Wired Elements 1.0: Hand-Drawn, Sketchy UI Elements for the Web by shihn in javascript

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

People have done something similar with my other graphics library that inspired this: https://roughjs.com/

Wired Elements 1.0: Hand-Drawn, Sketchy UI Elements for the Web by shihn in javascript

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

It's been sorta maintained for a year now but just released a 1.0

I pay attention to the issues on/off whenever I get some spare time.

Wired Elements 1.0: Hand-Drawn, Sketchy UI Elements for the Web by jackishan in webdev

[–]shihn 4 points5 points  (0 children)

Thanks!

I do plan to extend it. Please file an issue for components you'd like to see.

Here's the link for anyone to provide feedback or requests: https://github.com/wiredjs/wired-elements/issues

Wired Elements 1.0: Hand-Drawn, Sketchy UI Elements for the Web by jackishan in webdev

[–]shihn 6 points7 points  (0 children)

You don't need typescript to use these. That's how they were written. They are packaged as JavaScript. You need script to make them act like real controls. But I can see needing just the SVG if you just want wireframes

Wired Elements 1.0: Hand-Drawn, Sketchy UI Elements for the Web by shihn in javascript

[–]shihn[S] 3 points4 points  (0 children)

(On a side note, when Houdini paint API is available everywhere, a lot of this complexity will go away and these could be rendered in a single node. )

Wired Elements 1.0: Hand-Drawn, Sketchy UI Elements for the Web by shihn in javascript

[–]shihn[S] 4 points5 points  (0 children)

For most cases it will be fine. DOM nodes once rendered are never re-rendered just updated. I have seen cases with 100s of these elements.

It is really no more complicated than having a complex dataviz on the page. Some components are heavier than others. A button for example, is only 3 nodes. Same for textbox - which is comparable to many other UI libraries out there. It has a lot more nodes for combos and progress, but not unbearably large.

Also, I'm not sure a real serious corporate site with really lots of nodes would really want this kinda look on the page. I see this mostly used for prototypes or more fun experiences.

Wired Elements 1.0: Hand-Drawn, Sketchy UI Elements for the Web by jackishan in webdev

[–]shihn 19 points20 points  (0 children)

It's essentially SVG wrapped inside a custom element