@korial29/tiny-fps 1.7.0 → 1.8.0

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.
@@ -5566,7 +5566,7 @@ var SHIP$1 = [
5566
5566
  [
5567
5567
  57.5,
5568
5568
  60.5,
5569
- -5,
5569
+ -4,
5570
5570
  -2.05
5571
5571
  ],
5572
5572
  [
@@ -5926,7 +5926,7 @@ var FLATS = [
5926
5926
  132,
5927
5927
  61,
5928
5928
  138,
5929
- HOLD.floor - .25
5929
+ HOLD.floor - .95
5930
5930
  ],
5931
5931
  [
5932
5932
  56,
@@ -6114,16 +6114,31 @@ var hull$1 = () => SHIP$1.flatMap(({ cut, floor, holes, tears, fair, crates }, n
6114
6114
  })];
6115
6115
  });
6116
6116
  var BACK$2 = HULL.axis.map((c) => c + HULL.r);
6117
- /** A heap of ribs in the middle of each gap, a pack on it, and a fallen frame leaning on each broken end. */
6118
- var GAPS = [40, 78].map((x) => {
6119
- const [hi, lo] = under$1(x - 1.5, 123.5, x + 1.5, 126.5);
6120
- const top = Math.round((Math.max(hi, FRAME.water) + .4) * 32) / 32;
6117
+ /**
6118
+ * A heap of wreckage across each gap, from one broken end to the other, on the line: nobody walks
6119
+ * through a gap (the user, 2026-11-26). Its top is 1.875 m over the highest sand under it (no
6120
+ * jump lands on it) and at most 2.8 m over the lowest (a jump and a pull up), a pack on it.
6121
+ */
6122
+ var GAPS = HULL.sections.slice(1).map(([x1], n) => {
6123
+ const x0 = HULL.sections[n][1];
6124
+ const [hi, lo] = under$1(x0, 123.5, x1, 126.5);
6125
+ const top = Math.round((Math.max(hi, FRAME.water) + 1.875) * 32) / 32;
6121
6126
  return {
6122
- x,
6127
+ x: (x0 + x1) / 2,
6123
6128
  top,
6124
- heap: box(x - 1.5, lo - .5, 123.5, x + 1.5, top, 126.5, STEEL, ORANGE)
6129
+ heap: box(x0, lo - .5, 123.5, x1, top, 126.5, STEEL, ORANGE)
6125
6130
  };
6126
6131
  });
6132
+ /**
6133
+ * Each broken end's lowest floor crushed shut, from it to the deck over it and skin to skin: the
6134
+ * heap is not gone round inside the hull. Its x0 and x1, the section's.
6135
+ */
6136
+ var JAMS = HULL.sections.flatMap(([x0, x1], n) => [n && [x0, x0 + 1], n < 2 && [x1 - 1, x1]].filter((e) => e).map((e) => {
6137
+ const [a, b] = e;
6138
+ const c = HULL.axis[n];
6139
+ const w = Math.round(16 * section$1(SHIP$1[n].floor)) / 16 - HULL.skin;
6140
+ return box(a, c + SHIP$1[n].floor, MID$1 - w, b, c + LINES[1], MID$1 + w, METAL);
6141
+ }));
6127
6142
  /** A frame fallen against one broken end of each gap, on both sides of the line: the way through is between it and the heap, or round the heap's other side. */
6128
6143
  var FRAMES = [36, 74].flatMap((x) => {
6129
6144
  const [hi, lo] = under$1(x, 128, x + 1.2, 130.5);
@@ -6136,6 +6151,7 @@ var centre = [
6136
6151
  ...hull$1(),
6137
6152
  ...GAPS.map((g) => note(line, "heap", g.heap)),
6138
6153
  ...FRAMES.map((b) => note(line, "frame", b)),
6154
+ ...JAMS.map((b) => note(line, "jam", b)),
6139
6155
  note(line, "raft", RAFT),
6140
6156
  ghost(box(EDGE$1.east, -10, EDGE$1.cape - 2, EDGE$1.east + 2, 40, 250 - EDGE$1.cape + 2, STONE))
6141
6157
  ];
@@ -6151,7 +6167,7 @@ var edge$1 = (l, v) => {
6151
6167
  };
6152
6168
  /**
6153
6169
  * The wing: each piece in rows across the span, a step down from one to the next, as wide as the
6154
- * outline there and as thin as the wing (thick()); solid to the sand where a runner would not fit under it. Then the two rails
6170
+ * outline there and as thin as the wing (thick()), free of the sand under it (the user, 2026-11-26). Then the two rails
6155
6171
  * across the break before it, level with the lower of its two lips.
6156
6172
  */
6157
6173
  var wing = () => WING$1.pieces.flatMap(([v0, v1, push, y0, y1, shear], n) => {
@@ -6165,9 +6181,7 @@ var wing = () => WING$1.pieces.flatMap(([v0, v1, push, y0, y1, shear], n) => {
6165
6181
  const [xa, xb] = [WING$1.trail, WING$1.lead].map((l) => Math.round(8 * (edge$1(l, v) + dx)) / 8);
6166
6182
  const [za, zb] = [k, k + 1].map((i) => z(v0 + (v1 - v0) * i / rows));
6167
6183
  const y = y0 + (y1 - y0) * k / (rows - 1);
6168
- const low = y - thick(v);
6169
- const [hi, lo] = under$1(xa, za, xb, zb);
6170
- return note(mine, "wingpiece", box(xa, low - hi < 2.2 ? lo - .5 : low, za, xb, y, zb, METAL));
6184
+ return note(mine, "wingpiece", box(xa, y - thick(v), za, xb, y, zb, METAL));
6171
6185
  }), ...last ? WING$1.rails.map((x) => {
6172
6186
  const y = Math.min(last[4], y0);
6173
6187
  return note(mine, "rail", box(x - .225, y - .45, z(last[1], last[2]), x + .225, y, z(v0), STEEL));
@@ -10498,15 +10512,17 @@ var Bot = class {
10498
10512
  0,
10499
10513
  fz
10500
10514
  ], reach) < reach) return false;
10501
- if (ray(w, [
10515
+ let clear = true;
10516
+ for (let h = STEP_H + .01; clear && h < 1.9; h += .2) clear = ray(w, [
10502
10517
  p.x,
10503
- p.y + .5 + .01,
10518
+ p.y + h,
10504
10519
  p.z
10505
10520
  ], [
10506
10521
  fx,
10507
10522
  0,
10508
10523
  fz
10509
- ], ahead) >= ahead) return "open";
10524
+ ], ahead) >= ahead;
10525
+ if (clear) return "open";
10510
10526
  if (ahead !== AHEAD) return false;
10511
10527
  for (let t = 1; t <= HOP_DEPTH; t += .5) if (floorAt(w, p.x + fx * t, p.z + fz * t, p.y + HOP) < p.y - .5) return false;
10512
10528
  return "hop";