@lovelace_lol/loom3 1.0.44 → 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 +39 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +239 -212
- package/dist/index.d.ts +239 -212
- package/dist/index.js +35 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
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
|
*/
|
|
@@ -1991,198 +2068,136 @@ interface ProviderVisemeMatch {
|
|
|
1991
2068
|
}
|
|
1992
2069
|
declare function mapProviderVisemeToSlot(profile: Profile, event: ProviderVisemeEvent): ProviderVisemeMatch | null;
|
|
1993
2070
|
|
|
1994
|
-
|
|
1995
|
-
type
|
|
1996
|
-
/** Line curve type */
|
|
1997
|
-
type LineCurve = 'straight' | 'bezier' | 'arc';
|
|
1998
|
-
/** Named direction presets for line orientation */
|
|
1999
|
-
type NamedDirection = 'radial' | 'camera' | 'up' | 'down' | 'left' | 'right' | 'forward' | 'backward';
|
|
2000
|
-
/** Line configuration for markers */
|
|
2001
|
-
interface LineConfig {
|
|
2002
|
-
/** Stroke style. Default: 'solid' */
|
|
2003
|
-
style?: LineStyle;
|
|
2004
|
-
/** Curve type. Default: 'straight' */
|
|
2005
|
-
curve?: LineCurve;
|
|
2006
|
-
/** Show arrow head at end. Default: false */
|
|
2007
|
-
arrowHead?: boolean;
|
|
2008
|
-
/** Line thickness (affects dash size). Default: 2 */
|
|
2009
|
-
thickness?: number;
|
|
2010
|
-
/** Line length override (model units) */
|
|
2011
|
-
length?: number;
|
|
2012
|
-
}
|
|
2013
|
-
/** Style overrides that can be applied per-region */
|
|
2014
|
-
interface MarkerStyleOverrides {
|
|
2015
|
-
/** Override marker sphere color (hex) */
|
|
2016
|
-
markerColor?: number;
|
|
2017
|
-
/** Override marker sphere radius (model units) */
|
|
2018
|
-
markerRadius?: number;
|
|
2019
|
-
/** Override line color (hex) */
|
|
2020
|
-
lineColor?: number;
|
|
2021
|
-
/** Override label text color (CSS) */
|
|
2022
|
-
labelColor?: string;
|
|
2023
|
-
/** Override label background (CSS) */
|
|
2024
|
-
labelBackground?: string;
|
|
2025
|
-
/** Override label font size (pixels) */
|
|
2026
|
-
labelFontSize?: number;
|
|
2027
|
-
/** Override overall marker opacity (0-1) */
|
|
2028
|
-
opacity?: number;
|
|
2029
|
-
/** Custom line direction: named preset or explicit vector */
|
|
2030
|
-
lineDirection?: NamedDirection | {
|
|
2031
|
-
x: number;
|
|
2032
|
-
y: number;
|
|
2033
|
-
z: number;
|
|
2034
|
-
};
|
|
2035
|
-
/** Line styling options */
|
|
2036
|
-
line?: LineConfig;
|
|
2037
|
-
}
|
|
2038
|
-
/** Animation style for expanding/collapsing child markers */
|
|
2039
|
-
type ExpandAnimation = 'outward' | 'staggered';
|
|
2040
|
-
/** Expanded region state */
|
|
2041
|
-
interface ExpandedRegionState {
|
|
2042
|
-
regionName: string;
|
|
2043
|
-
isExpanded: boolean;
|
|
2044
|
-
children: string[];
|
|
2045
|
-
}
|
|
2046
|
-
/** Fallback behavior configuration */
|
|
2047
|
-
interface FallbackConfig {
|
|
2048
|
-
/** Name of the fallback marker to show when all group markers are occluded */
|
|
2049
|
-
fallbackMarker?: string;
|
|
2050
|
-
/** Behavior when clicking fallback: 'fit-all' tries to fit all in frame, 'rotate' rotates camera */
|
|
2051
|
-
clickBehavior?: 'fit-all' | 'rotate';
|
|
2052
|
-
}
|
|
2053
|
-
/** Marker group for fallback behavior */
|
|
2054
|
-
interface MarkerGroup {
|
|
2055
|
-
/** Unique group identifier */
|
|
2056
|
-
groupId: string;
|
|
2057
|
-
/** Region names in this group */
|
|
2058
|
-
regions: string[];
|
|
2059
|
-
/** Fallback configuration */
|
|
2060
|
-
fallback?: FallbackConfig;
|
|
2061
|
-
}
|
|
2071
|
+
type ProfileOverrides = Partial<Profile>;
|
|
2072
|
+
type ProfilePresetId = PresetType | string;
|
|
2062
2073
|
/**
|
|
2063
|
-
*
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
/**
|
|
2071
|
-
|
|
2072
|
-
/**
|
|
2073
|
-
|
|
2074
|
-
/**
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
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;
|
|
2079
2089
|
/**
|
|
2080
|
-
*
|
|
2081
|
-
*
|
|
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.
|
|
2082
2093
|
*/
|
|
2083
|
-
|
|
2084
|
-
/**
|
|
2085
|
-
cameraOffset?: {
|
|
2086
|
-
x?: number;
|
|
2087
|
-
y?: number;
|
|
2088
|
-
z?: number;
|
|
2089
|
-
};
|
|
2090
|
-
/** Parent region name - children animate outward from parent when expanded */
|
|
2091
|
-
parent?: string;
|
|
2092
|
-
/** Child region names - shown when this region is expanded */
|
|
2093
|
-
children?: string[];
|
|
2094
|
-
/** Animation style for expand/collapse. Default: 'outward' */
|
|
2095
|
-
expandAnimation?: ExpandAnimation;
|
|
2096
|
-
/** Per-marker style overrides */
|
|
2097
|
-
style?: MarkerStyleOverrides;
|
|
2098
|
-
/** Marker group ID for fallback behavior */
|
|
2099
|
-
groupId?: string;
|
|
2100
|
-
/** If true, this marker acts as a fallback for its group */
|
|
2101
|
-
isFallback?: boolean;
|
|
2102
|
-
/** Custom position override (user-adjusted). If set, overrides calculated position. */
|
|
2103
|
-
customPosition?: {
|
|
2104
|
-
x: number;
|
|
2105
|
-
y: number;
|
|
2106
|
-
z: number;
|
|
2107
|
-
};
|
|
2108
|
-
}
|
|
2109
|
-
/**
|
|
2110
|
-
* Marker style for annotation visualization
|
|
2111
|
-
* - 'html': Simple HTML overlay markers with numbered dots directly over targets
|
|
2112
|
-
* - '3d': 3D markers with lines and labels rendered in scene space
|
|
2113
|
-
*/
|
|
2114
|
-
type MarkerStyle = 'html' | '3d';
|
|
2115
|
-
/**
|
|
2116
|
-
* Per-character configuration for camera + animation
|
|
2117
|
-
*/
|
|
2118
|
-
interface CharacterConfig extends Partial<Profile> {
|
|
2119
|
-
/** Unique identifier for the character */
|
|
2120
|
-
characterId: string;
|
|
2121
|
-
/** Display name */
|
|
2122
|
-
characterName: string;
|
|
2123
|
-
/** Path to GLB file (relative to public folder) */
|
|
2124
|
-
modelPath: string;
|
|
2125
|
-
/** Which region to focus on load */
|
|
2094
|
+
profile?: ProfileOverrides;
|
|
2095
|
+
/** Which annotation region to focus on load. */
|
|
2126
2096
|
defaultRegion?: string;
|
|
2127
|
-
/**
|
|
2128
|
-
regions
|
|
2129
|
-
/** 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'. */
|
|
2130
2100
|
markerStyle?: MarkerStyle;
|
|
2131
|
-
/** Play intro animation on load
|
|
2101
|
+
/** Play intro animation on load. Default: false. */
|
|
2132
2102
|
playIntroOnLoad?: boolean;
|
|
2133
|
-
/** Model position offset to apply on load
|
|
2103
|
+
/** Model position offset to apply on load. */
|
|
2134
2104
|
modelOffset?: {
|
|
2135
2105
|
x?: number;
|
|
2136
2106
|
y?: number;
|
|
2137
2107
|
z?: number;
|
|
2138
2108
|
};
|
|
2139
|
-
/** Model rotation in degrees to apply on load
|
|
2109
|
+
/** Model rotation in degrees to apply on load. */
|
|
2140
2110
|
modelRotation?: {
|
|
2141
2111
|
x?: number;
|
|
2142
2112
|
y?: number;
|
|
2143
2113
|
z?: number;
|
|
2144
2114
|
};
|
|
2145
|
-
/** Ensure model's lowest point clears the ground by this amount
|
|
2115
|
+
/** Ensure model's lowest point clears the ground by this amount. */
|
|
2146
2116
|
modelGroundClearance?: number;
|
|
2147
|
-
/**
|
|
2148
|
-
auPresetType?: PresetType;
|
|
2149
|
-
/**
|
|
2150
|
-
* Optional legacy nested override blob.
|
|
2151
|
-
* New stored character documents should flatten preset overrides onto the
|
|
2152
|
-
* top-level character profile object instead of nesting them here.
|
|
2153
|
-
*/
|
|
2154
|
-
profile?: Partial<Profile>;
|
|
2155
|
-
/** 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. */
|
|
2156
2118
|
deletedBakedAnimationClips?: string[];
|
|
2157
|
-
/**
|
|
2158
|
-
bonePrefix?: string;
|
|
2159
|
-
/** Suffix to append to bone names (e.g., '_Armature' for fish) */
|
|
2160
|
-
boneSuffix?: string;
|
|
2161
|
-
/** Semantic bone name mapping (e.g., 'HEAD' → '001') */
|
|
2162
|
-
boneNodes?: Record<string, string>;
|
|
2163
|
-
/** Regex pattern for fuzzy bone/mesh name matching (e.g., '_\\d+$|\\.\\d+$') */
|
|
2164
|
-
suffixPattern?: string;
|
|
2165
|
-
/** Marker groups for fallback behavior */
|
|
2119
|
+
/** Marker groups for fallback behavior. */
|
|
2166
2120
|
markerGroups?: MarkerGroup[];
|
|
2167
|
-
/** Global line styling defaults */
|
|
2121
|
+
/** Global line styling defaults. */
|
|
2168
2122
|
lineDefaults?: LineConfig;
|
|
2169
|
-
/** Global marker style defaults
|
|
2123
|
+
/** Global marker style defaults, overridden by per-region style. */
|
|
2170
2124
|
markerDefaults?: Partial<MarkerStyleOverrides>;
|
|
2171
2125
|
}
|
|
2172
2126
|
/**
|
|
2173
|
-
*
|
|
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`.
|
|
2174
2176
|
*/
|
|
2175
2177
|
interface CharacterRegistry {
|
|
2176
2178
|
characters: CharacterConfig[];
|
|
2177
2179
|
defaultCharacter?: string;
|
|
2178
2180
|
}
|
|
2179
2181
|
|
|
2180
|
-
declare function
|
|
2181
|
-
|
|
2182
|
-
|
|
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;
|
|
2183
2194
|
/**
|
|
2184
|
-
*
|
|
2185
|
-
|
|
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.
|
|
2186
2201
|
*
|
|
2187
2202
|
* Precedence:
|
|
2188
2203
|
* 1. preset defaults
|
|
@@ -2190,6 +2205,12 @@ declare function applyCharacterProfileToPreset(config: CharacterConfig): Profile
|
|
|
2190
2205
|
* 3. legacy nested `config.profile` overrides (compatibility only)
|
|
2191
2206
|
* 4. legacy `config.regions` fallback only when canonical annotation overrides are absent
|
|
2192
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
|
+
*/
|
|
2193
2214
|
declare function extendCharacterConfigWithPreset(config: CharacterConfig): CharacterConfig;
|
|
2194
2215
|
|
|
2195
2216
|
type CameraRelativeGazeOffset = {
|
|
@@ -2207,15 +2228,21 @@ interface CameraRelativeGazeOptions {
|
|
|
2207
2228
|
*/
|
|
2208
2229
|
declare function computeCameraRelativeGazeOffset(model: THREE.Object3D | null, cameraPosition: THREE.Vector3, targetPosition: THREE.Vector3, options?: CameraRelativeGazeOptions): CameraRelativeGazeOffset;
|
|
2209
2230
|
|
|
2231
|
+
interface BoneResolutionProfile {
|
|
2232
|
+
bonePrefix?: string;
|
|
2233
|
+
boneSuffix?: string;
|
|
2234
|
+
boneNodes?: Record<string, string>;
|
|
2235
|
+
suffixPattern?: string;
|
|
2236
|
+
}
|
|
2210
2237
|
interface ResolvedFaceCenter {
|
|
2211
2238
|
center: THREE.Vector3;
|
|
2212
2239
|
method: string;
|
|
2213
2240
|
debugInfo: string[];
|
|
2214
2241
|
}
|
|
2215
|
-
declare function resolveBoneName(semanticName: string,
|
|
2216
|
-
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[];
|
|
2217
2244
|
declare function fuzzyNameMatch(objectName: string, targetName: string, suffixPattern?: string): boolean;
|
|
2218
|
-
declare function resolveFaceCenter(model: THREE.Object3D, region: Region,
|
|
2245
|
+
declare function resolveFaceCenter(model: THREE.Object3D, region: Region, profile?: BoneResolutionProfile): ResolvedFaceCenter;
|
|
2219
2246
|
|
|
2220
2247
|
/**
|
|
2221
2248
|
* HairPhysics - Spring-damper pendulum simulation for hair movement
|
|
@@ -2645,4 +2672,4 @@ declare function detectFacingDirection(model: THREE.Object3D, eyeBoneNames?: {
|
|
|
2645
2672
|
right: string[];
|
|
2646
2673
|
}): 'forward' | 'backward' | 'unknown';
|
|
2647
2674
|
|
|
2648
|
-
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 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, extractFromGLTF, extractModelData, extractProfileOverrides, findFaceCenter, fuzzyNameMatch, generateMappingCorrections, getMeshNamesForAUProfile, getMeshNamesForVisemeProfile, getModelForwardDirection, getPreset, getPresetWithProfile, getProfileVisemeSlots, getVisemeBindingTargets, 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 };
|