@adatechnology/game-interactables-household 0.1.0 → 0.2.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/README.md +4 -4
- package/dist/index.d.ts +3 -1
- package/dist/index.global.js +14910 -1577
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +9 -1386
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -59,9 +59,9 @@ volumes (clothes, curtains, glass), `world.emitters()` for flames, smoke, steam
|
|
|
59
59
|
|---|---|
|
|
60
60
|
| `createHousehold({ locale?, region? })` | Creates the pack. `locale` is `en` (default) or `pt-BR`; `region` is `br` or `us` (default: `br` for `pt-BR`, else `us`) |
|
|
61
61
|
| `hh.types` | `[{ id, name, group, w, d, h, y, solid }]`, `name` localized. `y` is the default mounting height, `solid: false` marks wall items and wires |
|
|
62
|
-
| `hh.items` | `ItemCatalog`,
|
|
62
|
+
| `hh.items` | `ItemCatalog`, the 92 household items (same ids as before) with `size`, `weight`, `stack`, `shape`, `color`, `category` (one of the 14 of `game-items`; the old household category is in `tags`) and the rest of the `game-items` `ItemDef`. They come from `@adatechnology/game-items-goods`; `HOUSEHOLD_ITEM_IDS` lists them |
|
|
63
63
|
| `hh.loot` | `LootTables` for `fridge`, `freezer`, `kitchen_cabinet`, `kitchen_drawer`, `pantry`, `wardrobe`, `dresser`, `nightstand`, `bathroom_cabinet`, `under_sink`, `trash`, `mailbox`, `bbq_counter`, `garage_shelf` |
|
|
64
|
-
| `hh.strings` | `{ en, 'pt-BR' }`: `type.<id>`, `item.<id
|
|
64
|
+
| `hh.strings` | `{ en, 'pt-BR' }`: `type.<id>`, `item.<id>` (from the goods locales), `prompt.<x>` (with `.open` / `.closed` / `.on` / `.off` variants) and `letter.*` texts. Pass it to `createWorld({ strings })` |
|
|
65
65
|
| `hh.region` | Data of the region (`regions/<id>.json`): gas bottle, small gas canister, socket standard and voltage, mailbox style, clothesline style |
|
|
66
66
|
| `hh.build(type, item, api)` | Draws through `api` and returns the `ObjectSpec`. Deterministic for the same `item.seed` |
|
|
67
67
|
| `createRecorder()` | `{ api, primitives, parts }`: records static primitives in `primitives` and the ones drawn inside a part under `parts[id]` (`{ id, pivot, ry, primitives }`), for tests and previews |
|
|
@@ -191,8 +191,8 @@ Seats face `+z` of the object (`ry = PI`, because yaw 0 is -z in `game-interacta
|
|
|
191
191
|
|
|
192
192
|
## Data
|
|
193
193
|
|
|
194
|
-
Everything is plain JSON in `src/data` (bundled): `types.json`, `
|
|
195
|
-
`regions/br.json`, `regions/us.json`. Region specifics are data, never a type suffix:
|
|
194
|
+
Everything is plain JSON in `src/data` (bundled): `types.json`, `loot.json`, `locales/en.json`, `locales/pt-BR.json` and
|
|
195
|
+
`regions/br.json`, `regions/us.json`. The items are not here: they live in `@adatechnology/game-items-goods` (the catalog that merged these 92 with the team's 257). Region specifics are data, never a type suffix:
|
|
196
196
|
|
|
197
197
|
```json
|
|
198
198
|
{ "id": "br", "gas": { "kind": "P13", "capacityKg": 13 }, "socket": { "standard": "NBR 14136", "voltage": [127, 220], "hz": 60 }, "mailbox": { "style": "wall" } }
|
package/dist/index.d.ts
CHANGED
|
@@ -111,6 +111,8 @@ interface Household {
|
|
|
111
111
|
build(type: string, item: HouseholdItem, api: HouseholdApi): ObjectSpec;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
/** Items of the pack: the goods items that started as household items (their ids are kept). */
|
|
115
|
+
declare const HOUSEHOLD_ITEM_IDS: string[];
|
|
114
116
|
/** Ids of every type in the pack. */
|
|
115
117
|
declare const HOUSEHOLD_TYPES: string[];
|
|
116
118
|
/** Regions that ship with the pack. */
|
|
@@ -152,4 +154,4 @@ declare function motionPoint(p: Vec3, pivot: Vec3, m: Motion, t: number): Vec3;
|
|
|
152
154
|
/** Floor rect [x0, z0, x1, z1] covered by object-local points while the part goes from t = 0 to t = 1. */
|
|
153
155
|
declare function sweepOf(points: Vec3[], pivot: Vec3, m: Motion, margin?: number): [number, number, number, number];
|
|
154
156
|
|
|
155
|
-
export { type ContentsEntry, HOUSEHOLD_REGIONS, HOUSEHOLD_TYPES, type Household, type HouseholdApi, type HouseholdGroup, type HouseholdItem, type HouseholdOptions, type HouseholdRecorder, type HouseholdType, type HouseholdTypeDef, type RecordedPart, type Region, cornersOf, createHousehold, createRecorder, motionPoint, sweepOf };
|
|
157
|
+
export { type ContentsEntry, HOUSEHOLD_ITEM_IDS, HOUSEHOLD_REGIONS, HOUSEHOLD_TYPES, type Household, type HouseholdApi, type HouseholdGroup, type HouseholdItem, type HouseholdOptions, type HouseholdRecorder, type HouseholdType, type HouseholdTypeDef, type RecordedPart, type Region, cornersOf, createHousehold, createRecorder, motionPoint, sweepOf };
|