@adatechnology/game-items-three 0.6.2 → 0.7.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.
package/README.md CHANGED
@@ -26,3 +26,9 @@ The geometry comes from [`game-shapes`](../game-shapes): the kit's `T` is `shape
26
26
  `new T.CylinderGeometry(...)` and get the same bytes from game-shapes' template cache (a tube still comes from three), and `mergeItem` joins on
27
27
  `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
28
28
  path made them.
29
+
30
+ ## Item models by instance
31
+
32
+ `createItemModels({ packs, patch, remove })` makes a set of models of its own: the shipped ones plus `packs`. `packs` is a list of lists of `{ entry: ItemModelEntry, builder: ItemModelBuilder }` records (`[[{ entry, builder }]]`); a record with the id of a shipped model replaces it.
33
+ `patch` merges `entry` fields by item id (`scale`, `teamBox`), `remove` lists item ids whose model is taken out (the item then gets its simple shape).
34
+ The set draws on its own: `models.build`, `models.buildLod` and `models.thumbnail`; `buildItem`, `buildItemLod`, `itemThumbnail`, `thumbnailPatch`, `composeThumbnailScene` and `createItemsTestModule` take it as `models`. Without one they use the set behind `registerItemModel` (deprecated).