Live data from Hacker News

Show HN: Paths.js – Generate SVG paths for geometric shapes

github.com

1–10 of 29 posts

Re: Show HN: Paths.js – Generate SVG paths for geometric shapes

#6

Any core differences between Path.js and D3?

Well, there are a few. The main one is that Paths.js only builds a descriptor of your path (the string that goes into the "d" attribute of the SVG path tag), and leaves to you the actual rendering. This has, for me, a few benefits:

- it is easier to integrate into frameworks like React or Angular (because both these frameworks and D3 think they have control on what goes rendered in the page)

- you can use templating, which leads to a declarative approach, instead of the imperative approach of D3

- it only involves pure functions (no side effects) which makes it easier to unit test your graphics

- not doing the rendering means you can use Paths.js also on Node

Of course, D3 is more mature and complete at this point, and it is easier to find examples and documentation. I hope eventually to fill the gap, at least partially.

Another difference, although minor, is that D3 includes a lot of utilities (parsing CSV, doing Ajax requests, working with dates and much more...). This may be a benefit for you or not. I prefer to have small building blocks, and Paths.js is only concerned with generating paths.

Re: Show HN: Paths.js – Generate SVG paths for geometric shapes

#7
post #3

Your documentation needs images (or, you know, actual SVG).

Hi, you can find a working demo on http://andreaferretti.github.io/paths-js-demo/ It is mentioned in the README (How does it look like?) but maybe it is not apparent enough

I reccomend changing the title of that section to either "How does it look?" or "What does it look like?"

"How does it look like" is a minor but grating error to native english speakers.

The rest of the document looks good, as does the library.

Re: Show HN: Paths.js – Generate SVG paths for geometric shapes

#8
post #7
post #3

Earlier quoted context omitted.

Hi, you can find a working demo on http://andreaferretti.github.io/paths-js-demo/ It is mentioned in the README (How does it look like?) but maybe it is not apparent enough

I reccomend changing the title of that section to either "How does it look?" or "What does it look like?" "How does it look like" is a minor but grating error to native english speakers. The rest of the document looks good, as does the library.

Done, thank you!

Re: Show HN: Paths.js – Generate SVG paths for geometric shapes

#9
post #3

Your documentation needs images (or, you know, actual SVG).

Hi, you can find a working demo on http://andreaferretti.github.io/paths-js-demo/ It is mentioned in the README (How does it look like?) but maybe it is not apparent enough

I'm talking about the documentation examples, not the demo.

They are simple enough to include the results right next.

Re: Show HN: Paths.js – Generate SVG paths for geometric shapes

#10
post #3

Earlier quoted context omitted.

Hi, you can find a working demo on http://andreaferretti.github.io/paths-js-demo/ It is mentioned in the README (How does it look like?) but maybe it is not apparent enough

I'm talking about the documentation examples, not the demo. They are simple enough to include the results right next.

Ah ok, I understand. Yes, the docs now look too much like a giant wall of text. My plan for 0.4 is (among other things) to organize the documentation a little better, and I will also add the examples inline
Post reply on HN