@adatechnology/game-weapons-three 0.27.4 → 0.27.6

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.
@@ -54954,7 +54954,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
54954
54954
  }
54955
54955
  var residentialTower = residentialTowerTemplate();
54956
54956
 
54957
- // ../game-floorplan-three/dist/chunk-EYIWURKO.js
54957
+ // ../game-floorplan-three/dist/chunk-T2LV6LOQ.js
54958
54958
  var __defProp4 = Object.defineProperty;
54959
54959
  var __defNormalProp2 = (obj, key2, value) => key2 in obj ? __defProp4(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
54960
54960
  var __publicField2 = (obj, key2, value) => __defNormalProp2(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
@@ -62624,7 +62624,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
62624
62624
  w = Math.min(w, 0.5);
62625
62625
  d = Math.min(d, 0.5);
62626
62626
  }
62627
- inter().objs.push({ f: M.floor, cx: m.x, cz: m.z, c: Math.cos(M.ry), s: Math.sin(M.ry), hw: w / 2, hd: d / 2, type: m.type });
62627
+ inter().objs.push({ f: M.floor, cx: m.x, cz: m.z, c: Math.cos(M.ry), s: Math.sin(M.ry), hw: w / 2, hd: d / 2, h, type: m.type });
62628
62628
  }
62629
62629
  function objectDistance(o, x, z) {
62630
62630
  const dx = x - o.cx, dz = z - o.cz, lx = dx * o.c - dz * o.s, lz = dx * o.s + dz * o.c, ex = Math.abs(lx) - o.hw, ez = Math.abs(lz) - o.hd;
@@ -65416,11 +65416,11 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
65416
65416
  drop(partId) {
65417
65417
  const hosts = [...new Set([views.get(partId), ...[...views.values()].filter((view) => view.parts.includes(partId))].filter((v) => !!v))];
65418
65418
  if (!hosts.length && lod === 0 && riders(partId).length > 0) {
65419
- const made = newView(partId);
65420
- if (made) {
65421
- cut(made);
65422
- views.set(partId, made);
65423
- hosts.push(made);
65419
+ const made2 = newView(partId);
65420
+ if (made2) {
65421
+ cut(made2);
65422
+ views.set(partId, made2);
65423
+ hosts.push(made2);
65424
65424
  }
65425
65425
  }
65426
65426
  for (const host of hosts) {
@@ -66582,11 +66582,11 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
66582
66582
  let batcher = null;
66583
66583
  let changedAt = Number.NEGATIVE_INFINITY;
66584
66584
  const make3 = () => {
66585
- const made = createStaticBatcher(THREE, root, { shadowOnly: true, queue, budgetMs: HOUSE_SHADOW_BUDGET_MS, maxVertices: HOUSE_SHADOW_BATCH_VERTICES, include: (mesh3) => mesh3.userData.noShadowBatch !== true });
66586
- made.group.name = "house-shadow-batches";
66587
- made.group.userData.noSurfaceRay = true;
66588
- markKitOrigin(made.group, { owner: "game-floorplan-three", kind: "structure", id: root.name || "house" });
66589
- return made;
66585
+ const made2 = createStaticBatcher(THREE, root, { shadowOnly: true, queue, budgetMs: HOUSE_SHADOW_BUDGET_MS, maxVertices: HOUSE_SHADOW_BATCH_VERTICES, include: (mesh3) => mesh3.userData.noShadowBatch !== true });
66586
+ made2.group.name = "house-shadow-batches";
66587
+ made2.group.userData.noSurfaceRay = true;
66588
+ markKitOrigin(made2.group, { owner: "game-floorplan-three", kind: "structure", id: root.name || "house" });
66589
+ return made2;
66590
66590
  };
66591
66591
  return {
66592
66592
  update() {
@@ -66850,7 +66850,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
66850
66850
  c.aabb = [c.x0, c.z0, c.x1, c.z1];
66851
66851
  if (c.type === "wall") c.damageable = tagDamage("masonry");
66852
66852
  }
66853
- const colliders = shared3.ctx.colliders.concat(shared3.inter.objs.map((o) => ({ type: "furniture", f: o.f, obb: { cx: o.cx, cz: o.cz, hw: o.hw, hd: o.hd, c: o.c, s: o.s }, item: o.type, off: false })));
66853
+ const colliders = shared3.ctx.colliders.concat(shared3.inter.objs.map((o) => ({ type: "furniture", f: o.f, obb: { cx: o.cx, cz: o.cz, hw: o.hw, hd: o.hd, c: o.c, s: o.s }, item: o.type, off: false, ...o.h !== void 0 ? { h: o.h } : {} })));
66854
66854
  const parts2 = {}, setOpen = (def, t) => {
66855
66855
  def.target = t;
66856
66856
  def.t = t;
@@ -67725,7 +67725,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
67725
67725
  const root = { x: seed, z: 0, ry: 0, w, d, h, y: 0, base: 0, palette: o.palette, seed: `furniture_${type}_${seed}` };
67726
67726
  const { K, shared: shared3 } = renderer.internals;
67727
67727
  const before = K.PARTS.length;
67728
- const made = recordSpec(
67728
+ const made2 = recordSpec(
67729
67729
  THREE,
67730
67730
  type,
67731
67731
  root,
@@ -67744,7 +67744,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
67744
67744
  );
67745
67745
  const spouts = K.PARTS.slice(before).filter((p) => p.type === "water_tap").map((p) => [p.pos[0] - root.x, p.pos[1], p.pos[2] - root.z]);
67746
67746
  K.PARTS.length = before;
67747
- return { spec: made.spec, build: made.build, top: made.top, size: { w, d, h }, spouts, fixed: made.fixed };
67747
+ return { spec: made2.spec, build: made2.build, top: made2.top, size: { w, d, h }, spouts, fixed: made2.fixed };
67748
67748
  }
67749
67749
 
67750
67750
  // ../game-physics/dist/index.js
@@ -67859,6 +67859,8 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
67859
67859
  if (result2?.reason === "busy") return;
67860
67860
  }
67861
67861
  };
67862
+ const hasKind = (kind) => (host.tool().attachments ?? []).some((candidate) => arsenal.attachments.get(candidate.id)?.kind === kind);
67863
+ const hasLauncher = () => (host.tool().attachments ?? []).some((part) => arsenal.attachments.get(part.id)?.launcher !== void 0);
67862
67864
  const toggleKind = (kind) => {
67863
67865
  const part = (host.tool().attachments ?? []).find((candidate) => arsenal.attachments.get(candidate.id)?.kind === kind);
67864
67866
  if (!part) host.log(kind === "light" ? text.noLight : text.noLaser);
@@ -67873,8 +67875,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
67873
67875
  };
67874
67876
  const switchUnderbarrel = () => {
67875
67877
  const tool2 = host.tool();
67876
- const hasLauncher = (tool2.attachments ?? []).some((part) => arsenal.attachments.get(part.id)?.launcher !== void 0);
67877
- if (!hasLauncher) host.log(text.noLauncher);
67878
+ if (!hasLauncher()) host.log(text.noLauncher);
67878
67879
  else host.command?.({ type: "underbarrel", on: tool2.underbarrelActive !== true });
67879
67880
  };
67880
67881
  const act = (id) => {
@@ -67911,7 +67912,7 @@ uniform mat4 uNodes[${nodes.length}]; attribute float aNodeIndex; attribute vec3
67911
67912
  const onKeyDown = (event) => {
67912
67913
  if (host.playerHeld?.()) return;
67913
67914
  if (event.repeat || event.ctrlKey || event.metaKey || event.altKey || TEXT_FIELDS.has(event.target?.tagName ?? "")) return;
67914
- const handled2 = event.code === ACCESSORY_KEYS.light ? act(ACTION_IDS.light) : event.code === ACCESSORY_KEYS.laser ? act(ACTION_IDS.laser) : event.code === ACCESSORY_KEYS.underbarrel ? act(ACTION_IDS.underbarrel) : event.code === ACCESSORY_KEYS.stock && toggleStock();
67915
+ const handled2 = event.code === ACCESSORY_KEYS.light ? hasKind("light") && act(ACTION_IDS.light) : event.code === ACCESSORY_KEYS.laser ? hasKind("laser") && act(ACTION_IDS.laser) : event.code === ACCESSORY_KEYS.underbarrel ? hasLauncher() && act(ACTION_IDS.underbarrel) : event.code === ACCESSORY_KEYS.stock && toggleStock();
67915
67916
  if (!handled2) return;
67916
67917
  event.preventDefault();
67917
67918
  event.stopImmediatePropagation();