HNHacker News
TopNewBestAskShowJobs

shihn

1,317 karma · joined January 9, 2016

submissionscomments
shihn··on Hand-drawn graphics library Rough.js has new fill styles
This is a full graphics library not just a pattern filler. http://roughjs.com/ It renders to both Canvas and SVG
shihn··on Show HN: Lumin – Animate text highlighting or use highlighting to show progress
I never thought I needed this. But, for a project, the site wants the user to read a specific text on the page while showing progress of a task (upload, etc). So I created a lib out of it. Even without progress, could also be useful to direct attention to an important text on a page. Github: https://github.com/pshihn/lumin

I'm sure there are still lot of kinks in it.

shihn··on Microsoft Is Said to Have Agreed to Acquire GitHub
https://pbs.twimg.com/media/DezCaWaUYAAa5ih.jpg:large
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Working now: https://stackblitz.com/edit/wired-elements-react?file=index....
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
All working with react now. There was an issue wired-elements code: Here's a react demo: https://stackblitz.com/edit/wired-elements-react?file=index....
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
MIT license (https://github.com/wiredjs/wired-elements/blob/master/LICENS...). Feel free to use the code however you like.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
It's actually simpler than that. Most of the time it should not re-render at all. Should only re-render when the size has changed - at which point one needs to recompute anyway. I was just lazy and rendering every time.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
The shapes are calculated with randomness at every render. i.e. it's not a single image that I turn on or off. It calculates and draws it every time it changes.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Slider is fixed now.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Slider is fixed now.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Slider is fixed now.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Theres a stand alone drawing library roughjs.com that might be useful for more generic drawings. I believe people have used it with reveal.js to use them in presentations.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Mostly there. Firefox still needs a polyfill and some issues working with react
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
I believe it's a shadow dom issue. Firefox doesnt support Shadow DOM yet so a 'shady dom' is used by the polyfill
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Might I plug in my other project: http://roughjs.com/ which is a generic drawing library for drawing sketchy shapes. I believe people have already tried merging it with some diagramming tools.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
I was thinking of wireframes
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Designing a variable font that does that would be the best solution for that. Variable fonts still have to go before accepted on all browsers.

As for the randomness uniqueness, it was a bonus that came out of the algorithms I was using to draw shapes.

shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
The web page is using a hand written styles google fonts. Variable fonts may be a way to randomize the font at every render.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
It's actually related to where the slider control is located relative to the page. Chrome and Firefox return different coordinates for SVG node bounds when the node is transformed. Need to find an alternate calculation that works on all browsers. https://github.com/wiredjs/wired-slider/issues/3
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
To be honest, I did think about accessibility early on but realized that the main use case was for mockups and it wasn't high on the priority list for that scenario. I do plan to make most of these controls accessible before 1.0 release. Thanks for bringing it up.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
the controls inherit the font. So the person using the components can set them to whichever they want. I use 'Gloria Hallelujah' from google fonts' handwritten set on the website.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Yep not very touch friendly at the moment. Bug filed
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Yep sliders aren't quite baked yet. Should work on chrome. Thanks for reporting. https://github.com/wiredjs/wired-slider/issues/3
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Yes: https://fonts.google.com/specimen/Gloria+Hallelujah
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
Yep. Doesn't work with touch events properly at the moment. Work in progress!
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
To give full credit, the designer was adapted from https://github.com/PolymerLabs/wizzywid
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
I do plan to make them more accessible. Wanted to get to a preview build first and then evolve. Thanks for the input.
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
I must add that designer may not quite work anymore. Haha. Will get back to it at some point :)
shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
The web components use SVG and are build on lit-element (https://github.com/Polymer/lit-element) as the web-component base.

Rough.js can render to either canvas or SVG.

shihn··on Show HN: Wired-elements – UI web components with a hand drawn, sketchy look
After working on http://roughjs.com/ I thought it would be interesting to create common sketchy UI components that worked like actual controls. Web components seemed liked the obvious tech for that. So, yeah, here's wired-elements.
← PreviousPage 2 of 3Next →