@lovelace_lol/loom3 1.0.16 → 1.0.17
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 +31 -0
- package/package.json +1 -1
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
|

|
|
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
|

|
|
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.
|
|
@@ -278,6 +282,8 @@ const loom = new Loom3({
|
|
|
278
282
|
|
|
279
283
|
## 3. Getting to Know Your Character
|
|
280
284
|
|
|
285
|
+
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)
|
|
286
|
+
|
|
281
287
|

|
|
282
288
|
|
|
283
289
|
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 +444,9 @@ This is especially useful for:
|
|
|
438
444
|
|
|
439
445
|
## 4. Extending & Custom Presets
|
|
440
446
|
|
|
447
|
+
Production demos: [Properties](https://loomlarge.web.app/?drawer=open&tab=properties) | [Mappings](https://loomlarge.web.app/?drawer=open&tab=mappings)
|
|
448
|
+
|
|
449
|
+

|
|
441
450
|

|
|
442
451
|
|
|
443
452
|
### Extending an existing preset
|
|
@@ -515,6 +524,8 @@ const current = loom.getProfile();
|
|
|
515
524
|
|
|
516
525
|
## 5. Creating Skeletal Animation Presets
|
|
517
526
|
|
|
527
|
+
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)
|
|
528
|
+
|
|
518
529
|

|
|
519
530
|
|
|
520
531
|
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 +807,8 @@ async function swimCycle() {
|
|
|
796
807
|
|
|
797
808
|
## 6. Action Unit Control
|
|
798
809
|
|
|
810
|
+
Production demo: [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units)
|
|
811
|
+
|
|
799
812
|

|
|
800
813
|
|
|
801
814
|
Action Units are the core of FACS. Each AU represents a specific muscular movement of the face.
|
|
@@ -872,6 +885,8 @@ loom.setAU(12, 0.8, 1); // Right side only
|
|
|
872
885
|
|
|
873
886
|
## 7. Mix Weight System
|
|
874
887
|
|
|
888
|
+
Production demo: [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units)
|
|
889
|
+
|
|
875
890
|

|
|
876
891
|
|
|
877
892
|
Some AUs can be driven by both morph targets (blend shapes) AND bone rotations. The mix weight controls the blend between them.
|
|
@@ -919,6 +934,8 @@ if (isMixedAU(26)) {
|
|
|
919
934
|
|
|
920
935
|
## 8. Composite Rotation System
|
|
921
936
|
|
|
937
|
+
Production demos: [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units) | [Bones](https://loomlarge.web.app/?drawer=open&tab=bones)
|
|
938
|
+
|
|
922
939
|

|
|
923
940
|
|
|
924
941
|
Bones like the head and eyes need multi-axis rotation (pitch, yaw, roll). The composite rotation system handles this automatically.
|
|
@@ -979,6 +996,8 @@ loom.setAU(64, 0.4);
|
|
|
979
996
|
|
|
980
997
|
## 9. Continuum Pairs
|
|
981
998
|
|
|
999
|
+
Production demo: [Action Units](https://loomlarge.web.app/?drawer=open&tab=action-units)
|
|
1000
|
+
|
|
982
1001
|

|
|
983
1002
|
|
|
984
1003
|
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 +1098,8 @@ const pair = CONTINUUM_PAIRS_MAP[51];
|
|
|
1079
1098
|
|
|
1080
1099
|
## 10. Direct Morph Control
|
|
1081
1100
|
|
|
1101
|
+
Production demos: [Meshes](https://loomlarge.web.app/?drawer=open&tab=meshes) | [Mappings](https://loomlarge.web.app/?drawer=open&tab=mappings)
|
|
1102
|
+
|
|
1082
1103
|

|
|
1083
1104
|
|
|
1084
1105
|
Sometimes you need to control morph targets directly by name, bypassing the AU system.
|
|
@@ -1120,6 +1141,8 @@ Loom3 caches morph target lookups for performance. The first time you access a m
|
|
|
1120
1141
|
|
|
1121
1142
|
## 11. Viseme System
|
|
1122
1143
|
|
|
1144
|
+
Production demos: [Visemes](https://loomlarge.web.app/?drawer=open&tab=visemes) | [Speech](https://loomlarge.web.app/?drawer=open&tab=speech)
|
|
1145
|
+
|
|
1123
1146
|

|
|
1124
1147
|
|
|
1125
1148
|
Visemes are mouth shapes used for lip-sync. Loom3 includes 15 visemes with automatic jaw coupling.
|
|
@@ -1202,6 +1225,8 @@ speak([5, 0, 10, 4]);
|
|
|
1202
1225
|
|
|
1203
1226
|
## 12. Transition System
|
|
1204
1227
|
|
|
1228
|
+
Production demo: [Animation](https://loomlarge.web.app/?drawer=open&tab=animation)
|
|
1229
|
+
|
|
1205
1230
|

|
|
1206
1231
|
|
|
1207
1232
|
All animated changes in Loom3 go through the transition system, which provides smooth interpolation with easing.
|
|
@@ -1284,6 +1309,8 @@ loom.clearTransitions();
|
|
|
1284
1309
|
|
|
1285
1310
|
## 13. Playback & State Control
|
|
1286
1311
|
|
|
1312
|
+
Production demo: [Animation](https://loomlarge.web.app/?drawer=open&tab=animation)
|
|
1313
|
+
|
|
1287
1314
|

|
|
1288
1315
|
|
|
1289
1316
|
### Pausing and resuming
|
|
@@ -1341,6 +1368,8 @@ loom.dispose();
|
|
|
1341
1368
|
|
|
1342
1369
|
## 14. Hair Physics (Mixer-Driven)
|
|
1343
1370
|
|
|
1371
|
+
Production demo: [Hair](https://loomlarge.web.app/?drawer=open&tab=hair)
|
|
1372
|
+
|
|
1344
1373
|

|
|
1345
1374
|
|
|
1346
1375
|
Loom3 includes a built-in hair physics system that drives morph targets through the AnimationMixer.
|
|
@@ -1496,6 +1525,8 @@ Loom3 also logs a warning the first time it encounters a missing hair morph key.
|
|
|
1496
1525
|
|
|
1497
1526
|
## 15. Baked Animations
|
|
1498
1527
|
|
|
1528
|
+
Production demo: [Animation](https://loomlarge.web.app/?drawer=open&tab=animation)
|
|
1529
|
+
|
|
1499
1530
|
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
1531
|
|
|
1501
1532
|
### Loading animations
|
package/package.json
CHANGED