Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(lack of) Documentation regarding triangulation? #12626

Closed
loldrup opened this issue Nov 10, 2017 · 5 comments
Closed

(lack of) Documentation regarding triangulation? #12626

loldrup opened this issue Nov 10, 2017 · 5 comments

Comments

@loldrup
Copy link
Contributor

loldrup commented Nov 10, 2017

What's the one-stop-shop for documentation on performing triangulation with three.js?
Searching for 'triangulation' on the three.js documentation site gives no hits.

Is this project officially sanctioned as The Right Way to approach triangulation with three.js?

Is there a way to get three.js sanctioned triangulation code purely through NPM? Searching for 'three triangulation' on npmjs.com gives no hits, and the above mentioned project only talks about installation via bower.json. Yuck!

@donmccurdy
Copy link
Collaborator

For docs on three.js's triangulation see THREE.ShapeUtils.

But, I would suggest just using earcut. We may go that direction in the future: #12286. Example usage of earcut with three.js: #5959 (comment)

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 10, 2017

I use this as an opportunity to vote for an application of earcut again 😊 . The current implementation of ShapeUtils (a port from here) was repeatedly insufficient if users required a robust triangulation process. Instead, users switched to external libs (in most cases earcut). IMO this is a clear signal to improve the built-in solution.

Besides, an improved triangulation algorithm would be a nice feature for R89😊

@loldrup
Copy link
Contributor Author

loldrup commented Nov 10, 2017 via email

@Mugen87 Mugen87 changed the title (lack of) Docuentation regarding triangulation? (lack of) Documentation regarding triangulation? Nov 10, 2017
@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 23, 2017

This should be solved with #12661 and #12725. three.js uses now a port of an earcut implementation, see https://github.com/mapbox/earcut

@Mugen87 Mugen87 closed this as completed Nov 23, 2017
@Wilt
Copy link
Contributor

Wilt commented Oct 14, 2019

"the above mentioned project only talks about installation via bower.json. Yuck!"

@loldrup You can easily install a git repository using npm, that is no rocket science:

"three.js_triangulation": "git+https://github.com/Wilt/three.js_triangulation.git",

I will add this to the readme when I find some free time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants