@adatechnology/game-items-three 0.9.0 → 0.10.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/dist/index.d.ts +14 -1
- package/dist/index.global.js +659 -213
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/package.json +12 -10
package/dist/index.d.ts
CHANGED
|
@@ -105,6 +105,19 @@ interface ItemModel {
|
|
|
105
105
|
*/
|
|
106
106
|
declare function buildItem(T: typeof THREE_NS, item: DrawableItem, options?: BuildItemOptions): ItemModel;
|
|
107
107
|
|
|
108
|
+
/** A stack held in a container (`ItemStack` of game-interactables): the item id and its free data. */
|
|
109
|
+
interface ContainedStack {
|
|
110
|
+
readonly type: string;
|
|
111
|
+
}
|
|
112
|
+
/** What `createContainedItemModel` returns: the real model of a stack drawn with the caller's `THREE`, or null for an id the catalogue does not have. */
|
|
113
|
+
type ContainedItemModel = (stack: ContainedStack, T: typeof THREE_NS) => THREE_NS.Object3D | null;
|
|
114
|
+
/**
|
|
115
|
+
* The model of the items inside furniture, for `createContentsView` of game-interactables-three and `interactives.itemModel` of game-floorplan-three: each
|
|
116
|
+
* stack is drawn by `buildItem` from the catalogue (the team's model where there is one, the item's own shape otherwise), never a stand-in. Every item gets its
|
|
117
|
+
* own materials, so the view can discard it alone when it is taken. `root.userData.item` says what was drawn (`{ id, kind }`).
|
|
118
|
+
*/
|
|
119
|
+
declare function createContainedItemModel(items: Iterable<DrawableItem>, options?: Omit<BuildItemOptions, 'kit'>): ContainedItemModel;
|
|
120
|
+
|
|
108
121
|
/** The destruction material (`game-destruction` id) of each material tag of the kit, for a mesh whose model says nothing else. */
|
|
109
122
|
declare const DESTRUCTION_MATERIAL_BY_TAG: Readonly<Record<string, string>>;
|
|
110
123
|
/** How a model behaves under `game-destruction-three`'s `specFromObject3D`, as `data/destruction.json` keeps it. */
|
|
@@ -405,4 +418,4 @@ interface ThumbnailRenderer {
|
|
|
405
418
|
*/
|
|
406
419
|
declare function renderItemThumbnail(T: typeof THREE_NS, renderer: ThumbnailRenderer, item: DrawableItem, options?: ThumbnailRenderOptions): string;
|
|
407
420
|
|
|
408
|
-
export { type BudgetReport, type BuildItemOptions, type ContentsSubject, DESTRUCTION_MATERIAL_BY_TAG, type DestructionTagOptions, type DrawableItem, ITEM_BUDGETS, ITEM_FAMILIES, type ItemBudgets, type ItemContents, type ItemDestruction, type ItemFamily, ItemKit, type ItemLod, type ItemLodOptions, type ItemMakeup, type ItemModel, ItemModelBuilder, ItemModelEntry, type ItemModelRecord, ItemModelRegistry, type ItemModels, type ItemModelsOptions, type ItemOpening, type ItemOpeningStyle, type ItemSizeClass, MODEL_BUDGET_DEVIATIONS, OPENING_NAME, SHAPES, SHELL_PART_ID, SHIPPED_MODELS, type ShapeContext, type ShapeId, type ShapeSubject, type ThumbnailRenderOptions, type ThumbnailRenderer, type ThumbnailScene, type Vec3Like, Vec3Tuple, WEAR_AMOUNT, WEAR_TARGET, type WearStage, asLid, buildItem, buildItemLod, canonicalFrame, checkBudget, composeThumbnailScene, countDrawCalls, countTriangles, createItemModels, cullDistanceOf, drawShape, isShape, itemContents, itemDestruction, itemFamily, itemMakeup, itemModels, itemOpening, itemThumbnail, itemThumbnailSvg, makeupSpec, mergeItem, openItem, renderItemThumbnail, setOpeningContents, setWear, shade, shapeDestruction, shapeOf, shapeThumbnailSvg, sizeClassOf, tagForDestruction, tagMakeupParts, thumbnailPatch, triangleBudgetOf, turnItem, wearableMaterials };
|
|
421
|
+
export { type BudgetReport, type BuildItemOptions, type ContainedItemModel, type ContainedStack, type ContentsSubject, DESTRUCTION_MATERIAL_BY_TAG, type DestructionTagOptions, type DrawableItem, ITEM_BUDGETS, ITEM_FAMILIES, type ItemBudgets, type ItemContents, type ItemDestruction, type ItemFamily, ItemKit, type ItemLod, type ItemLodOptions, type ItemMakeup, type ItemModel, ItemModelBuilder, ItemModelEntry, type ItemModelRecord, ItemModelRegistry, type ItemModels, type ItemModelsOptions, type ItemOpening, type ItemOpeningStyle, type ItemSizeClass, MODEL_BUDGET_DEVIATIONS, OPENING_NAME, SHAPES, SHELL_PART_ID, SHIPPED_MODELS, type ShapeContext, type ShapeId, type ShapeSubject, type ThumbnailRenderOptions, type ThumbnailRenderer, type ThumbnailScene, type Vec3Like, Vec3Tuple, WEAR_AMOUNT, WEAR_TARGET, type WearStage, asLid, buildItem, buildItemLod, canonicalFrame, checkBudget, composeThumbnailScene, countDrawCalls, countTriangles, createContainedItemModel, createItemModels, cullDistanceOf, drawShape, isShape, itemContents, itemDestruction, itemFamily, itemMakeup, itemModels, itemOpening, itemThumbnail, itemThumbnailSvg, makeupSpec, mergeItem, openItem, renderItemThumbnail, setOpeningContents, setWear, shade, shapeDestruction, shapeOf, shapeThumbnailSvg, sizeClassOf, tagForDestruction, tagMakeupParts, thumbnailPatch, triangleBudgetOf, turnItem, wearableMaterials };
|