calculate-packing 0.0.61 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -362,8 +362,12 @@ var constructOutlinesFromPackedComponents = (components, opts = {}) => {
|
|
|
362
362
|
if (!union) return [];
|
|
363
363
|
const parsed = parseFlattenPolygonSegments(union);
|
|
364
364
|
const allOutlines = [
|
|
365
|
-
...parsed.obstacleFreeLoops.map(
|
|
366
|
-
|
|
365
|
+
...parsed.obstacleFreeLoops.map(
|
|
366
|
+
(outline) => simplifyCollinearSegments(outline)
|
|
367
|
+
),
|
|
368
|
+
...parsed.obstacleContainingLoops.map(
|
|
369
|
+
(outline) => simplifyCollinearSegments(outline)
|
|
370
|
+
)
|
|
367
371
|
];
|
|
368
372
|
return allOutlines.filter((outline) => outline.length >= 3);
|
|
369
373
|
};
|
package/package.json
CHANGED