@lovelace_lol/loom3 1.0.43 → 1.0.45
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 +16 -15
- package/dist/index.cjs +130 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +246 -212
- package/dist/index.d.ts +246 -212
- package/dist/index.js +125 -69
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -647,6 +647,129 @@ interface Snippet {
|
|
|
647
647
|
loop?: boolean;
|
|
648
648
|
}
|
|
649
649
|
|
|
650
|
+
/** Line stroke style */
|
|
651
|
+
type LineStyle = 'solid' | 'dashed' | 'dotted';
|
|
652
|
+
/** Line curve type */
|
|
653
|
+
type LineCurve = 'straight' | 'bezier' | 'arc';
|
|
654
|
+
/** Named direction presets for line orientation */
|
|
655
|
+
type NamedDirection = 'radial' | 'camera' | 'up' | 'down' | 'left' | 'right' | 'forward' | 'backward';
|
|
656
|
+
/** Line configuration for markers */
|
|
657
|
+
interface LineConfig {
|
|
658
|
+
/** Stroke style. Default: 'solid' */
|
|
659
|
+
style?: LineStyle;
|
|
660
|
+
/** Curve type. Default: 'straight' */
|
|
661
|
+
curve?: LineCurve;
|
|
662
|
+
/** Show arrow head at end. Default: false */
|
|
663
|
+
arrowHead?: boolean;
|
|
664
|
+
/** Line thickness (affects dash size). Default: 2 */
|
|
665
|
+
thickness?: number;
|
|
666
|
+
/** Line length override (model units) */
|
|
667
|
+
length?: number;
|
|
668
|
+
}
|
|
669
|
+
/** Style overrides that can be applied per-region */
|
|
670
|
+
interface MarkerStyleOverrides {
|
|
671
|
+
/** Override marker sphere color (hex) */
|
|
672
|
+
markerColor?: number;
|
|
673
|
+
/** Override marker sphere radius (model units) */
|
|
674
|
+
markerRadius?: number;
|
|
675
|
+
/** Override line color (hex) */
|
|
676
|
+
lineColor?: number;
|
|
677
|
+
/** Override label text color (CSS) */
|
|
678
|
+
labelColor?: string;
|
|
679
|
+
/** Override label background (CSS) */
|
|
680
|
+
labelBackground?: string;
|
|
681
|
+
/** Override label font size (pixels) */
|
|
682
|
+
labelFontSize?: number;
|
|
683
|
+
/** Override overall marker opacity (0-1) */
|
|
684
|
+
opacity?: number;
|
|
685
|
+
/** Custom line direction: named preset or explicit vector */
|
|
686
|
+
lineDirection?: NamedDirection | {
|
|
687
|
+
x: number;
|
|
688
|
+
y: number;
|
|
689
|
+
z: number;
|
|
690
|
+
};
|
|
691
|
+
/** Line styling options */
|
|
692
|
+
line?: LineConfig;
|
|
693
|
+
}
|
|
694
|
+
/** Animation style for expanding/collapsing child markers */
|
|
695
|
+
type ExpandAnimation = 'outward' | 'staggered';
|
|
696
|
+
/** Expanded region state */
|
|
697
|
+
interface ExpandedRegionState {
|
|
698
|
+
regionName: string;
|
|
699
|
+
isExpanded: boolean;
|
|
700
|
+
children: string[];
|
|
701
|
+
}
|
|
702
|
+
/** Fallback behavior configuration */
|
|
703
|
+
interface FallbackConfig {
|
|
704
|
+
/** Name of the fallback marker to show when all group markers are occluded */
|
|
705
|
+
fallbackMarker?: string;
|
|
706
|
+
/** Behavior when clicking fallback: 'fit-all' tries to fit all in frame, 'rotate' rotates camera */
|
|
707
|
+
clickBehavior?: 'fit-all' | 'rotate';
|
|
708
|
+
}
|
|
709
|
+
/** Marker group for fallback behavior */
|
|
710
|
+
interface MarkerGroup {
|
|
711
|
+
/** Unique group identifier */
|
|
712
|
+
groupId: string;
|
|
713
|
+
/** Region names in this group */
|
|
714
|
+
regions: string[];
|
|
715
|
+
/** Fallback configuration */
|
|
716
|
+
fallback?: FallbackConfig;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* Single annotation region definition - maps a name to geometry targets.
|
|
720
|
+
*/
|
|
721
|
+
interface AnnotationRegion {
|
|
722
|
+
/** Display name for the annotation */
|
|
723
|
+
name: string;
|
|
724
|
+
/** Bone names to focus on */
|
|
725
|
+
bones?: string[];
|
|
726
|
+
/** Mesh object names to focus on */
|
|
727
|
+
meshes?: string[];
|
|
728
|
+
/** Any object names (bones or meshes). Use ['*'] for all objects */
|
|
729
|
+
objects?: string[];
|
|
730
|
+
/**
|
|
731
|
+
* Camera framing multiplier for this annotation.
|
|
732
|
+
* Smaller values zoom in tighter; larger values leave more space around the target.
|
|
733
|
+
*/
|
|
734
|
+
paddingFactor?: number;
|
|
735
|
+
/**
|
|
736
|
+
* Camera angle in degrees around the Y axis (horizontal orbit).
|
|
737
|
+
* 0 = front (default), 90 = right side, 180 = back, 270 = left side
|
|
738
|
+
*/
|
|
739
|
+
cameraAngle?: number;
|
|
740
|
+
/** Fine-tune camera position offset */
|
|
741
|
+
cameraOffset?: {
|
|
742
|
+
x?: number;
|
|
743
|
+
y?: number;
|
|
744
|
+
z?: number;
|
|
745
|
+
};
|
|
746
|
+
/** Parent region name - children animate outward from parent when expanded */
|
|
747
|
+
parent?: string;
|
|
748
|
+
/** Child region names - shown when this region is expanded */
|
|
749
|
+
children?: string[];
|
|
750
|
+
/** Animation style for expand/collapse. Default: 'outward' */
|
|
751
|
+
expandAnimation?: ExpandAnimation;
|
|
752
|
+
/** Per-marker style overrides */
|
|
753
|
+
style?: MarkerStyleOverrides;
|
|
754
|
+
/** Marker group ID for fallback behavior */
|
|
755
|
+
groupId?: string;
|
|
756
|
+
/** If true, this marker acts as a fallback for its group */
|
|
757
|
+
isFallback?: boolean;
|
|
758
|
+
/** Custom position override (user-adjusted). If set, overrides calculated position. */
|
|
759
|
+
customPosition?: {
|
|
760
|
+
x: number;
|
|
761
|
+
y: number;
|
|
762
|
+
z: number;
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
type Region = AnnotationRegion;
|
|
766
|
+
/**
|
|
767
|
+
* Marker style for annotation visualization
|
|
768
|
+
* - 'html': Simple HTML overlay markers with numbered dots directly over targets
|
|
769
|
+
* - '3d': 3D markers with lines and labels rendered in scene space
|
|
770
|
+
*/
|
|
771
|
+
type MarkerStyle = 'html' | '3d';
|
|
772
|
+
|
|
650
773
|
/**
|
|
651
774
|
* Loom3 - Profile Types
|
|
652
775
|
*
|
|
@@ -830,52 +953,6 @@ interface HairPhysicsProfileConfig {
|
|
|
830
953
|
headDown?: Record<string, HairMorphTargetValueMapping>;
|
|
831
954
|
};
|
|
832
955
|
}
|
|
833
|
-
/**
|
|
834
|
-
* Annotation region definition for camera markers.
|
|
835
|
-
*/
|
|
836
|
-
interface AnnotationRegion {
|
|
837
|
-
name: string;
|
|
838
|
-
bones?: string[];
|
|
839
|
-
meshes?: string[];
|
|
840
|
-
objects?: string[];
|
|
841
|
-
/**
|
|
842
|
-
* Camera framing multiplier for this annotation.
|
|
843
|
-
* Smaller values zoom in tighter; larger values leave more space around the target.
|
|
844
|
-
*/
|
|
845
|
-
paddingFactor?: number;
|
|
846
|
-
cameraAngle?: number;
|
|
847
|
-
cameraOffset?: {
|
|
848
|
-
x?: number;
|
|
849
|
-
y?: number;
|
|
850
|
-
z?: number;
|
|
851
|
-
};
|
|
852
|
-
parent?: string;
|
|
853
|
-
children?: string[];
|
|
854
|
-
expandAnimation?: 'outward' | 'staggered';
|
|
855
|
-
style?: {
|
|
856
|
-
markerColor?: number;
|
|
857
|
-
markerRadius?: number;
|
|
858
|
-
lineColor?: number;
|
|
859
|
-
labelColor?: string;
|
|
860
|
-
labelBackground?: string;
|
|
861
|
-
labelFontSize?: number;
|
|
862
|
-
opacity?: number;
|
|
863
|
-
lineDirection?: 'radial' | 'camera' | 'up' | 'down' | 'left' | 'right' | 'forward' | 'backward' | {
|
|
864
|
-
x: number;
|
|
865
|
-
y: number;
|
|
866
|
-
z: number;
|
|
867
|
-
};
|
|
868
|
-
line?: {
|
|
869
|
-
style?: 'solid' | 'dashed' | 'dotted';
|
|
870
|
-
curve?: 'straight' | 'bezier' | 'arc';
|
|
871
|
-
arrowHead?: boolean;
|
|
872
|
-
thickness?: number;
|
|
873
|
-
length?: number;
|
|
874
|
-
};
|
|
875
|
-
};
|
|
876
|
-
groupId?: string;
|
|
877
|
-
isFallback?: boolean;
|
|
878
|
-
}
|
|
879
956
|
/**
|
|
880
957
|
* Morph target key (name in morphTargetDictionary).
|
|
881
958
|
*/
|
|
@@ -1755,6 +1832,8 @@ declare class Loom3 implements LoomLarge {
|
|
|
1755
1832
|
private computeSideValues;
|
|
1756
1833
|
private getAUMorphsBySide;
|
|
1757
1834
|
private applyMorphTargets;
|
|
1835
|
+
private applyVisemeRuntimeState;
|
|
1836
|
+
private getActiveVisemeJawAmount;
|
|
1758
1837
|
private getMorphValue;
|
|
1759
1838
|
private getMorphValueByIndex;
|
|
1760
1839
|
private applyMorphTargetDelta;
|
|
@@ -1963,9 +2042,14 @@ interface HairPhysics$1 {
|
|
|
1963
2042
|
reset(): void;
|
|
1964
2043
|
}
|
|
1965
2044
|
|
|
2045
|
+
interface ResolvedVisemeBindingTarget {
|
|
2046
|
+
morph: MorphTargetRef;
|
|
2047
|
+
weight: number;
|
|
2048
|
+
}
|
|
1966
2049
|
declare function getProfileVisemeSlots(profile: Profile): VisemeSlot[];
|
|
1967
2050
|
declare function getVisemeSlotIndex(profile: Profile, slotId: string): number;
|
|
1968
2051
|
declare function compileVisemeKeys(profile: Profile): MorphTargetRef[];
|
|
2052
|
+
declare function getVisemeBindingTargets(profile: Profile, visemeIndex: number): ResolvedVisemeBindingTarget[];
|
|
1969
2053
|
declare function getVisemeJawAmounts(profile: Profile): number[] | undefined;
|
|
1970
2054
|
declare function resolveVisemeMeshCategory(profile: Profile): string;
|
|
1971
2055
|
declare function getMeshNamesForVisemeProfile(profile: Profile): string[];
|
|
@@ -1984,198 +2068,136 @@ interface ProviderVisemeMatch {
|
|
|
1984
2068
|
}
|
|
1985
2069
|
declare function mapProviderVisemeToSlot(profile: Profile, event: ProviderVisemeEvent): ProviderVisemeMatch | null;
|
|
1986
2070
|
|
|
1987
|
-
|
|
1988
|
-
type
|
|
1989
|
-
/** Line curve type */
|
|
1990
|
-
type LineCurve = 'straight' | 'bezier' | 'arc';
|
|
1991
|
-
/** Named direction presets for line orientation */
|
|
1992
|
-
type NamedDirection = 'radial' | 'camera' | 'up' | 'down' | 'left' | 'right' | 'forward' | 'backward';
|
|
1993
|
-
/** Line configuration for markers */
|
|
1994
|
-
interface LineConfig {
|
|
1995
|
-
/** Stroke style. Default: 'solid' */
|
|
1996
|
-
style?: LineStyle;
|
|
1997
|
-
/** Curve type. Default: 'straight' */
|
|
1998
|
-
curve?: LineCurve;
|
|
1999
|
-
/** Show arrow head at end. Default: false */
|
|
2000
|
-
arrowHead?: boolean;
|
|
2001
|
-
/** Line thickness (affects dash size). Default: 2 */
|
|
2002
|
-
thickness?: number;
|
|
2003
|
-
/** Line length override (model units) */
|
|
2004
|
-
length?: number;
|
|
2005
|
-
}
|
|
2006
|
-
/** Style overrides that can be applied per-region */
|
|
2007
|
-
interface MarkerStyleOverrides {
|
|
2008
|
-
/** Override marker sphere color (hex) */
|
|
2009
|
-
markerColor?: number;
|
|
2010
|
-
/** Override marker sphere radius (model units) */
|
|
2011
|
-
markerRadius?: number;
|
|
2012
|
-
/** Override line color (hex) */
|
|
2013
|
-
lineColor?: number;
|
|
2014
|
-
/** Override label text color (CSS) */
|
|
2015
|
-
labelColor?: string;
|
|
2016
|
-
/** Override label background (CSS) */
|
|
2017
|
-
labelBackground?: string;
|
|
2018
|
-
/** Override label font size (pixels) */
|
|
2019
|
-
labelFontSize?: number;
|
|
2020
|
-
/** Override overall marker opacity (0-1) */
|
|
2021
|
-
opacity?: number;
|
|
2022
|
-
/** Custom line direction: named preset or explicit vector */
|
|
2023
|
-
lineDirection?: NamedDirection | {
|
|
2024
|
-
x: number;
|
|
2025
|
-
y: number;
|
|
2026
|
-
z: number;
|
|
2027
|
-
};
|
|
2028
|
-
/** Line styling options */
|
|
2029
|
-
line?: LineConfig;
|
|
2030
|
-
}
|
|
2031
|
-
/** Animation style for expanding/collapsing child markers */
|
|
2032
|
-
type ExpandAnimation = 'outward' | 'staggered';
|
|
2033
|
-
/** Expanded region state */
|
|
2034
|
-
interface ExpandedRegionState {
|
|
2035
|
-
regionName: string;
|
|
2036
|
-
isExpanded: boolean;
|
|
2037
|
-
children: string[];
|
|
2038
|
-
}
|
|
2039
|
-
/** Fallback behavior configuration */
|
|
2040
|
-
interface FallbackConfig {
|
|
2041
|
-
/** Name of the fallback marker to show when all group markers are occluded */
|
|
2042
|
-
fallbackMarker?: string;
|
|
2043
|
-
/** Behavior when clicking fallback: 'fit-all' tries to fit all in frame, 'rotate' rotates camera */
|
|
2044
|
-
clickBehavior?: 'fit-all' | 'rotate';
|
|
2045
|
-
}
|
|
2046
|
-
/** Marker group for fallback behavior */
|
|
2047
|
-
interface MarkerGroup {
|
|
2048
|
-
/** Unique group identifier */
|
|
2049
|
-
groupId: string;
|
|
2050
|
-
/** Region names in this group */
|
|
2051
|
-
regions: string[];
|
|
2052
|
-
/** Fallback configuration */
|
|
2053
|
-
fallback?: FallbackConfig;
|
|
2054
|
-
}
|
|
2071
|
+
type ProfileOverrides = Partial<Profile>;
|
|
2072
|
+
type ProfilePresetId = PresetType | string;
|
|
2055
2073
|
/**
|
|
2056
|
-
*
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
/**
|
|
2064
|
-
|
|
2065
|
-
/**
|
|
2066
|
-
|
|
2067
|
-
/**
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
paddingFactor?: number;
|
|
2074
|
+
* Profile-derived runtime config accepted by Loom3 compatibility helpers.
|
|
2075
|
+
*
|
|
2076
|
+
* Loom3's canonical model is `Profile`; these fields describe how apps select
|
|
2077
|
+
* and extend a base profile preset before handing the resolved profile to
|
|
2078
|
+
* runtime tools.
|
|
2079
|
+
*/
|
|
2080
|
+
interface ProfileRuntimeConfig extends Partial<Profile> {
|
|
2081
|
+
/** Preferred preset/profile id field for new callers. */
|
|
2082
|
+
profilePresetId?: ProfilePresetId;
|
|
2083
|
+
/** Compatibility alias for callers already using preset-oriented naming. */
|
|
2084
|
+
presetId?: ProfilePresetId;
|
|
2085
|
+
/** Compatibility alias for callers that frame presets as base profiles. */
|
|
2086
|
+
baseProfileId?: ProfilePresetId;
|
|
2087
|
+
/** @deprecated Use `profilePresetId` instead. */
|
|
2088
|
+
auPresetType?: ProfilePresetId;
|
|
2072
2089
|
/**
|
|
2073
|
-
*
|
|
2074
|
-
*
|
|
2090
|
+
* Optional legacy nested override blob.
|
|
2091
|
+
* New stored documents should flatten preset overrides onto the top-level
|
|
2092
|
+
* profile object instead of nesting them here.
|
|
2075
2093
|
*/
|
|
2076
|
-
|
|
2077
|
-
/**
|
|
2078
|
-
cameraOffset?: {
|
|
2079
|
-
x?: number;
|
|
2080
|
-
y?: number;
|
|
2081
|
-
z?: number;
|
|
2082
|
-
};
|
|
2083
|
-
/** Parent region name - children animate outward from parent when expanded */
|
|
2084
|
-
parent?: string;
|
|
2085
|
-
/** Child region names - shown when this region is expanded */
|
|
2086
|
-
children?: string[];
|
|
2087
|
-
/** Animation style for expand/collapse. Default: 'outward' */
|
|
2088
|
-
expandAnimation?: ExpandAnimation;
|
|
2089
|
-
/** Per-marker style overrides */
|
|
2090
|
-
style?: MarkerStyleOverrides;
|
|
2091
|
-
/** Marker group ID for fallback behavior */
|
|
2092
|
-
groupId?: string;
|
|
2093
|
-
/** If true, this marker acts as a fallback for its group */
|
|
2094
|
-
isFallback?: boolean;
|
|
2095
|
-
/** Custom position override (user-adjusted). If set, overrides calculated position. */
|
|
2096
|
-
customPosition?: {
|
|
2097
|
-
x: number;
|
|
2098
|
-
y: number;
|
|
2099
|
-
z: number;
|
|
2100
|
-
};
|
|
2101
|
-
}
|
|
2102
|
-
/**
|
|
2103
|
-
* Marker style for annotation visualization
|
|
2104
|
-
* - 'html': Simple HTML overlay markers with numbered dots directly over targets
|
|
2105
|
-
* - '3d': 3D markers with lines and labels rendered in scene space
|
|
2106
|
-
*/
|
|
2107
|
-
type MarkerStyle = 'html' | '3d';
|
|
2108
|
-
/**
|
|
2109
|
-
* Per-character configuration for camera + animation
|
|
2110
|
-
*/
|
|
2111
|
-
interface CharacterConfig extends Partial<Profile> {
|
|
2112
|
-
/** Unique identifier for the character */
|
|
2113
|
-
characterId: string;
|
|
2114
|
-
/** Display name */
|
|
2115
|
-
characterName: string;
|
|
2116
|
-
/** Path to GLB file (relative to public folder) */
|
|
2117
|
-
modelPath: string;
|
|
2118
|
-
/** Which region to focus on load */
|
|
2094
|
+
profile?: ProfileOverrides;
|
|
2095
|
+
/** Which annotation region to focus on load. */
|
|
2119
2096
|
defaultRegion?: string;
|
|
2120
|
-
/**
|
|
2121
|
-
regions
|
|
2122
|
-
/** Marker visualization style. Default: '3d' */
|
|
2097
|
+
/** Runtime mirror of `annotationRegions` retained for older camera/marker UIs. */
|
|
2098
|
+
regions?: Region[];
|
|
2099
|
+
/** Marker visualization style. Default: '3d'. */
|
|
2123
2100
|
markerStyle?: MarkerStyle;
|
|
2124
|
-
/** Play intro animation on load
|
|
2101
|
+
/** Play intro animation on load. Default: false. */
|
|
2125
2102
|
playIntroOnLoad?: boolean;
|
|
2126
|
-
/** Model position offset to apply on load
|
|
2103
|
+
/** Model position offset to apply on load. */
|
|
2127
2104
|
modelOffset?: {
|
|
2128
2105
|
x?: number;
|
|
2129
2106
|
y?: number;
|
|
2130
2107
|
z?: number;
|
|
2131
2108
|
};
|
|
2132
|
-
/** Model rotation in degrees to apply on load
|
|
2109
|
+
/** Model rotation in degrees to apply on load. */
|
|
2133
2110
|
modelRotation?: {
|
|
2134
2111
|
x?: number;
|
|
2135
2112
|
y?: number;
|
|
2136
2113
|
z?: number;
|
|
2137
2114
|
};
|
|
2138
|
-
/** Ensure model's lowest point clears the ground by this amount
|
|
2115
|
+
/** Ensure model's lowest point clears the ground by this amount. */
|
|
2139
2116
|
modelGroundClearance?: number;
|
|
2140
|
-
/**
|
|
2141
|
-
auPresetType?: PresetType;
|
|
2142
|
-
/**
|
|
2143
|
-
* Optional legacy nested override blob.
|
|
2144
|
-
* New stored character documents should flatten preset overrides onto the
|
|
2145
|
-
* top-level character profile object instead of nesting them here.
|
|
2146
|
-
*/
|
|
2147
|
-
profile?: Partial<Profile>;
|
|
2148
|
-
/** Baked clip names hidden from downstream UIs and filtered out on load */
|
|
2117
|
+
/** Baked clip names hidden from downstream UIs and filtered out on load. */
|
|
2149
2118
|
deletedBakedAnimationClips?: string[];
|
|
2150
|
-
/**
|
|
2151
|
-
bonePrefix?: string;
|
|
2152
|
-
/** Suffix to append to bone names (e.g., '_Armature' for fish) */
|
|
2153
|
-
boneSuffix?: string;
|
|
2154
|
-
/** Semantic bone name mapping (e.g., 'HEAD' → '001') */
|
|
2155
|
-
boneNodes?: Record<string, string>;
|
|
2156
|
-
/** Regex pattern for fuzzy bone/mesh name matching (e.g., '_\\d+$|\\.\\d+$') */
|
|
2157
|
-
suffixPattern?: string;
|
|
2158
|
-
/** Marker groups for fallback behavior */
|
|
2119
|
+
/** Marker groups for fallback behavior. */
|
|
2159
2120
|
markerGroups?: MarkerGroup[];
|
|
2160
|
-
/** Global line styling defaults */
|
|
2121
|
+
/** Global line styling defaults. */
|
|
2161
2122
|
lineDefaults?: LineConfig;
|
|
2162
|
-
/** Global marker style defaults
|
|
2123
|
+
/** Global marker style defaults, overridden by per-region style. */
|
|
2163
2124
|
markerDefaults?: Partial<MarkerStyleOverrides>;
|
|
2164
2125
|
}
|
|
2165
2126
|
/**
|
|
2166
|
-
*
|
|
2127
|
+
* Optional downstream app metadata carried next to a profile.
|
|
2128
|
+
*
|
|
2129
|
+
* Loom3 does not treat these as a separate character configuration model; they
|
|
2130
|
+
* are preserved only for apps that store model records beside profile fields.
|
|
2131
|
+
*/
|
|
2132
|
+
interface CharacterProfile extends ProfileRuntimeConfig {
|
|
2133
|
+
characterId?: string;
|
|
2134
|
+
characterName?: string;
|
|
2135
|
+
modelPath?: string;
|
|
2136
|
+
}
|
|
2137
|
+
type ResolvedProfileRuntimeConfig<T extends CharacterProfile = CharacterProfile> = T & Profile & {
|
|
2138
|
+
annotationRegions?: Region[];
|
|
2139
|
+
regions?: Region[];
|
|
2140
|
+
};
|
|
2141
|
+
type PresetBackedProfileRuntimeConfig = CharacterProfile & ({
|
|
2142
|
+
profilePresetId: ProfilePresetId;
|
|
2143
|
+
} | {
|
|
2144
|
+
presetId: ProfilePresetId;
|
|
2145
|
+
} | {
|
|
2146
|
+
baseProfileId: ProfilePresetId;
|
|
2147
|
+
} | {
|
|
2148
|
+
auPresetType: ProfilePresetId;
|
|
2149
|
+
});
|
|
2150
|
+
type CustomProfileRuntimeConfig = CharacterProfile & ({
|
|
2151
|
+
profilePresetId: 'custom';
|
|
2152
|
+
} | {
|
|
2153
|
+
presetId: 'custom';
|
|
2154
|
+
} | {
|
|
2155
|
+
baseProfileId: 'custom';
|
|
2156
|
+
} | {
|
|
2157
|
+
auPresetType: 'custom';
|
|
2158
|
+
});
|
|
2159
|
+
interface ProfileRegistry {
|
|
2160
|
+
profiles: CharacterProfile[];
|
|
2161
|
+
defaultProfile?: string;
|
|
2162
|
+
}
|
|
2163
|
+
/**
|
|
2164
|
+
* @deprecated Use `CharacterProfile` plus `profilePresetId` and
|
|
2165
|
+
* `annotationRegions`/`regions` instead. This alias is kept for downstream
|
|
2166
|
+
* apps that still persist LoomLarge-style character records.
|
|
2167
|
+
*/
|
|
2168
|
+
type CharacterConfig = CharacterProfile & {
|
|
2169
|
+
characterId: string;
|
|
2170
|
+
characterName: string;
|
|
2171
|
+
modelPath: string;
|
|
2172
|
+
regions: Region[];
|
|
2173
|
+
};
|
|
2174
|
+
/**
|
|
2175
|
+
* @deprecated Use `ProfileRegistry`.
|
|
2167
2176
|
*/
|
|
2168
2177
|
interface CharacterRegistry {
|
|
2169
2178
|
characters: CharacterConfig[];
|
|
2170
2179
|
defaultCharacter?: string;
|
|
2171
2180
|
}
|
|
2172
2181
|
|
|
2173
|
-
declare function
|
|
2174
|
-
|
|
2175
|
-
|
|
2182
|
+
declare function mergeProfileRegionsByName(base?: Region[], override?: Region[]): Region[] | undefined;
|
|
2183
|
+
/**
|
|
2184
|
+
* @deprecated Use `mergeProfileRegionsByName`.
|
|
2185
|
+
*/
|
|
2186
|
+
declare const mergeRegionsByName: typeof mergeProfileRegionsByName;
|
|
2187
|
+
declare function getProfilePresetId(config: ProfileRuntimeConfig): ProfilePresetId | undefined;
|
|
2188
|
+
declare function extractLegacyCharacterProfileOverrides(config: CharacterProfile): Partial<Profile>;
|
|
2189
|
+
/**
|
|
2190
|
+
* @deprecated Use `extractLegacyCharacterProfileOverrides`.
|
|
2191
|
+
*/
|
|
2192
|
+
declare function extractProfileOverrides(config: CharacterProfile): Partial<Profile>;
|
|
2193
|
+
declare function resolveProfileFromPreset(config: CharacterProfile): Profile | null;
|
|
2176
2194
|
/**
|
|
2177
|
-
*
|
|
2178
|
-
|
|
2195
|
+
* @deprecated Use `resolveProfileFromPreset`.
|
|
2196
|
+
*/
|
|
2197
|
+
declare function applyCharacterProfileToPreset(config: CharacterProfile): Profile | null;
|
|
2198
|
+
/**
|
|
2199
|
+
* Extend a profile config with its selected base profile preset so callers get
|
|
2200
|
+
* one canonical runtime object.
|
|
2179
2201
|
*
|
|
2180
2202
|
* Precedence:
|
|
2181
2203
|
* 1. preset defaults
|
|
@@ -2183,6 +2205,12 @@ declare function applyCharacterProfileToPreset(config: CharacterConfig): Profile
|
|
|
2183
2205
|
* 3. legacy nested `config.profile` overrides (compatibility only)
|
|
2184
2206
|
* 4. legacy `config.regions` fallback only when canonical annotation overrides are absent
|
|
2185
2207
|
*/
|
|
2208
|
+
declare function extendProfileConfigWithPreset<T extends CustomProfileRuntimeConfig>(config: T): T;
|
|
2209
|
+
declare function extendProfileConfigWithPreset<T extends PresetBackedProfileRuntimeConfig>(config: T): ResolvedProfileRuntimeConfig<T>;
|
|
2210
|
+
declare function extendProfileConfigWithPreset<T extends CharacterProfile>(config: T): T | ResolvedProfileRuntimeConfig<T>;
|
|
2211
|
+
/**
|
|
2212
|
+
* @deprecated Use `extendProfileConfigWithPreset`.
|
|
2213
|
+
*/
|
|
2186
2214
|
declare function extendCharacterConfigWithPreset(config: CharacterConfig): CharacterConfig;
|
|
2187
2215
|
|
|
2188
2216
|
type CameraRelativeGazeOffset = {
|
|
@@ -2200,15 +2228,21 @@ interface CameraRelativeGazeOptions {
|
|
|
2200
2228
|
*/
|
|
2201
2229
|
declare function computeCameraRelativeGazeOffset(model: THREE.Object3D | null, cameraPosition: THREE.Vector3, targetPosition: THREE.Vector3, options?: CameraRelativeGazeOptions): CameraRelativeGazeOffset;
|
|
2202
2230
|
|
|
2231
|
+
interface BoneResolutionProfile {
|
|
2232
|
+
bonePrefix?: string;
|
|
2233
|
+
boneSuffix?: string;
|
|
2234
|
+
boneNodes?: Record<string, string>;
|
|
2235
|
+
suffixPattern?: string;
|
|
2236
|
+
}
|
|
2203
2237
|
interface ResolvedFaceCenter {
|
|
2204
2238
|
center: THREE.Vector3;
|
|
2205
2239
|
method: string;
|
|
2206
2240
|
debugInfo: string[];
|
|
2207
2241
|
}
|
|
2208
|
-
declare function resolveBoneName(semanticName: string,
|
|
2209
|
-
declare function resolveBoneNames(names: string[] | undefined,
|
|
2242
|
+
declare function resolveBoneName(semanticName: string, profile?: BoneResolutionProfile): string;
|
|
2243
|
+
declare function resolveBoneNames(names: string[] | undefined, profile?: BoneResolutionProfile): string[];
|
|
2210
2244
|
declare function fuzzyNameMatch(objectName: string, targetName: string, suffixPattern?: string): boolean;
|
|
2211
|
-
declare function resolveFaceCenter(model: THREE.Object3D, region: Region,
|
|
2245
|
+
declare function resolveFaceCenter(model: THREE.Object3D, region: Region, profile?: BoneResolutionProfile): ResolvedFaceCenter;
|
|
2212
2246
|
|
|
2213
2247
|
/**
|
|
2214
2248
|
* HairPhysics - Spring-damper pendulum simulation for hair movement
|
|
@@ -2638,4 +2672,4 @@ declare function detectFacingDirection(model: THREE.Object3D, eyeBoneNames?: {
|
|
|
2638
2672
|
right: string[];
|
|
2639
2673
|
}): 'forward' | 'backward' | 'unknown';
|
|
2640
2674
|
|
|
2641
|
-
export { type AUInfo, type AUSelector, AU_INFO, AU_MAPPING_CONFIG, AU_MIX_DEFAULTS, AU_TO_MORPHS, type AddMorphTargetOptions, type AnalyzeModelOptions, type Animation, type AnimationActionHandle, type AnimationAnalysis, type AnimationBlendMode, type AnimationClipInfo, type AnimationEasing, type AnimationInfo, type AnimationPlayOptions, type AnimationSource, type AnimationState, AnimationThree, BETTA_FISH_PRESET, BLENDING_MODES, BONE_AU_TO_BINDINGS, type BlendingMode, type BoneBinding, type BoneInfo, type BoneKey, CC4_BONE_NODES, CC4_BONE_PREFIX, CC4_EYE_MESH_NODES, CC4_MAPPING_SECTIONS, CC4_MESHES, CC4_PRESET, CC4_SUFFIX_PATTERN, CC4_VISEME_SLOTS, CC4_VISEME_SYSTEM_ID, COMPOSITE_ROTATIONS, CONTINUUM_LABELS, CONTINUUM_PAIRS_MAP, type CameraRelativeGazeOffset, type CameraRelativeGazeOptions, type CharacterConfig, type CharacterRegistry, type ClipEvent, type ClipEventListener, type ClipHandle, type ClipOptions, type CompositeRotation, type CompositeRotationState, type CurvePoint, type CurvesMap, DEFAULT_HAIR_PHYSICS_CONFIG, type ExpandAnimation, type ExpandedRegionState, FISH_AU_MAPPING_CONFIG, type FaceCenterResult, type FallbackConfig, type FindFaceCenterOptions, type Hair, type HairMorphAxis, type HairMorphOutput$1 as HairMorphOutput, type HairMorphTargetMapping, type HairMorphTargetValueMapping, type HairMorphTargetsConfig, type HairObjectRef, type HairObjectState, HairPhysics, type HairPhysicsConfig$1 as HairPhysicsConfig, type HairPhysicsDirectionConfig, type HairPhysics$1 as HairPhysicsInterface, type HairMorphOutput as HairPhysicsMorphOutput, type HairPhysicsProfileConfig, type HairPhysicsRuntimeConfig, type HairPhysicsRuntimeConfigUpdate, type HairPhysicsState, type HairState, type HairStrand, type HeadState$1 as HeadState, type LineConfig, type LineCurve, type LineStyle, Loom3, type Loom3Config, Loom3 as Loom3Three, type LoomLarge, type LoomLargeConfig, Loom3 as LoomLargeThree, MORPH_TO_MESH, type MappingConsistencyResult, type MappingCorrection, type MappingCorrectionOptions, type MappingCorrectionResult, type MappingEditorModel, type MappingEditorSection, type MappingIssue, type MarkerGroup, type MarkerStyle, type MarkerStyleOverrides, type MeshCategory, type MeshInfo, type MeshMaterialSettings, type MixerLoopMode, type ModelAnalysisReport, type ModelData, type ModelMeshInfo, type MorphCandidate, type MorphCandidateMatch, type MorphCandidateReason, type MorphCategory, type MorphInfo, type MorphTargetAttributeData, type MorphTargetDelta, type MorphTargetRef, type MorphTargetsBySide, type NamedDirection, type PresetType, type Profile, type ProviderVisemeEvent, type ProviderVisemeMatch, type ReadyPayload, type Region, type RotationAxis, type RotationsState, type Snippet, type TrackInfo, type TransitionHandle, VISEME_JAW_AMOUNTS, VISEME_KEYS, type ValidateMappingOptions, type ValidationResult, type VisemeBinding, type VisemeBindingTarget, type VisemeSlot, type VisemeSlotFeatures, analyzeModel, applyCharacterProfileToPreset, buildMappingEditorModel, collectMorphMeshes, compileVisemeKeys, computeCameraRelativeGazeOffset, detectFacingDirection, extendCharacterConfigWithPreset, extendPresetWithProfile, extractFromGLTF, extractModelData, extractProfileOverrides, findFaceCenter, fuzzyNameMatch, generateMappingCorrections, getMeshNamesForAUProfile, getMeshNamesForVisemeProfile, getModelForwardDirection, getPreset, getPresetWithProfile, getProfileVisemeSlots, getVisemeJawAmounts, getVisemeSlotIndex, hasLeftRightMorphs, isMixedAU, isPresetCompatible, mapProviderVisemeToSlot, mergeRegionsByName as mergeCharacterRegionsByName, resolveBoneName, resolveBoneNames, resolveFaceCenter, resolvePreset, resolvePresetWithOverrides, resolveVisemeMeshCategory, suggestBestPreset, validateMappingConfig, validateMappings };
|
|
2675
|
+
export { type AUInfo, type AUSelector, AU_INFO, AU_MAPPING_CONFIG, AU_MIX_DEFAULTS, AU_TO_MORPHS, type AddMorphTargetOptions, type AnalyzeModelOptions, type Animation, type AnimationActionHandle, type AnimationAnalysis, type AnimationBlendMode, type AnimationClipInfo, type AnimationEasing, type AnimationInfo, type AnimationPlayOptions, type AnimationSource, type AnimationState, AnimationThree, type AnnotationRegion, BETTA_FISH_PRESET, BLENDING_MODES, BONE_AU_TO_BINDINGS, type BlendingMode, type BoneBinding, type BoneInfo, type BoneKey, type BoneResolutionProfile, CC4_BONE_NODES, CC4_BONE_PREFIX, CC4_EYE_MESH_NODES, CC4_MAPPING_SECTIONS, CC4_MESHES, CC4_PRESET, CC4_SUFFIX_PATTERN, CC4_VISEME_SLOTS, CC4_VISEME_SYSTEM_ID, COMPOSITE_ROTATIONS, CONTINUUM_LABELS, CONTINUUM_PAIRS_MAP, type CameraRelativeGazeOffset, type CameraRelativeGazeOptions, type CharacterConfig, type CharacterProfile, type CharacterRegistry, type ClipEvent, type ClipEventListener, type ClipHandle, type ClipOptions, type CompositeRotation, type CompositeRotationState, type CurvePoint, type CurvesMap, type CustomProfileRuntimeConfig, DEFAULT_HAIR_PHYSICS_CONFIG, type ExpandAnimation, type ExpandedRegionState, FISH_AU_MAPPING_CONFIG, type FaceCenterResult, type FallbackConfig, type FindFaceCenterOptions, type Hair, type HairMorphAxis, type HairMorphOutput$1 as HairMorphOutput, type HairMorphTargetMapping, type HairMorphTargetValueMapping, type HairMorphTargetsConfig, type HairObjectRef, type HairObjectState, HairPhysics, type HairPhysicsConfig$1 as HairPhysicsConfig, type HairPhysicsDirectionConfig, type HairPhysics$1 as HairPhysicsInterface, type HairMorphOutput as HairPhysicsMorphOutput, type HairPhysicsProfileConfig, type HairPhysicsRuntimeConfig, type HairPhysicsRuntimeConfigUpdate, type HairPhysicsState, type HairState, type HairStrand, type HeadState$1 as HeadState, type LineConfig, type LineCurve, type LineStyle, Loom3, type Loom3Config, Loom3 as Loom3Three, type LoomLarge, type LoomLargeConfig, Loom3 as LoomLargeThree, MORPH_TO_MESH, type MappingConsistencyResult, type MappingCorrection, type MappingCorrectionOptions, type MappingCorrectionResult, type MappingEditorModel, type MappingEditorSection, type MappingIssue, type MarkerGroup, type MarkerStyle, type MarkerStyleOverrides, type MeshCategory, type MeshInfo, type MeshMaterialSettings, type MixerLoopMode, type ModelAnalysisReport, type ModelData, type ModelMeshInfo, type MorphCandidate, type MorphCandidateMatch, type MorphCandidateReason, type MorphCategory, type MorphInfo, type MorphTargetAttributeData, type MorphTargetDelta, type MorphTargetRef, type MorphTargetsBySide, type NamedDirection, type PresetBackedProfileRuntimeConfig, type PresetType, type Profile, type ProfileOverrides, type ProfilePresetId, type ProfileRegistry, type ProfileRuntimeConfig, type ProviderVisemeEvent, type ProviderVisemeMatch, type ReadyPayload, type Region, type ResolvedFaceCenter, type ResolvedProfileRuntimeConfig, type ResolvedVisemeBindingTarget, type RotationAxis, type RotationsState, type Snippet, type TrackInfo, type TransitionHandle, VISEME_JAW_AMOUNTS, VISEME_KEYS, type ValidateMappingOptions, type ValidationResult, type VisemeBinding, type VisemeBindingTarget, type VisemeSlot, type VisemeSlotFeatures, analyzeModel, applyCharacterProfileToPreset, buildMappingEditorModel, collectMorphMeshes, compileVisemeKeys, computeCameraRelativeGazeOffset, detectFacingDirection, extendCharacterConfigWithPreset, extendPresetWithProfile, extendProfileConfigWithPreset, extractFromGLTF, extractLegacyCharacterProfileOverrides, extractModelData, extractProfileOverrides, findFaceCenter, fuzzyNameMatch, generateMappingCorrections, getMeshNamesForAUProfile, getMeshNamesForVisemeProfile, getModelForwardDirection, getPreset, getPresetWithProfile, getProfilePresetId, getProfileVisemeSlots, getVisemeBindingTargets, getVisemeJawAmounts, getVisemeSlotIndex, hasLeftRightMorphs, isMixedAU, isPresetCompatible, mapProviderVisemeToSlot, mergeRegionsByName as mergeCharacterRegionsByName, mergeProfileRegionsByName, resolveBoneName, resolveBoneNames, resolveFaceCenter, resolvePreset, resolvePresetWithOverrides, resolveProfileFromPreset, resolveVisemeMeshCategory, suggestBestPreset, validateMappingConfig, validateMappings };
|