@lovelace_lol/loom3 1.0.17 → 1.0.19
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 +8 -1
- package/dist/index.cjs +42 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +42 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -229,9 +229,14 @@ Other `Profile` fields that are easy to miss:
|
|
|
229
229
|
- `auMixDefaults` sets the default morph/bone blend weight per AU.
|
|
230
230
|
- `compositeRotations` defines the per-node pitch/yaw/roll axis layout used by the composite rotation system.
|
|
231
231
|
- `continuumPairs` and `continuumLabels` describe bidirectional AU pairs and their UI labels.
|
|
232
|
-
- `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`.
|
|
233
233
|
- `hairPhysics` stores the mixer-driven hair defaults, including direction signs and morph target mappings.
|
|
234
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
|
+
|
|
235
240
|
### Passing a preset to Loom3
|
|
236
241
|
|
|
237
242
|
```typescript
|
|
@@ -267,6 +272,8 @@ const DAISY_PROFILE: Profile = {
|
|
|
267
272
|
morphToMesh: { face: ['Object_9'] },
|
|
268
273
|
annotationRegions: [
|
|
269
274
|
{ name: 'face', bones: ['CC_Base_Head'] },
|
|
275
|
+
{ name: 'left_eye', paddingFactor: 0.9 },
|
|
276
|
+
{ name: 'right_eye', paddingFactor: 0.9 },
|
|
270
277
|
],
|
|
271
278
|
};
|
|
272
279
|
|
package/dist/index.cjs
CHANGED
|
@@ -384,6 +384,43 @@ var BakedAnimationController = class {
|
|
|
384
384
|
source: this.clipSources.get(clip.name) ?? "baked"
|
|
385
385
|
}));
|
|
386
386
|
}
|
|
387
|
+
removeAnimationClip(clipName) {
|
|
388
|
+
const clip = this.animationClips.find((entry) => entry.name === clipName);
|
|
389
|
+
if (!clip || (this.clipSources.get(clipName) ?? "baked") !== "baked") {
|
|
390
|
+
return false;
|
|
391
|
+
}
|
|
392
|
+
const relatedActions = /* @__PURE__ */ new Set();
|
|
393
|
+
const bakedAction = this.animationActions.get(clipName);
|
|
394
|
+
const clipAction = this.clipActions.get(clipName);
|
|
395
|
+
if (bakedAction) relatedActions.add(bakedAction);
|
|
396
|
+
if (clipAction) relatedActions.add(clipAction);
|
|
397
|
+
this.stopAnimation(clipName);
|
|
398
|
+
if (this.animationMixer) {
|
|
399
|
+
for (const action of relatedActions) {
|
|
400
|
+
try {
|
|
401
|
+
this.animationMixer.uncacheAction(clip);
|
|
402
|
+
} catch {
|
|
403
|
+
}
|
|
404
|
+
try {
|
|
405
|
+
this.animationMixer.uncacheClip(clip);
|
|
406
|
+
} catch {
|
|
407
|
+
}
|
|
408
|
+
const actionId = this.getActionId(action);
|
|
409
|
+
if (actionId) {
|
|
410
|
+
this.actionIdToClip.delete(actionId);
|
|
411
|
+
}
|
|
412
|
+
this.actionIds.delete(action);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
this.animationClips = this.animationClips.filter((entry) => entry.name !== clipName);
|
|
416
|
+
this.animationActions.delete(clipName);
|
|
417
|
+
this.clipActions.delete(clipName);
|
|
418
|
+
this.clipHandles.delete(clipName);
|
|
419
|
+
this.animationFinishedCallbacks.delete(clipName);
|
|
420
|
+
this.playbackState.delete(clipName);
|
|
421
|
+
this.clipSources.delete(clipName);
|
|
422
|
+
return true;
|
|
423
|
+
}
|
|
387
424
|
playAnimation(clipName, options = {}) {
|
|
388
425
|
const action = this.getOrCreateBakedAction(clipName);
|
|
389
426
|
if (!action) {
|
|
@@ -2104,13 +2141,13 @@ var CC4_PRESET = {
|
|
|
2104
2141
|
{
|
|
2105
2142
|
name: "left_eye",
|
|
2106
2143
|
bones: ["CC_Base_L_Eye"],
|
|
2107
|
-
paddingFactor:
|
|
2144
|
+
paddingFactor: 0.9,
|
|
2108
2145
|
parent: "head"
|
|
2109
2146
|
},
|
|
2110
2147
|
{
|
|
2111
2148
|
name: "right_eye",
|
|
2112
2149
|
bones: ["CC_Base_R_Eye"],
|
|
2113
|
-
paddingFactor:
|
|
2150
|
+
paddingFactor: 0.9,
|
|
2114
2151
|
parent: "head"
|
|
2115
2152
|
},
|
|
2116
2153
|
{
|
|
@@ -5053,6 +5090,9 @@ var _Loom3 = class _Loom3 {
|
|
|
5053
5090
|
getAnimationClips() {
|
|
5054
5091
|
return this.bakedAnimations.getAnimationClips();
|
|
5055
5092
|
}
|
|
5093
|
+
removeAnimationClip(clipName) {
|
|
5094
|
+
return this.bakedAnimations.removeAnimationClip(clipName);
|
|
5095
|
+
}
|
|
5056
5096
|
playAnimation(clipName, options = {}) {
|
|
5057
5097
|
return this.bakedAnimations.playAnimation(clipName, options);
|
|
5058
5098
|
}
|