@adatechnology/game-urban-three 0.5.13 → 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 = {}) {
@@ -5306,6 +5310,8 @@ var GameUrbanThree = (() => {
5306
5310
  };
5307
5311
  var CAUSE_OF_EMITTER = { white: SmokeCause.STEAM, oil: SmokeCause.OIL, black: SmokeCause.FIRE };
5308
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;
5309
5315
  var DROP_GATE_OPEN = Math.PI / 2;
5310
5316
  var LID_OUTWARD = [-Math.SQRT1_2, Math.SQRT1_2, 0];
5311
5317
  var cabin_default = {