@willcgage/module-schematic 0.49.3 → 0.49.4
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 +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1000,6 +1000,10 @@ interface ModuleFeatures {
|
|
|
1000
1000
|
fromFrac: number;
|
|
1001
1001
|
toFrac: number;
|
|
1002
1002
|
} | null;
|
|
1003
|
+
/** Main 2's drawn lane — +1 above Main 1 by default, −1 below when the mains
|
|
1004
|
+
* are swapped (#131/#172). Null when there is no Main 2. Renderers must draw
|
|
1005
|
+
* Main 2 (and its diverges) at THIS lane, never a hard-coded +1. */
|
|
1006
|
+
main2Lane: number | null;
|
|
1003
1007
|
/** Single↔double transition, fully described (#FMN-0043). The `through` main
|
|
1004
1008
|
* runs the whole module; the `branch` main exists only on the double side and
|
|
1005
1009
|
* merges at `atFrac`. EITHER main can be through/branch — the surviving single
|
package/dist/index.d.ts
CHANGED
|
@@ -1000,6 +1000,10 @@ interface ModuleFeatures {
|
|
|
1000
1000
|
fromFrac: number;
|
|
1001
1001
|
toFrac: number;
|
|
1002
1002
|
} | null;
|
|
1003
|
+
/** Main 2's drawn lane — +1 above Main 1 by default, −1 below when the mains
|
|
1004
|
+
* are swapped (#131/#172). Null when there is no Main 2. Renderers must draw
|
|
1005
|
+
* Main 2 (and its diverges) at THIS lane, never a hard-coded +1. */
|
|
1006
|
+
main2Lane: number | null;
|
|
1003
1007
|
/** Single↔double transition, fully described (#FMN-0043). The `through` main
|
|
1004
1008
|
* runs the whole module; the `branch` main exists only on the double side and
|
|
1005
1009
|
* merges at `atFrac`. EITHER main can be through/branch — the surviving single
|
package/dist/index.js
CHANGED
|
@@ -1294,9 +1294,10 @@ function moduleFeatures(doc) {
|
|
|
1294
1294
|
};
|
|
1295
1295
|
});
|
|
1296
1296
|
});
|
|
1297
|
+
const main2Lane = trackLane.has(MAIN2_TRACK_ID) ? trackLane.get(MAIN2_TRACK_ID) : null;
|
|
1297
1298
|
const allLanes = [
|
|
1298
1299
|
0,
|
|
1299
|
-
doubleMain ? 1 : 0,
|
|
1300
|
+
main2Lane ?? (doubleMain ? 1 : 0),
|
|
1300
1301
|
...extraTracks.map((t) => t.lane),
|
|
1301
1302
|
...signals.map((s) => s.lane),
|
|
1302
1303
|
...crossings.flatMap((x) => [x.laneA, x.laneB]),
|
|
@@ -1324,6 +1325,7 @@ function moduleFeatures(doc) {
|
|
|
1324
1325
|
doubleMain,
|
|
1325
1326
|
loop,
|
|
1326
1327
|
main2Extent,
|
|
1328
|
+
main2Lane,
|
|
1327
1329
|
transition,
|
|
1328
1330
|
loopInterchange: loop && doc.endplates.filter((e) => !e.at).length >= 2,
|
|
1329
1331
|
loopReturn: loop && doc.loopReturn === "main2" ? "main2" : "same",
|