@umicat/three-sdk 0.18.0 → 0.19.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/README.md CHANGED
@@ -73,6 +73,11 @@ Each rule is a decision:
73
73
  Guessing that every model calls its walk cycle `Walk` fails silently; an
74
74
  independent review's cross-rig retarget returned zero matched bones and zero
75
75
  tracks, which is the same class of failure, quieter.
76
+ - **A prop declares which socket it belongs in** (`socket: 'hand-right'` on the
77
+ sword, `sockets: { 'hand-right': {...} }` on the character). Both halves are
78
+ properties of the MODEL, not of any game — a cap goes on a head in every game
79
+ there has ever been — so a game that owns a character pack does not also have
80
+ to own a lookup table saying a cap is headwear.
76
81
  - **Skins are declared per asset and chosen per entity**
77
82
  (`skins: { zombie: 'skins/zombieA.png' }`, then `skin: 'zombie'`). A body and
78
83
  its wardrobe are separate files, so N bodies × M skins costs N + M assets
package/dist/scene3d.d.ts CHANGED
@@ -142,6 +142,17 @@ export interface ModelAsset3D {
142
142
  animations?: AnimationMap;
143
143
  /** Interchangeable textures for this model — `{ "zombie": "skins/zombieA.png" }`. */
144
144
  skins?: SkinMap;
145
+ /**
146
+ * For a model that is WORN rather than worn-on: which of a character's
147
+ * `sockets` it belongs in — `"head"` for a cap, `"hand-right"` for a sword.
148
+ *
149
+ * The pairing is a property of the prop, not of any game: a cap goes on a
150
+ * head in every game that has ever existed. Without it, "attach this cap"
151
+ * needs a lookup table written per game, and twelve games write twelve
152
+ * slightly different ones — the same argument as the socket offsets living
153
+ * on the character (see `Socket3D`), from the other end.
154
+ */
155
+ socket?: string;
145
156
  /** Authoring correction applied at load: most models are not born 1 unit tall. */
146
157
  importScale?: number;
147
158
  /** Named attachment points — `{ "hand-right": { bone: "arm-right", ... } }`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umicat/three-sdk",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Three.js runtime for Umicat games: the scene3d design format, its loader with physics, a kinematic character controller, and the Umicat platform via @umicat/platform-sdk.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",