@lovelace_lol/embody 0.0.1 → 0.0.3

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
@@ -117,12 +117,14 @@ const core = await initEmbodyCore();
117
117
  const [left, right] = core.solve_bilateral_values(0.8, 0.25);
118
118
  ```
119
119
 
120
- The Wasm preset registry embeds `cc4` and `fish`. `default` and `human` select
121
- CC4; `skeletal` selects fish. Hosts can check `core.has_preset(id)` before
122
- calling `configure_with_preset(id, overrideJson, modelJson)`.
123
-
124
- Complete custom profiles use
125
- `configure_exact_profile(profileJson, modelJson)`. Exact mode never merges an
120
+ The Wasm preset registry currently embeds the canonical IDs `cc4` and `fish`.
121
+ It does not interpret compatibility aliases such as `default`, `human`, or
122
+ `skeletal`; application compatibility layers must normalize those values before
123
+ calling `configure_with_preset(id, overrideJson, modelJson)`. Hosts can use
124
+ `core.has_preset(id)` to validate a canonical ID.
125
+
126
+ Complete resolved profiles use
127
+ `configure_with_profile(profileJson, modelJson)`. This path never merges an
126
128
  embedded preset, and it rejects profiles that contain no runtime mappings or
127
129
  resolve no bindings against the inspected model. Selecting preset fallback for
128
130
  an incomplete legacy profile remains an explicit host decision.
@@ -132,9 +134,10 @@ merges overrides, deserializes the runtime projection, compiles model bindings,
132
134
  and returns packed numeric frame deltas on the hot path. Three.js object
133
135
  inspection and frame application remain host-side concerns.
134
136
 
135
- The package exports the Three.js inspector, frame applier, and clip adapter.
136
- Character host orchestration belongs in Polymer, so Embody no longer exports a
137
- separate TypeScript `RustEmbodyHost`.
137
+ The package currently exports the Three.js inspector, frame applier, and clip
138
+ adapter. Polymer owns the public CLJS facade during the Rust migration; runtime
139
+ policy and lifecycle are moving into Rust, while engine-object inspection and
140
+ mutation remain in the Three.js adapter.
138
141
 
139
142
  ### Template skeleton fit metadata
140
143
 
package/dist/index.cjs CHANGED
@@ -7574,17 +7574,20 @@ var BETTA_FISH_PRESET = {
7574
7574
  var AU_MAPPING_CONFIG = BETTA_FISH_PRESET;
7575
7575
  var FISH_AU_MAPPING_CONFIG = BETTA_FISH_PRESET;
7576
7576
 
7577
+ // src/presets/registry.ts
7578
+ var EMBEDDED_PRESETS = {
7579
+ cc4: CC4_PRESET,
7580
+ fish: BETTA_FISH_PRESET
7581
+ };
7582
+ function getEmbeddedPreset(presetId) {
7583
+ const normalized = presetId.trim().toLowerCase();
7584
+ return EMBEDDED_PRESETS[normalized];
7585
+ }
7586
+
7577
7587
  // src/presets/index.ts
7578
7588
  function getPreset(presetType) {
7579
- switch (presetType) {
7580
- case "fish":
7581
- case "skeletal":
7582
- return BETTA_FISH_PRESET;
7583
- case "cc4":
7584
- case "custom":
7585
- default:
7586
- return CC4_PRESET;
7587
- }
7589
+ const compatibilityId = presetType === "skeletal" ? "fish" : presetType;
7590
+ return compatibilityId ? getEmbeddedPreset(compatibilityId) ?? CC4_PRESET : CC4_PRESET;
7588
7591
  }
7589
7592
  var resolvePreset = getPreset;
7590
7593
  async function getPresetWithProfile(presetType, profile) {