Live data from Hacker News

Show HN: RoughJS – Create hand-drawn graphics using JavaScript

roughjs.com

81–90 of 103 posts

Re: Show HN: RoughJS – Create hand-drawn graphics using JavaScript

#81
post #77

Earlier quoted context omitted.

Very nice! I changed it a little bit to optimise rendering just in case you don't know about 'requestAnimationFrame()' ( https://developer.mozilla.org/en-US/docs/Web/API/window/requ... ): https://jsfiddle.net/65q7c5to/

What do all the context transformation lines do in this example? It seems to work just as well with clearRect on its own.

There's only one such line. In general it's a good idea to reset the transform before clearing as the (0, 0, w, h) rectangle may not cover the whole canvas anymore. In this toy example there obviously isn't another transform so it's without function.

Re: Show HN: RoughJS – Create hand-drawn graphics using JavaScript

#82

This is a very fun library. Following the tip in these comments from @bcjordan to repeatedly re-render, I've forked a little physics notebook by Jim Bumgardner apply Rough.js to the circle rendering: https://beta.observablehq.com/@jashkenas/tumble-wheel-with-r... Wheee. Edit: Too much fun. Here's another: https://beta.observablehq.com/@jashkenas/scratchy-eyes

This is not working in Firefox. Not sure why.

Yup. Only worked in Chrome for me too.

Re: Show HN: RoughJS – Create hand-drawn graphics using JavaScript

#84
post #81
post #77

Earlier quoted context omitted.

What do all the context transformation lines do in this example? It seems to work just as well with clearRect on its own.

There's only one such line. In general it's a good idea to reset the transform before clearing as the (0, 0, w, h) rectangle may not cover the whole canvas anymore. In this toy example there obviously isn't another transform so it's without function.

[deleted]

Re: Show HN: RoughJS – Create hand-drawn graphics using JavaScript

#90
post #76
post #13

Quick bar chart example with D3: http://roughjs.com/examples/bar-chart.html

FYI: Blank page (with title text) in Firefox (58.0.2, 64-bit, Windows).

There was in issue with the CDN I believe. It was serving an old cache at some nodes. I changed the code to use a different one.
Post reply on HN