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

Solves duplicate points and triangle errors #20

Merged
merged 2 commits into from Nov 2, 2016
Merged

Conversation

xuv
Copy link
Collaborator

@xuv xuv commented Nov 2, 2016

Hello @hanbyul-here

Did two things here:

  1. Removed and moved duplicate code. The Map spells as you named them were in both files. And some of the PreviewMap code was still called for no apparent reason inside Exporter.js
  2. I was bothered by the duplicate points and triangulate errors from Threejs. So I dug up a little. This issue helped me solve it. I implemented the earcut solution from this repo. Now we have a clean console. And normally all objects and path should be created correctly. Probably in future versions, Threejs will implement these solution in future releases.

Hope this suits you.

By changing the triangulate function, it solves
 - 'unable to triangulate polygons'
 - 'it could not exturde geometry, it can be because of duplicated point of svg.'
@hanbyul-here
Copy link
Owner

Hey @xuv awesome! :) didn't know about this solution at all. Thank you so much! ( I might rearrange folder structure later, makng three-lib folder looks reasonable )

@hanbyul-here hanbyul-here merged commit 0714b70 into gh-pages Nov 2, 2016
@hanbyul-here hanbyul-here deleted the debug branch November 2, 2016 22:00
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

Successfully merging this pull request may close these issues.

None yet

2 participants