@willcgage/module-schematic 0.94.0 → 0.95.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 +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -2
- package/dist/index.d.ts +41 -2
- package/dist/index.js +11 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2306,6 +2306,16 @@ function pieceRoutePaths(piece, library = BUILT_IN_TRACK_PARTS) {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
return out;
|
|
2308
2308
|
}
|
|
2309
|
+
function pieceHand(part, flipped) {
|
|
2310
|
+
const n = part.partNumbers;
|
|
2311
|
+
if (!n?.left || !n?.right) return null;
|
|
2312
|
+
return flipped ? "right" : "left";
|
|
2313
|
+
}
|
|
2314
|
+
function piecePartNumber(part, flipped) {
|
|
2315
|
+
const hand = pieceHand(part, flipped);
|
|
2316
|
+
if (!hand) return part.partNumbers?.single;
|
|
2317
|
+
return part.partNumbers?.[hand];
|
|
2318
|
+
}
|
|
2309
2319
|
function partsPlaceable(library = BUILT_IN_TRACK_PARTS) {
|
|
2310
2320
|
const placeable = [];
|
|
2311
2321
|
const blocked = [];
|
|
@@ -3551,6 +3561,8 @@ exports.partOutlineAtFrog = partOutlineAtFrog;
|
|
|
3551
3561
|
exports.partsPlaceable = partsPlaceable;
|
|
3552
3562
|
exports.pastFrogInchesForSize = pastFrogInchesForSize;
|
|
3553
3563
|
exports.pathLengthInches = pathLengthInches;
|
|
3564
|
+
exports.pieceHand = pieceHand;
|
|
3565
|
+
exports.piecePartNumber = piecePartNumber;
|
|
3554
3566
|
exports.pieceRoutePaths = pieceRoutePaths;
|
|
3555
3567
|
exports.placedJoints = placedJoints;
|
|
3556
3568
|
exports.poseNeedsManual = poseNeedsManual;
|