mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.04k stars 35.33k forks source link

ShapePath: Wrong processing of mixed winding orders and nested shapes. #16950

Closed bikb closed 3 years ago

bikb commented 5 years ago
Description of the problem

When creating a polygon with constructPathShape.toShapes the order of the constructpathshapes commands plays a role which shouldn't be the case. (I think so) I am adding a hole than the outer vertice then again a hole. The last hole is not recognized. https://jsfiddle.net/0g9bdar5/2/

The only thing which was changed is the order of the constructpathshape commands. If I add the two holes at the beginning the polygon is rendered correctly. https://jsfiddle.net/0g9bdar5/3/

Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)