@willcgage/module-schematic 0.97.0 → 0.97.1
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.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2311,6 +2311,16 @@ function pieceRoutePaths(piece, library = BUILT_IN_TRACK_PARTS) {
|
|
|
2311
2311
|
const len = part.overallLength?.inches ?? BUMPER_DRAWN_INCHES;
|
|
2312
2312
|
return [{ route: ["a", "a"], points: [{ x: at2.x, y: at2.y }, place(len, 0)] }];
|
|
2313
2313
|
}
|
|
2314
|
+
if (part.kind === "curve") {
|
|
2315
|
+
const a = joints.find((j) => j.joint === "a");
|
|
2316
|
+
const b = joints.find((j) => j.joint === "b");
|
|
2317
|
+
if (!a || !b) return out;
|
|
2318
|
+
const pts = flexRunPoints(sectionalArcInches(part), part.radius.inches).map(
|
|
2319
|
+
(q) => place(q.x, q.y)
|
|
2320
|
+
);
|
|
2321
|
+
pts[pts.length - 1] = { x: b.x, y: b.y };
|
|
2322
|
+
return [{ route: ["a", "b"], points: pts }];
|
|
2323
|
+
}
|
|
2314
2324
|
for (const route of geo.routes) {
|
|
2315
2325
|
const a = at(route[0]);
|
|
2316
2326
|
const b = at(route[1]);
|