@adatechnology/game-interactables-three 0.2.17 → 0.2.18

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.js CHANGED
@@ -1797,8 +1797,26 @@ function createThreeAdapter(THREE, options = {}) {
1797
1797
 
1798
1798
  // src/cord.ts
1799
1799
  import { catenary as catenary2, createCord as createCord2 } from "@adatechnology/game-shapes-three";
1800
+
1801
+ // src/wires.ts
1802
+ import { createCord as createCord3 } from "@adatechnology/game-shapes-three";
1803
+ var WIRE_COLORS = { conduit: 13618628, cable: 2762532, drop: 1381653, cord: 1776413 };
1804
+ var WIRE_RADIUS = 6e-3;
1805
+ function wireMeshes(THREE, wires) {
1806
+ const meshes = [];
1807
+ for (const wire of wires ?? []) {
1808
+ if (wire.points.length < 2) continue;
1809
+ const material = new THREE.MeshStandardMaterial({ color: WIRE_COLORS[wire.kind], roughness: 0.8 });
1810
+ const mesh = createCord3(THREE, wire.points, wire.radius ?? WIRE_RADIUS, material);
1811
+ mesh.name = wire.id;
1812
+ meshes.push(mesh);
1813
+ }
1814
+ return meshes;
1815
+ }
1800
1816
  export {
1801
1817
  MATERIAL_KEYS,
1818
+ WIRE_COLORS,
1819
+ WIRE_RADIUS,
1802
1820
  applyPose,
1803
1821
  attachSway,
1804
1822
  catenary2 as catenary,
@@ -1815,6 +1833,7 @@ export {
1815
1833
  rememberRest,
1816
1834
  standOutCoincidentBoxes,
1817
1835
  swayMaterial,
1818
- syncObject
1836
+ syncObject,
1837
+ wireMeshes
1819
1838
  };
1820
1839
  //# sourceMappingURL=index.js.map