@adatechnology/game-items-three 0.1.4 → 0.1.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.
package/README.md CHANGED
@@ -20,3 +20,8 @@ scene.add(buildItemLod(THREE, items.get('hammer')).root) // merged, with LOD an
20
20
  ```
21
21
 
22
22
  three.js is a peer dependency (`^0.160`). The global of the IIFE build is `GameItemsThree`.
23
+
24
+ The geometry comes from [`game-shapes`](../game-shapes): the kit's `T` is `shapeGeometries(THREE)`, so the ported builders keep writing
25
+ `new T.CylinderGeometry(...)` and get the same bytes from game-shapes' template cache (a tube still comes from three), and `mergeItem` joins on
26
+ `game-shapes-three`. `tests/exact-golden.test.ts` holds every bit of the 24 models and 25 shapes (alone, merged, half detail, LOD) as the old
27
+ path made them.
package/dist/index.d.ts CHANGED
@@ -16,7 +16,9 @@ interface ItemMaterialData {
16
16
  type Vec3Tuple = readonly [number, number, number];
17
17
  /**
18
18
  * The helpers the showcase page defines before its models (`M`, `mesh`, `cyl`, `bx`, `lathe`, `torus`, `extrude`, `G` and the seven material makers), so that the
19
- * builders ported from the page read the same as the originals. `T` is the three.js the kit was made with; `materials` lists every material it made, in order.
19
+ * builders ported from the page read the same as the originals. `T` is the three.js the kit was made with, with its box, cylinder, cone, sphere, plane, lathe, torus and
20
+ * (straight-edged) extrude geometries made by game-shapes (`shapeGeometries`: the same bytes, the same classes, a template cache); `materials` lists every material it made,
21
+ * in order.
20
22
  */
21
23
  interface ItemKit {
22
24
  readonly T: Three;
@@ -38,7 +40,7 @@ interface ItemKit {
38
40
  glass(color: number, opacity: number): THREE_NS.MeshStandardMaterial;
39
41
  }
40
42
  /** The helpers of the showcase page on a given three.js; every kit has its own list of materials. */
41
- declare function createItemKit(T: Three): ItemKit;
43
+ declare function createItemKit(three: Three): ItemKit;
42
44
 
43
45
  /** 0 new, 1 used, 2 spoiled (the three stages of the showcase). */
44
46
  type WearStage = 0 | 1 | 2;