@adatechnology/game-urban-three 0.5.12 → 0.5.14

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.
@@ -2055,13 +2055,16 @@ var GameUrbanThree = (() => {
2055
2055
  for (const u of Object.values(uniforms)) if (isTexture(u?.value)) out.add(u.value);
2056
2056
  }
2057
2057
  }
2058
+ var isInstanced = (o) => o.isInstancedMesh === true;
2058
2059
  function collect(roots) {
2059
2060
  const geometries = /* @__PURE__ */ new Set();
2060
2061
  const materials = /* @__PURE__ */ new Set();
2061
2062
  const textures = /* @__PURE__ */ new Set();
2062
2063
  const skeletons = /* @__PURE__ */ new Set();
2064
+ const instanced = /* @__PURE__ */ new Set();
2063
2065
  for (const root of roots) {
2064
2066
  root.traverse((object2) => {
2067
+ if (isInstanced(object2)) instanced.add(object2);
2065
2068
  const o = object2;
2066
2069
  if (o.geometry && typeof o.geometry.dispose === "function") geometries.add(o.geometry);
2067
2070
  if (o.skeleton && typeof o.skeleton.dispose === "function") skeletons.add(o.skeleton);
@@ -2073,7 +2076,7 @@ var GameUrbanThree = (() => {
2073
2076
  }
2074
2077
  });
2075
2078
  }
2076
- return { geometries, materials, textures, skeletons };
2079
+ return { geometries, materials, textures, skeletons, instanced };
2077
2080
  }
2078
2081
  var marked = /* @__PURE__ */ new WeakSet();
2079
2082
  var shared = (r) => r.userData?.shared === true || marked.has(r);
@@ -2118,6 +2121,7 @@ var GameUrbanThree = (() => {
2118
2121
  report.textures++;
2119
2122
  }
2120
2123
  for (const s of found.skeletons) s.dispose();
2124
+ for (const mesh2 of found.instanced) mesh2.dispose();
2121
2125
  return report;
2122
2126
  }
2123
2127
  function discardObject3D(objects, options = {}) {
@@ -5146,6 +5150,11 @@ var GameUrbanThree = (() => {
5146
5150
  var engine = defaultFloorplan();
5147
5151
 
5148
5152
  // ../game-vehicles/dist/index.js
5153
+ var CABIN_PARTS = {
5154
+ seat: { id: "seats", material: "fabric" },
5155
+ trim: { id: "dashboard", material: "plastic" }
5156
+ };
5157
+ var CABIN_PART_IDS = new Set(Object.values(CABIN_PARTS).map((p) => p.id));
5149
5158
  var SHUT_LINE_RADIUS = 2e-3;
5150
5159
  var SHUT_LINE_LIFT = 8e-4;
5151
5160
  var SHUT_LINE_STEPS = 36;
@@ -5301,6 +5310,9 @@ var GameUrbanThree = (() => {
5301
5310
  };
5302
5311
  var CAUSE_OF_EMITTER = { white: SmokeCause.STEAM, oil: SmokeCause.OIL, black: SmokeCause.FIRE };
5303
5312
  var LIFT = { [SmokeCause.STEAM]: 0.5, [SmokeCause.OIL]: 0.45, [SmokeCause.FIRE]: 0.6 };
5313
+ var VENT_SPREAD = 0.18;
5314
+ var PLUME_SCATTER = VENT_SPREAD + 0.08;
5315
+ var DROP_GATE_OPEN = Math.PI / 2;
5304
5316
  var LID_OUTWARD = [-Math.SQRT1_2, Math.SQRT1_2, 0];
5305
5317
  var cabin_default = {
5306
5318
  source: "Spec 012 (R6, T0.2) \u2014 SAE J1100 interior packaging & ISO 7250-1 / NASA-STD-3000 adult anthropometry (1.80 m seated height = 0.936 m, buttock-knee = 0.612 m, shoulder = 0.468 m)",
@@ -11015,6 +11027,7 @@ var GameUrbanThree = (() => {
11015
11027
  return pl;
11016
11028
  };
11017
11029
  K.lid = function(pts0) {
11030
+ c.meta.lidSeam = pts0;
11018
11031
  const pts = [];
11019
11032
  pts0.forEach(function(q, i) {
11020
11033
  const n = pts0[i + 1];
@@ -20206,6 +20219,7 @@ var GameUrbanThree = (() => {
20206
20219
  return pl;
20207
20220
  };
20208
20221
  K.lid = function(pts) {
20222
+ c.meta.lidSeam = pts;
20209
20223
  const P = pts.map(function(q) {
20210
20224
  const h = q.top ? S.hit(new V3(q.x, 3, q.z), new V3(0, -1, 0), "R") : S.hit(new V3(S.endX(-1, q.y) - 1, q.y, q.z), new V3(1, 0, 0), "R");
20211
20225
  return h ? h.p.addScaledVector(h.n, 3e-3) : null;