@adatechnology/game-items-three 0.7.8 → 0.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.
@@ -597,11 +597,11 @@ var models_default = [
597
597
  id: "crowbar",
598
598
  teamId: "pe_cabra",
599
599
  teamBox: [
600
- 0.428,
601
- 1.7087,
602
- 0.11
600
+ 0.3559,
601
+ 1.6698,
602
+ 0.068
603
603
  ],
604
- scale: 0.43893
604
+ scale: 0.449156
605
605
  },
606
606
  {
607
607
  id: "hammer",
@@ -3169,9 +3169,35 @@ var bandage = ({ mesh, cyl, bx, G, cloth: cloth2 }) => {
3169
3169
  var amoxicillin = ({ T, mesh, bx, G, metal, plastic, paper: paper2 }) => G(mesh(bx(0.8, 0.42, 0.24), paper2(15789798)), mesh(bx(0.81, 0.1, 0.25), plastic(5141127), [0, 0.1, 0]), mesh(bx(0.6, 0.04, 0.3), metal(12172736), [0.15, -0.24, 0.25], [0, 0.3, 0]), ...[0, 1, 2, 3].map((k) => mesh(new T.SphereGeometry(0.05, 10, 8), plastic(14263361), [-0.05 + k * 0.14, -0.21, 0.3], [0, 0, 0], [1, 0.6, 1])));
3170
3170
 
3171
3171
  // src/models/crowbar.ts
3172
- var crowbar = ({ T, mesh, cyl, G, metal }) => {
3173
- const c = new T.CatmullRomCurve3([[0, -0.8, 0], [0, 0.45, 0], [0.02, 0.62, 0], [0.12, 0.72, 0], [0.26, 0.7, 0], [0.32, 0.6, 0]].map((p) => new T.Vector3(...p)));
3174
- return G(mesh(new T.TubeGeometry(c, 30, 0.055, 8), metal(10168863)), mesh(cyl(0.02, 0.055, 0.14, 8), metal(3816510), [0, -0.86, 0]));
3172
+ import { markShared } from "@adatechnology/game-shapes-three";
3173
+ var CURVE = [[0, -0.8, 0], [0, 0.5, 0], [0.012, 0.625, 0], [0.06, 0.7, 0], [0.12, 0.715, 0], [0.19, 0.685, 0], [0.26, 0.63, 0]];
3174
+ var BAR_RADIUS = 0.026;
3175
+ var CHISEL = [[-0.024, -0.79], [0.024, -0.79], [0.016, -0.86], [4e-3, -0.928], [-8e-3, -0.928], [-0.022, -0.86]];
3176
+ var CHISEL_WIDTH = 0.06;
3177
+ var shapes = /* @__PURE__ */ new WeakMap();
3178
+ var shapesOf = (T, extrude) => {
3179
+ const cached = shapes.get(T);
3180
+ if (cached) return cached;
3181
+ const curve = new T.CatmullRomCurve3(CURVE.map((point) => new T.Vector3(...point)));
3182
+ const bar = new T.TubeGeometry(curve, 30, BAR_RADIUS, 6);
3183
+ const chisel = extrude(CHISEL, CHISEL_WIDTH, 4e-3);
3184
+ chisel.translate(0, 0, -CHISEL_WIDTH / 2);
3185
+ markShared(bar);
3186
+ markShared(chisel);
3187
+ const made = { bar, chisel };
3188
+ shapes.set(T, made);
3189
+ return made;
3190
+ };
3191
+ var crowbar = ({ T, mesh, bx, extrude, G, metal }) => {
3192
+ const forged = metal(7764863);
3193
+ const steel = metal(9277844);
3194
+ const end = CURVE[CURVE.length - 1];
3195
+ const before = CURVE[CURVE.length - 2];
3196
+ const angle = Math.atan2(end[1] - before[1], end[0] - before[0]);
3197
+ const along = (distance) => [end[0] + Math.cos(angle) * distance, end[1] + Math.sin(angle) * distance, 0];
3198
+ const prongs = [-1, 1].map((side) => mesh(bx(0.1, 0.016, 0.022), steel, [...along(0.03)].map((value, index) => index === 2 ? side * 0.014 : value), [0, 0, angle]));
3199
+ const { bar, chisel } = shapesOf(T, extrude);
3200
+ return G(mesh(bar, forged), mesh(chisel, steel), ...prongs);
3175
3201
  };
3176
3202
 
3177
3203
  // src/models/hammer.ts
@@ -7996,4 +8022,4 @@ export {
7996
8022
  HUMAN_HEIGHT,
7997
8023
  createItemsTestModule
7998
8024
  };
7999
- //# sourceMappingURL=chunk-76GT7V27.js.map
8025
+ //# sourceMappingURL=chunk-V4L35AWB.js.map