|
@@ -2255,8 +2255,6 @@ class SVGLoader extends Loader {
|
|
|
// TODO
|
|
|
|
|
|
// prepare paths for hole detection
|
|
|
- let identifier = 0;
|
|
|
-
|
|
|
let scanlineMinX = BIGNUMBER;
|
|
|
let scanlineMaxX = - BIGNUMBER;
|
|
|
|
|
@@ -2313,12 +2311,18 @@ class SVGLoader extends Loader {
|
|
|
|
|
|
}
|
|
|
|
|
|
- return { curves: p.curves, points: points, isCW: ShapeUtils.isClockWise( points ), identifier: identifier ++, boundingBox: new Box2( new Vector2( minX, minY ), new Vector2( maxX, maxY ) ) };
|
|
|
+ return { curves: p.curves, points: points, isCW: ShapeUtils.isClockWise( points ), identifier: -1, boundingBox: new Box2( new Vector2( minX, minY ), new Vector2( maxX, maxY ) ) };
|
|
|
|
|
|
} );
|
|
|
|
|
|
simplePaths = simplePaths.filter( sp => sp.points.length > 1 );
|
|
|
|
|
|
+ for ( let identifier = 0; identifier < simplePaths.length; identifier++ ) {
|
|
|
+
|
|
|
+ simplePaths[identifier].identifier = identifier;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
// check if path is solid or a hole
|
|
|
const isAHole = simplePaths.map( p => isHoleTo( p, simplePaths, scanlineMinX, scanlineMaxX, shapePath.userData?.style.fillRule ) );
|
|
|
|