Three.js polygon triangulation fails in pseudo duplicate points

后端 未结 2 1754
暗喜
暗喜 2020-12-30 15:03

In three.js there is a function triangulateShape(). Now I encountered a failure to triangulate polygons that are simplified using Javascript Clipper. Simplifyin

2条回答
  •  心在旅途
    2020-12-30 15:23

    You could write a function that detects the duplicate vertices and moves them backward 1px to make them discrete(they no more share a common edge). This way there will be no more common edges and no errors are produced but the visual result still looks the same.

    Kind of crude solution but it might work.

提交回复
热议问题