@adatechnology/game-items-three 0.14.0 → 0.14.1
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/{chunk-XJG7IGO3.js → chunk-PAQ3Q5I2.js} +26 -9
- package/dist/chunk-PAQ3Q5I2.js.map +1 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.global.js +311 -54
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/testing.js +1 -1
- package/package.json +7 -7
- package/dist/chunk-XJG7IGO3.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { V as Vec3Tuple, I as ItemKit, a as ItemModelRegistry, b as ItemModelEntry, c as ItemModelBuilder } from './testing-C96KjBjB.js';
|
|
2
2
|
export { F as FINDS_TABLE_ID, H as HUMAN_HEIGHT, d as HUMAN_ID, e as ITEM_PREFIX, f as ItemMaterialData, g as ItemsAreaState, h as ItemsTestModule, i as ItemsTestModuleOptions, L as LayoutItem, R as ROW_LIMIT, j as RULER_HEIGHT, k as RULER_ID, S as SHELF_HEIGHT, l as SHELF_PREFIX, m as SHOWCASE_PREFIX, n as SHOWCASE_STAND_ID, o as ScenarioLike, p as ShelfPlan, W as WEAR_TAGS, q as WearTag, r as createItemKit, s as createItemsTestModule, t as defaultItemModels, u as hasItemModel, v as itemModelBuilder, w as itemModelEntry, x as listItemModels, y as registerItemModel, z as shelvesLayout, A as unregisterItemModel } from './testing-C96KjBjB.js';
|
|
3
3
|
import * as THREE_NS from 'three';
|
|
4
|
-
import { ItemDef, ItemRules, Freshness } from '@adatechnology/game-items';
|
|
4
|
+
import { ItemDef, ItemRules, Freshness, ConsumableSpec } from '@adatechnology/game-items';
|
|
5
5
|
import { ContainerSpec, DestructibleSpec, Thumbnail, DeepPartial } from '@adatechnology/game-contracts';
|
|
6
6
|
|
|
7
7
|
/** 0 new, 1 used, 2 spoiled (the three stages of the showcase). */
|
|
@@ -83,6 +83,13 @@ interface DrawableItem extends ShapeSubject {
|
|
|
83
83
|
readonly material: string;
|
|
84
84
|
readonly thickness?: number;
|
|
85
85
|
}[];
|
|
86
|
+
/** What the item holds (`ItemDef.fluid`): with `destructible`, its body holds it and a hole through it leaks (`tagForDestruction`). */
|
|
87
|
+
fluid?: {
|
|
88
|
+
readonly liquid: string;
|
|
89
|
+
readonly liters?: number;
|
|
90
|
+
};
|
|
91
|
+
/** What it spends at each use (`ItemDef.consumable`): a liquid one says the litres the item holds (`itemFluid`). */
|
|
92
|
+
consumable?: ConsumableSpec;
|
|
86
93
|
}
|
|
87
94
|
interface BuildItemOptions {
|
|
88
95
|
/** Wear of the materials, 0 new (default), 1 used, 2 spoiled. */
|
|
@@ -200,6 +207,13 @@ interface ContentsSubject {
|
|
|
200
207
|
readonly size: readonly [number, number, number];
|
|
201
208
|
/** Kg, shell included. */
|
|
202
209
|
readonly weight?: number;
|
|
210
|
+
/** What the item's data says it holds (`ItemDef.fluid`): the contents of a model the family table does not know (a detergent bottle, a tub of yogurt). */
|
|
211
|
+
readonly fluid?: {
|
|
212
|
+
readonly liquid: string;
|
|
213
|
+
readonly liters: number;
|
|
214
|
+
};
|
|
215
|
+
/** The container is a box (a carton) rather than a cylinder (a bottle, a pot). */
|
|
216
|
+
readonly box?: boolean;
|
|
203
217
|
}
|
|
204
218
|
/** Id of the welded part that is the whole shell of a container. */
|
|
205
219
|
declare const SHELL_PART_ID = "shell";
|
|
@@ -254,6 +268,11 @@ interface DestructionTagOptions {
|
|
|
254
268
|
readonly material: string;
|
|
255
269
|
readonly thickness?: number;
|
|
256
270
|
}[];
|
|
271
|
+
/** What the item's data says it holds (`ItemDef.fluid`): written on its body as on the shell of a can, so a hole through it leaks. */
|
|
272
|
+
readonly fluid?: {
|
|
273
|
+
readonly liquid: string;
|
|
274
|
+
readonly liters: number;
|
|
275
|
+
};
|
|
257
276
|
}
|
|
258
277
|
/**
|
|
259
278
|
* Writes the `userData` that `specFromObject3D` reads onto the meshes of a drawn item: the destruction material of each mesh from its kit material tag,
|