Three.js: how to punch multiple holes in a shape without distortions?

ⅰ亾dé卋堺 提交于 2019-12-24 14:33:23

问题


I'm trying to punch some simple square holes in a complex Three.js shape with :

var Shape1 = new THREE.Shape(ShapeCoordinates1);
PunchHole1 = new THREE.Path(Punchcoordinates1);
PunchHole2 = new THREE.Path(Punchcoordinates2);
Shape1.holes.push(PunchHole1);
Shape1.holes.push(PunchHole2);

etc.

Because of the irregular shape, with vertex coordinates that probably overlap with punched holes, this goes terribly wrong when punching out multiple holes, like this :

This should be a solid outlined shape with only around 30 small square holes punched out of it, so not the huge diagonal white spaces in the middle .

Is there a way in Three.js to prevent this behaviour ?

来源:https://stackoverflow.com/questions/17702450/three-js-how-to-punch-multiple-holes-in-a-shape-without-distortions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!