HarryStevens / geometric

A JavaScript library for doing geometry.
https://www.npmjs.com/package/geometric
MIT License
970 stars 49 forks source link

Missing "Super" Beginner Documentation : How to use this lib ? #15

Closed german-wings closed 4 years ago

german-wings commented 4 years ago

Hello, I am not very used to javascript , can anyone point me out how to actually draw lines and polygons that would be visible to me on screen ? I mean to say how this lib would interact with the html elements ? , I don't know how to do it , and there will always be someone like me who want to use this lib but don't know how to set it up. Request the maintainers of the lib to add some super beginner steps so the lines and polygons object created by this "geometric" lib will show up on the screen.

Thanks.

HarryStevens commented 4 years ago

Geometric.js is only intended for geometric calculations and is agnostic about what you choose to do with the results of those calculations. You can draw shapes with the Canvas API, with SVG, or with some library that binds data to its visual representation, such as D3.js. Geometric.js does not make that choice for you.

That said, nearly every function in the documentation is accompanied by a link to an example. The examples show not just how to use the library for geometric calculations, but also how to draw shapes to the screen.

german-wings commented 4 years ago

Mmmm , perhaps I must have skipped something , I will look again the whole Documentation , If you have a link that could help me get started and help me draw the shapes on screen let me know please , Thanks Have a good day

HarryStevens commented 4 years ago

If you have a link that could help me get started and help me draw the shapes on screen let me know please

Please see my comment above, which links to some methods of drawing shapes to the screen.

You can also click on the Example link next to each method in this repository's README.

image