@lovelace_lol/loom3 1.0.6 → 1.0.8
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 +21 -21
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Loom3 provides mappings that connect [Facial Action Coding System (FACS)](https:
|
|
|
6
6
|
|
|
7
7
|
> **Note:** If you previously used the `loomlarge` npm package, it has been renamed to `@lovelace_lol/loom3`.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+

|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ Loom3 provides mappings that connect [Facial Action Coding System (FACS)](https:
|
|
|
32
32
|
|
|
33
33
|
## 1. Installation & Setup
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+

|
|
36
36
|
|
|
37
37
|
### Install the package
|
|
38
38
|
|
|
@@ -129,13 +129,13 @@ const meshes = collectMorphMeshes(gltf.scene);
|
|
|
129
129
|
// Returns: Array of THREE.Mesh objects with morph targets
|
|
130
130
|
```
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+

|
|
133
133
|
|
|
134
134
|
---
|
|
135
135
|
|
|
136
136
|
## 2. Using Presets
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+

|
|
139
139
|
|
|
140
140
|
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.
|
|
141
141
|
|
|
@@ -247,13 +247,13 @@ const loom = new Loom3({
|
|
|
247
247
|
});
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+

|
|
251
251
|
|
|
252
252
|
---
|
|
253
253
|
|
|
254
254
|
## 3. Getting to Know Your Character
|
|
255
255
|
|
|
256
|
-
|
|
256
|
+

|
|
257
257
|
|
|
258
258
|
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.
|
|
259
259
|
|
|
@@ -381,13 +381,13 @@ This is especially useful for:
|
|
|
381
381
|
- Making meshes semi-transparent for debugging
|
|
382
382
|
- Adjusting blending modes for special effects
|
|
383
383
|
|
|
384
|
-
|
|
384
|
+

|
|
385
385
|
|
|
386
386
|
---
|
|
387
387
|
|
|
388
388
|
## 4. Extending & Custom Presets
|
|
389
389
|
|
|
390
|
-
|
|
390
|
+

|
|
391
391
|
|
|
392
392
|
### Extending an existing preset
|
|
393
393
|
|
|
@@ -458,13 +458,13 @@ loom.setProfile(ANOTHER_PRESET);
|
|
|
458
458
|
const current = loom.getProfile();
|
|
459
459
|
```
|
|
460
460
|
|
|
461
|
-
|
|
461
|
+

|
|
462
462
|
|
|
463
463
|
---
|
|
464
464
|
|
|
465
465
|
## 5. Creating Skeletal Animation Presets
|
|
466
466
|
|
|
467
|
-
|
|
467
|
+

|
|
468
468
|
|
|
469
469
|
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.
|
|
470
470
|
|
|
@@ -739,13 +739,13 @@ async function swimCycle() {
|
|
|
739
739
|
}
|
|
740
740
|
```
|
|
741
741
|
|
|
742
|
-
|
|
742
|
+

|
|
743
743
|
|
|
744
744
|
---
|
|
745
745
|
|
|
746
746
|
## 6. Action Unit Control
|
|
747
747
|
|
|
748
|
-
|
|
748
|
+

|
|
749
749
|
|
|
750
750
|
Action Units are the core of FACS. Each AU represents a specific muscular movement of the face.
|
|
751
751
|
|
|
@@ -821,7 +821,7 @@ loom.setAU(12, 0.8, 1); // Right side only
|
|
|
821
821
|
|
|
822
822
|
## 7. Mix Weight System
|
|
823
823
|
|
|
824
|
-
|
|
824
|
+

|
|
825
825
|
|
|
826
826
|
Some AUs can be driven by both morph targets (blend shapes) AND bone rotations. The mix weight controls the blend between them.
|
|
827
827
|
|
|
@@ -868,7 +868,7 @@ if (isMixedAU(26)) {
|
|
|
868
868
|
|
|
869
869
|
## 8. Composite Rotation System
|
|
870
870
|
|
|
871
|
-
|
|
871
|
+

|
|
872
872
|
|
|
873
873
|
Bones like the head and eyes need multi-axis rotation (pitch, yaw, roll). The composite rotation system handles this automatically.
|
|
874
874
|
|
|
@@ -928,7 +928,7 @@ loom.setAU(64, 0.4);
|
|
|
928
928
|
|
|
929
929
|
## 9. Continuum Pairs
|
|
930
930
|
|
|
931
|
-
|
|
931
|
+

|
|
932
932
|
|
|
933
933
|
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.
|
|
934
934
|
|
|
@@ -1028,7 +1028,7 @@ const pair = CONTINUUM_PAIRS_MAP[51];
|
|
|
1028
1028
|
|
|
1029
1029
|
## 10. Direct Morph Control
|
|
1030
1030
|
|
|
1031
|
-
|
|
1031
|
+

|
|
1032
1032
|
|
|
1033
1033
|
Sometimes you need to control morph targets directly by name, bypassing the AU system.
|
|
1034
1034
|
|
|
@@ -1069,7 +1069,7 @@ Loom3 caches morph target lookups for performance. The first time you access a m
|
|
|
1069
1069
|
|
|
1070
1070
|
## 11. Viseme System
|
|
1071
1071
|
|
|
1072
|
-
|
|
1072
|
+

|
|
1073
1073
|
|
|
1074
1074
|
Visemes are mouth shapes used for lip-sync. Loom3 includes 15 visemes with automatic jaw coupling.
|
|
1075
1075
|
|
|
@@ -1158,7 +1158,7 @@ speak([5, 0, 10, 4]);
|
|
|
1158
1158
|
|
|
1159
1159
|
## 12. Transition System
|
|
1160
1160
|
|
|
1161
|
-
|
|
1161
|
+

|
|
1162
1162
|
|
|
1163
1163
|
All animated changes in Loom3 go through the transition system, which provides smooth interpolation with easing.
|
|
1164
1164
|
|
|
@@ -1240,7 +1240,7 @@ loom.clearTransitions();
|
|
|
1240
1240
|
|
|
1241
1241
|
## 13. Playback & State Control
|
|
1242
1242
|
|
|
1243
|
-
|
|
1243
|
+

|
|
1244
1244
|
|
|
1245
1245
|
### Pausing and resuming
|
|
1246
1246
|
|
|
@@ -1297,7 +1297,7 @@ loom.dispose();
|
|
|
1297
1297
|
|
|
1298
1298
|
## 14. Hair Physics (Mixer-Driven)
|
|
1299
1299
|
|
|
1300
|
-
|
|
1300
|
+

|
|
1301
1301
|
|
|
1302
1302
|
Loom3 includes a built-in hair physics system that drives morph targets through the AnimationMixer.
|
|
1303
1303
|
It is **mixer-only** (no per-frame morph LERP), and it reacts to **head rotation** coming from AUs.
|
|
@@ -1655,7 +1655,7 @@ loom.transitionAU(45, 1.0, 100); // Blink
|
|
|
1655
1655
|
|
|
1656
1656
|
## Resources
|
|
1657
1657
|
|
|
1658
|
-
|
|
1658
|
+

|
|
1659
1659
|
|
|
1660
1660
|
- [FACS on Wikipedia](https://en.wikipedia.org/wiki/Facial_Action_Coding_System)
|
|
1661
1661
|
- [Paul Ekman Group - FACS](https://www.paulekman.com/facial-action-coding-system/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovelace_lol/loom3",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Lightweight 3D character animation engine for facial AUs, visemes, and bone-driven motion",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"homepage": "https://github.com/meekmachine/Loom3#readme",
|
|
67
67
|
"author": "Jonathan",
|
|
68
68
|
"license": "MIT",
|
|
69
|
-
"packageManager": "
|
|
69
|
+
"packageManager": "npm@10.9.2"
|
|
70
70
|
}
|