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

can the lib support the polygon with holes? #1

Open
dyh333 opened this issue Dec 31, 2016 · 2 comments
Open

can the lib support the polygon with holes? #1

dyh333 opened this issue Dec 31, 2016 · 2 comments

Comments

@dyh333
Copy link

dyh333 commented Dec 31, 2016

hi, @sebastian-meier. as the title, thanks.

@sebastian-meier
Copy link
Owner

At the moment i don't think so, but it should be easy to fix this in line #86 the polygon gets converted into a list of THREE 2D Points, which are later (line #136) converted into a THREE Shape.
You would just need to collect the individual holes/shapes in individual arrays and then later combine as:

var shape = THREE.Shape( points_1 );

var hole = new THREE.Path( points_2 );
shape.holes.push(hole);

@dyh333
Copy link
Author

dyh333 commented Jan 5, 2017

@sebastian-meier thanks, i will try.

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

2 participants