@adatechnology/game-interactables 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.
Files changed (2) hide show
  1. package/dist/index.d.ts +5 -0
  2. package/package.json +4 -1
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Thumbnail } from '@adatechnology/game-contracts';
2
+
1
3
  /**
2
4
  * Contract of @adatechnology/game-interactables.
3
5
  *
@@ -10,6 +12,7 @@
10
12
  * to a `World`, calls `update(dt)` every frame and draws whatever the world reports. Coordinates in a spec are local to the object
11
13
  * (front = +z, origin at the center of the footprint on the floor, meters). `World` converts them with the object's `Transform`.
12
14
  */
15
+
13
16
  type Vec3 = [number, number, number];
14
17
  /** Placement of an object in the host's space. Rotation is around +y (radians). */
15
18
  interface Transform {
@@ -123,6 +126,8 @@ interface ItemDef {
123
126
  /** Hint for the host's renderer: which simple shape to draw (`can`, `box`, `bottle`, `jar`, `bag`, `cloth`, `paper`, `tool`...). */
124
127
  shape?: string;
125
128
  color?: number;
129
+ /** Picture for catalogues and inventories. */
130
+ thumbnail?: Thumbnail;
126
131
  }
127
132
  type ItemCatalog = Record<string, ItemDef>;
128
133
  /** A spot where one stack sits, in object-local coordinates (bottom center of the stack). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adatechnology/game-interactables",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "license": "MIT",
5
5
  "description": "Renderer-agnostic runtime for interactive world objects: movable parts, containers with pickable items, power grid, fuel, logical plumbing, seats, soft volumes, effects, mirrors and damage.",
6
6
  "keywords": [
@@ -38,6 +38,9 @@
38
38
  "files": [
39
39
  "dist"
40
40
  ],
41
+ "dependencies": {
42
+ "@adatechnology/game-contracts": "0.9.0"
43
+ },
41
44
  "devDependencies": {
42
45
  "@types/node": "^22.10.7",
43
46
  "tsup": "^8.5.1",