@adatechnology/game-items-three 0.8.5 → 0.9.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/{chunk-V4L35AWB.js → chunk-35IYUYZP.js} +603 -443
- package/dist/chunk-35IYUYZP.js.map +1 -0
- package/dist/index.d.ts +16 -2
- package/dist/index.global.js +31137 -5101
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/testing.js +1 -1
- package/package.json +12 -10
- package/dist/chunk-V4L35AWB.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-CBYX7wTL.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-CBYX7wTL.js';
|
|
3
3
|
import * as THREE_NS from 'three';
|
|
4
|
-
import { ContainerSpec, Thumbnail, DeepPartial } from '@adatechnology/game-contracts';
|
|
4
|
+
import { ContainerSpec, DestructibleSpec, Thumbnail, DeepPartial } from '@adatechnology/game-contracts';
|
|
5
5
|
import '@adatechnology/game-items';
|
|
6
6
|
|
|
7
7
|
/** 0 new, 1 used, 2 spoiled (the three stages of the showcase). */
|
|
@@ -201,6 +201,20 @@ interface DestructionTagOptions {
|
|
|
201
201
|
*/
|
|
202
202
|
declare function tagForDestruction(root: THREE_NS.Object3D, options?: DestructionTagOptions): void;
|
|
203
203
|
|
|
204
|
+
/** What an item is physically made of, part by part: the one description both the goods catalog and the weapons counter build the world object from. */
|
|
205
|
+
interface ItemMakeup {
|
|
206
|
+
/** Kit material tag of a drawn mesh to the id of the part it belongs to. */
|
|
207
|
+
readonly meshes: Readonly<Record<string, string>>;
|
|
208
|
+
/** The parts and joints in metres, in the frame of a built item: origin at the bottom centre, x along its length, y up. */
|
|
209
|
+
readonly spec: DestructibleSpec;
|
|
210
|
+
}
|
|
211
|
+
/** The make-up of the model `modelId` (`shovel`), if it has one. */
|
|
212
|
+
declare const itemMakeup: (modelId: string) => ItemMakeup | undefined;
|
|
213
|
+
/** A fresh copy of the spec of the model's make-up, for the destruction world to own; `tags` are added to the spec's. */
|
|
214
|
+
declare function makeupSpec(modelId: string, tags?: readonly string[]): DestructibleSpec | undefined;
|
|
215
|
+
/** The part of the make-up each mesh under `root` belongs to, by its kit material tag: written as `userData.destructionPart`/`destructionMaterial` for the renderer to bind. */
|
|
216
|
+
declare function tagMakeupParts(root: THREE_NS.Object3D, modelId: string): void;
|
|
217
|
+
|
|
204
218
|
/**
|
|
205
219
|
* How a sealed model looks once open: `cut_lid` (a tin opened with a can opener: the lid cut along the rim and bent up on a hinge, the food showing),
|
|
206
220
|
* `peel_lid` (a flat tin with a ring pull: the lid rolled back along its length), `pull_tab` (a drink can: the scored mouth pushed in under the tab) and `screw_cap`
|
|
@@ -391,4 +405,4 @@ interface ThumbnailRenderer {
|
|
|
391
405
|
*/
|
|
392
406
|
declare function renderItemThumbnail(T: typeof THREE_NS, renderer: ThumbnailRenderer, item: DrawableItem, options?: ThumbnailRenderOptions): string;
|
|
393
407
|
|
|
394
|
-
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 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, itemModels, itemOpening, itemThumbnail, itemThumbnailSvg, mergeItem, openItem, renderItemThumbnail, setOpeningContents, setWear, shade, shapeDestruction, shapeOf, shapeThumbnailSvg, sizeClassOf, tagForDestruction, thumbnailPatch, triangleBudgetOf, turnItem, wearableMaterials };
|
|
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 };
|