@lovelace_lol/loom3 1.0.16 → 1.0.18

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
@@ -33,6 +33,8 @@ Loom3 provides mappings that connect [Facial Action Coding System (FACS)](https:
33
33
 
34
34
  ## 1. Installation & Setup
35
35
 
36
+ Production demo: [Open LoomLarge](https://loomlarge.web.app/?drawer=open&tab=animation)
37
+
36
38
  ![Project structure with Loom3 installed](./assets/readme/project-structure.svg)
37
39
 
38
40
  ### Install the package
@@ -136,6 +138,8 @@ const meshes = collectMorphMeshes(gltf.scene);
136
138
 
137
139
  ## 2. Using Presets
138
140
 
141
+ Production demos: [Properties](https://loomlarge.web.app/?drawer=open&tab=properties) | [Mappings](https://loomlarge.web.app/?drawer=open&tab=mappings)
142
+
139
143
  ![Diagram showing how Loom3 presets connect AUs to morphs and bones](./assets/readme/preset-au-flow.svg)
140
144
 
141
145
  Presets define how FACS Action Units map to your character's morph targets and bones. Loom3 ships with `CC4_PRESET` for Character Creator 4 characters.
@@ -225,9 +229,14 @@ Other `Profile` fields that are easy to miss:
225
229
  - `auMixDefaults` sets the default morph/bone blend weight per AU.
226
230
  - `compositeRotations` defines the per-node pitch/yaw/roll axis layout used by the composite rotation system.
227
231
  - `continuumPairs` and `continuumLabels` describe bidirectional AU pairs and their UI labels.
228
- - `annotationRegions` defines the regions used by the marker and camera tooling.
232
+ - `annotationRegions` defines the regions used by the marker and camera tooling, including per-region framing via `paddingFactor`.
229
233
  - `hairPhysics` stores the mixer-driven hair defaults, including direction signs and morph target mappings.
230
234
 
235
+ For `annotationRegions`, `paddingFactor` is the camera framing multiplier for that region:
236
+ - values below `1` zoom in tighter
237
+ - values above `1` pull back to show more surrounding context
238
+ - profile overrides can replace it per region by name without copying the whole preset
239
+
231
240
  ### Passing a preset to Loom3
232
241
 
233
242
  ```typescript
@@ -263,6 +272,8 @@ const DAISY_PROFILE: Profile = {
263
272
  morphToMesh: { face: ['Object_9'] },
264
273
  annotationRegions: [
265
274
  { name: 'face', bones: ['CC_Base_Head'] },
275
+ { name: 'left_eye', paddingFactor: 0.9 },
276
+ { name: 'right_eye', paddingFactor: 0.9 },
266
277
  ],
267
278
  };
268
279
 
@@ -278,6 +289,8 @@ const loom = new Loom3({
278
289
 
279
290
  ## 3. Getting to Know Your Character
280
291
 
292
+ Production demos: [Meshes](https://loomlarge.web.app/?drawer=open&tab=meshes) | [Bones](https://loomlarge.web.app/?drawer=open&tab=bones) | [Mappings](https://loomlarge.web.app/?drawer=open&tab=mappings)
293
+
281
294
  ![Console-style diagram showing Loom3 mesh and morph target inspection output](./assets/readme/console-mesh-output.svg)
282
295
 
283
296
  Before customizing presets or extending mappings, it's helpful to understand what's actually in your character model. Loom3 provides several methods to inspect meshes, morph targets, and bones.
@@ -438,6 +451,9 @@ This is especially useful for:
438
451
 
439
452
  ## 4. Extending & Custom Presets
440
453
 
454
+ Production demos: [Properties](https://loomlarge.web.app/?drawer=open&tab=properties) | [Mappings](https://loomlarge.web.app/?drawer=open&tab=mappings)
455
+
456
+ ![Diagram showing preset inheritance and mergePreset overrides](./assets/readme/preset-inheritance.svg)
441
457
  ![Diagram showing preset inheritance and profile override merging](./assets/readme/preset-inheritance.svg)
442
458
 
443
459
  ### Extending an existing preset
@@ -515,6 +531,8 @@ const current = loom.getProfile();
515
531
 
516
532
  ## 5. Creating Skeletal Animation Presets
517
533
 
534
+ Production demos: [Bones](https://loomlarge.web.app/?drawer=open&tab=bones) | [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units) | [Animation](https://loomlarge.web.app/?drawer=open&tab=animation)
535
+
518
536
  ![Betta fish model with bones panel visible](./assets/readme/fish-bones-ui.webp)
519
537
 
520
538
  Loom3 isn't limited to humanoid characters with morph targets. You can create presets for any 3D model that uses skeletal animation, such as fish, animals, or fantasy creatures. This section explains how to create a preset for a betta fish model that has no morph targets—only bone-driven animation.
@@ -796,6 +814,8 @@ async function swimCycle() {
796
814
 
797
815
  ## 6. Action Unit Control
798
816
 
817
+ Production demo: [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units)
818
+
799
819
  ![Grid of Loom3 Action Unit examples on a character](./assets/readme/au-values-grid.webp)
800
820
 
801
821
  Action Units are the core of FACS. Each AU represents a specific muscular movement of the face.
@@ -872,6 +892,8 @@ loom.setAU(12, 0.8, 1); // Right side only
872
892
 
873
893
  ## 7. Mix Weight System
874
894
 
895
+ Production demo: [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units)
896
+
875
897
  ![Comparison of morph-only, mixed, and bone-only AU results](./assets/readme/mix-weight-comparison.webp)
876
898
 
877
899
  Some AUs can be driven by both morph targets (blend shapes) AND bone rotations. The mix weight controls the blend between them.
@@ -919,6 +941,8 @@ if (isMixedAU(26)) {
919
941
 
920
942
  ## 8. Composite Rotation System
921
943
 
944
+ Production demos: [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units) | [Bones](https://loomlarge.web.app/?drawer=open&tab=bones)
945
+
922
946
  ![Diagram showing pitch, yaw, and roll axes on the head](./assets/readme/head-axes-diagram.svg)
923
947
 
924
948
  Bones like the head and eyes need multi-axis rotation (pitch, yaw, roll). The composite rotation system handles this automatically.
@@ -979,6 +1003,8 @@ loom.setAU(64, 0.4);
979
1003
 
980
1004
  ## 9. Continuum Pairs
981
1005
 
1006
+ Production demo: [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units)
1007
+
982
1008
  ![Continuum slider UI for paired Loom3 AUs](./assets/readme/continuum-slider-ui.webp)
983
1009
 
984
1010
  Continuum pairs are bidirectional AU pairs that represent opposite directions on the same axis. They're linked so that activating one should deactivate the other.
@@ -1079,6 +1105,8 @@ const pair = CONTINUUM_PAIRS_MAP[51];
1079
1105
 
1080
1106
  ## 10. Direct Morph Control
1081
1107
 
1108
+ Production demos: [Meshes](https://loomlarge.web.app/?drawer=open&tab=meshes) | [Mappings](https://loomlarge.web.app/?drawer=open&tab=mappings)
1109
+
1082
1110
  ![Direct morph control screenshot with a live morph preview](./assets/readme/direct-morph-control.webp)
1083
1111
 
1084
1112
  Sometimes you need to control morph targets directly by name, bypassing the AU system.
@@ -1120,6 +1148,8 @@ Loom3 caches morph target lookups for performance. The first time you access a m
1120
1148
 
1121
1149
  ## 11. Viseme System
1122
1150
 
1151
+ Production demos: [Visemes](https://loomlarge.web.app/?drawer=open&tab=visemes) | [Speech](https://loomlarge.web.app/?drawer=open&tab=speech)
1152
+
1123
1153
  ![Grid of all 15 Loom3 viseme mouth shapes](./assets/readme/viseme-grid.webp)
1124
1154
 
1125
1155
  Visemes are mouth shapes used for lip-sync. Loom3 includes 15 visemes with automatic jaw coupling.
@@ -1202,6 +1232,8 @@ speak([5, 0, 10, 4]);
1202
1232
 
1203
1233
  ## 12. Transition System
1204
1234
 
1235
+ Production demo: [Animation](https://loomlarge.web.app/?drawer=open&tab=animation)
1236
+
1205
1237
  ![Diagram showing a Loom3 transition timeline with easing and handle methods](./assets/readme/transition-timeline-easing.svg)
1206
1238
 
1207
1239
  All animated changes in Loom3 go through the transition system, which provides smooth interpolation with easing.
@@ -1284,6 +1316,8 @@ loom.clearTransitions();
1284
1316
 
1285
1317
  ## 13. Playback & State Control
1286
1318
 
1319
+ Production demo: [Animation](https://loomlarge.web.app/?drawer=open&tab=animation)
1320
+
1287
1321
  ![Playback controls UI showing Loom3 pause and resume controls](./assets/readme/pause-resume-controls.webp)
1288
1322
 
1289
1323
  ### Pausing and resuming
@@ -1341,6 +1375,8 @@ loom.dispose();
1341
1375
 
1342
1376
  ## 14. Hair Physics (Mixer-Driven)
1343
1377
 
1378
+ Production demo: [Hair](https://loomlarge.web.app/?drawer=open&tab=hair)
1379
+
1344
1380
  ![Animated GIF showing Loom3 hair physics reacting to head motion](./assets/readme/hair-physics.gif)
1345
1381
 
1346
1382
  Loom3 includes a built-in hair physics system that drives morph targets through the AnimationMixer.
@@ -1496,6 +1532,8 @@ Loom3 also logs a warning the first time it encounters a missing hair morph key.
1496
1532
 
1497
1533
  ## 15. Baked Animations
1498
1534
 
1535
+ Production demo: [Animation](https://loomlarge.web.app/?drawer=open&tab=animation)
1536
+
1499
1537
  Loom3 can play baked skeletal animations from your GLB/GLTF files using Three.js AnimationMixer. This allows you to combine pre-made animations (idle, walk, gestures) with real-time facial control.
1500
1538
 
1501
1539
  ### Loading animations
package/dist/index.cjs CHANGED
@@ -2104,13 +2104,13 @@ var CC4_PRESET = {
2104
2104
  {
2105
2105
  name: "left_eye",
2106
2106
  bones: ["CC_Base_L_Eye"],
2107
- paddingFactor: 1.2,
2107
+ paddingFactor: 0.9,
2108
2108
  parent: "head"
2109
2109
  },
2110
2110
  {
2111
2111
  name: "right_eye",
2112
2112
  bones: ["CC_Base_R_Eye"],
2113
- paddingFactor: 1.2,
2113
+ paddingFactor: 0.9,
2114
2114
  parent: "head"
2115
2115
  },
2116
2116
  {