@lovelace_lol/embody 0.0.1
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/LICENSE +21 -0
- package/README.md +2411 -0
- package/dist/authoring/boneAuthoring.d.ts +132 -0
- package/dist/camera/annotationCameraAngles.d.ts +28 -0
- package/dist/camera/cameraRelativeGaze.d.ts +15 -0
- package/dist/camera/rustAnnotationCameraCore.d.ts +136 -0
- package/dist/cljs.cjs +362 -0
- package/dist/cljs.cjs.map +1 -0
- package/dist/cljs.d.ts +5 -0
- package/dist/cljs.js +359 -0
- package/dist/cljs.js.map +1 -0
- package/dist/core/TsClipCompiler.d.ts +51 -0
- package/dist/core/TsRuntimeCore.d.ts +40 -0
- package/dist/core/WasmRuntimeCore.d.ts +55 -0
- package/dist/core/compositeAxis.d.ts +4 -0
- package/dist/core/contracts/abi.d.ts +70 -0
- package/dist/core/contracts/clip.d.ts +44 -0
- package/dist/core/contracts/frame.d.ts +27 -0
- package/dist/core/contracts/host.d.ts +28 -0
- package/dist/core/contracts/ids.d.ts +15 -0
- package/dist/core/contracts/index.d.ts +10 -0
- package/dist/core/contracts/model.d.ts +31 -0
- package/dist/core/contracts/primitives.d.ts +17 -0
- package/dist/core/contracts/skeletonFit.d.ts +41 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/types.d.ts +472 -0
- package/dist/core.cjs +1065 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.js +1040 -0
- package/dist/core.js.map +1 -0
- package/dist/engines/three/Embody.d.ts +373 -0
- package/dist/engines/three/ThreeAnimationRuntime.d.ts +203 -0
- package/dist/engines/three/ThreeClipAdapter.d.ts +24 -0
- package/dist/engines/three/ThreeFrameApplier.d.ts +68 -0
- package/dist/engines/three/ThreeModelInspector.d.ts +54 -0
- package/dist/engines/three/bakedClipPartitioning.d.ts +16 -0
- package/dist/engines/three/balanceUtils.d.ts +3 -0
- package/dist/engines/three/characterHost.d.ts +80 -0
- package/dist/engines/three/characterScene.d.ts +98 -0
- package/dist/engines/three/hair/HairPhysicsController.d.ts +124 -0
- package/dist/engines/three/index.d.ts +20 -0
- package/dist/engines/three/modelLoader.d.ts +61 -0
- package/dist/engines/three/profileTestScene.d.ts +52 -0
- package/dist/engines/three/types.d.ts +20 -0
- package/dist/hair/appearance.d.ts +29 -0
- package/dist/index.cjs +15431 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +15141 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/Animation.d.ts +315 -0
- package/dist/interfaces/EmbodyRuntime.d.ts +90 -0
- package/dist/interfaces/Hair.d.ts +181 -0
- package/dist/interfaces/HairPhysics.d.ts +90 -0
- package/dist/interfaces/index.d.ts +11 -0
- package/dist/mappings/extendPresetWithProfile.d.ts +17 -0
- package/dist/mappings/types.d.ts +309 -0
- package/dist/mappings/visemeSystem.d.ts +26 -0
- package/dist/physics/HairPhysics.d.ts +86 -0
- package/dist/physics/RustHairPhysics.d.ts +18 -0
- package/dist/physics/index.d.ts +6 -0
- package/dist/preset.cjs +2000 -0
- package/dist/preset.cjs.map +1 -0
- package/dist/preset.js +1997 -0
- package/dist/preset.js.map +1 -0
- package/dist/presets/bettaFish.d.ts +328 -0
- package/dist/presets/cc4.d.ts +145 -0
- package/dist/presets/index.d.ts +27 -0
- package/dist/profiles/resolveProfileConfig.d.ts +36 -0
- package/dist/profiles/types.d.ts +118 -0
- package/dist/regions/normalizeRegionTree.d.ts +6 -0
- package/dist/regions/regionMapping.d.ts +17 -0
- package/dist/regions/types.d.ts +122 -0
- package/dist/skeletonTemplates/humanoidSkeletonTemplates.d.ts +32 -0
- package/dist/test/setupWasm.d.ts +1 -0
- package/dist/three.cjs +10115 -0
- package/dist/three.cjs.map +1 -0
- package/dist/three.js +10086 -0
- package/dist/three.js.map +1 -0
- package/dist/validation/analyzeModel.d.ts +68 -0
- package/dist/validation/extractModelData.d.ts +90 -0
- package/dist/validation/generateMappingCorrections.d.ts +32 -0
- package/dist/validation/geometryHelpers.d.ts +66 -0
- package/dist/validation/types.d.ts +10 -0
- package/dist/validation/validateMappings.d.ts +77 -0
- package/dist/wasm/LICENSE +21 -0
- package/dist/wasm/README.md +72 -0
- package/dist/wasm/embody_wasm.d.ts +531 -0
- package/dist/wasm/embody_wasm.js +1635 -0
- package/dist/wasm/embody_wasm_bg.wasm +0 -0
- package/dist/wasm/embody_wasm_bg.wasm.d.ts +107 -0
- package/dist/wasm.cjs +302 -0
- package/dist/wasm.cjs.map +1 -0
- package/dist/wasm.d.ts +43 -0
- package/dist/wasm.js +268 -0
- package/dist/wasm.js.map +1 -0
- package/dist/wasmTypes.d.ts +121 -0
- package/package.json +99 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThreeAnimationRuntime - Lerp-based animation driver
|
|
3
|
+
*
|
|
4
|
+
* Internal driver for time-based interpolation with easing functions.
|
|
5
|
+
*/
|
|
6
|
+
import { AnimationClip, Quaternion } from 'three';
|
|
7
|
+
import type { Mesh, Object3D } from 'three';
|
|
8
|
+
import type { TransitionHandle, AnimationPlayOptions, AnimationClipInfo, AnimationState, AnimationActionHandle, CurvesMap, ClipOptions, ClipHandle, Snippet, CompositeRotation, AnimationBlendMode, SnippetChannel, TypedSnippet, EmbodyAnimationRuntimeFactory } from '../../core/types';
|
|
9
|
+
import type { Profile } from '../../mappings/types';
|
|
10
|
+
import type { ResolvedBones } from './types';
|
|
11
|
+
declare const easeInOutQuad: (t: number) => number;
|
|
12
|
+
declare const easeInOutCubic: (t: number) => number;
|
|
13
|
+
export { easeInOutQuad, easeInOutCubic };
|
|
14
|
+
export declare class ThreeAnimationRuntime {
|
|
15
|
+
private transitions;
|
|
16
|
+
/**
|
|
17
|
+
* Tick all active transitions by dt seconds.
|
|
18
|
+
* Applies eased interpolation and removes completed transitions.
|
|
19
|
+
* Respects individual transition pause state.
|
|
20
|
+
*/
|
|
21
|
+
tick(dtSeconds: number): void;
|
|
22
|
+
/**
|
|
23
|
+
* Add or replace a transition for the given key.
|
|
24
|
+
* If a transition with the same key exists, it is cancelled and replaced.
|
|
25
|
+
* @returns TransitionHandle with { promise, pause, resume, cancel }
|
|
26
|
+
*/
|
|
27
|
+
addTransition(key: string, from: number, to: number, durationMs: number, apply: (value: number) => void, easing?: (t: number) => number): TransitionHandle;
|
|
28
|
+
/** Clear all running transitions. */
|
|
29
|
+
clearTransitions(): void;
|
|
30
|
+
/** Get count of active transitions. */
|
|
31
|
+
getActiveTransitionCount(): number;
|
|
32
|
+
}
|
|
33
|
+
export interface ThreeAnimationSystemHost {
|
|
34
|
+
getModel: () => Object3D | null;
|
|
35
|
+
getMeshes: () => Mesh[];
|
|
36
|
+
getMeshByName: (name: string) => Mesh | undefined;
|
|
37
|
+
getMeshNamesForAU?: (auId: number) => string[];
|
|
38
|
+
getMeshNamesForViseme?: () => string[];
|
|
39
|
+
getCurrentAUValue?: (auId: number) => number;
|
|
40
|
+
getCurrentVisemeValue?: (visemeIndex: number) => number;
|
|
41
|
+
getCurrentMorphValue?: (morphKey: string, meshNames?: string[]) => number;
|
|
42
|
+
getCurrentMorphIndexValue?: (morphIndex: number, meshNames?: string[]) => number;
|
|
43
|
+
getCurrentBoneQuaternion?: (nodeKey: string) => Quaternion | null;
|
|
44
|
+
getCurrentBonePositionValue?: (nodeKey: string, axis: 'x' | 'y' | 'z') => number | null;
|
|
45
|
+
getBones: () => ResolvedBones;
|
|
46
|
+
getConfig: () => Profile;
|
|
47
|
+
getCompositeRotations: () => CompositeRotation[];
|
|
48
|
+
computeSideValues: (base: number, balance?: number) => {
|
|
49
|
+
left: number;
|
|
50
|
+
right: number;
|
|
51
|
+
};
|
|
52
|
+
getAUMixWeight: (auId: number) => number;
|
|
53
|
+
isMixedAU: (auId: number) => boolean;
|
|
54
|
+
reapplyProceduralState?: () => void;
|
|
55
|
+
}
|
|
56
|
+
/** @deprecated Use ThreeAnimationSystemHost. */
|
|
57
|
+
export type AnimationControllerHost = ThreeAnimationSystemHost;
|
|
58
|
+
/** @deprecated Use ThreeAnimationSystemHost. */
|
|
59
|
+
export type BakedAnimationHost = ThreeAnimationSystemHost;
|
|
60
|
+
export type ThreeAnimationSystemOptions = {
|
|
61
|
+
animationRuntimeFactory?: EmbodyAnimationRuntimeFactory;
|
|
62
|
+
};
|
|
63
|
+
type ClipParamsUpdate = {
|
|
64
|
+
weight?: number;
|
|
65
|
+
rate?: number;
|
|
66
|
+
loop?: boolean;
|
|
67
|
+
loopMode?: 'once' | 'repeat' | 'pingpong';
|
|
68
|
+
repeatCount?: number;
|
|
69
|
+
reverse?: boolean;
|
|
70
|
+
actionId?: string;
|
|
71
|
+
};
|
|
72
|
+
export declare class ThreeAnimationSystem {
|
|
73
|
+
private host;
|
|
74
|
+
private animationMixer;
|
|
75
|
+
private clipAnimationMixer;
|
|
76
|
+
private mixerFinishedListenerAttached;
|
|
77
|
+
private clipMixerFinishedListenerAttached;
|
|
78
|
+
private animationClips;
|
|
79
|
+
private bakedSourceClips;
|
|
80
|
+
private bakedMixerActions;
|
|
81
|
+
private bakedAdditiveMixerClips;
|
|
82
|
+
private bakedActionGroups;
|
|
83
|
+
private bakedMixerClipToSource;
|
|
84
|
+
private animationActions;
|
|
85
|
+
private animationFinishedCallbacks;
|
|
86
|
+
private clipActions;
|
|
87
|
+
private clipHandles;
|
|
88
|
+
private rendererClipHandles;
|
|
89
|
+
private clipSources;
|
|
90
|
+
private playbackState;
|
|
91
|
+
private actionIds;
|
|
92
|
+
private actionIdToClip;
|
|
93
|
+
private clipMonitors;
|
|
94
|
+
private dynamicClipSources;
|
|
95
|
+
private cljsAnimationRuntime;
|
|
96
|
+
constructor(host: ThreeAnimationSystemHost, options?: ThreeAnimationSystemOptions);
|
|
97
|
+
private shouldDebugClipLogs;
|
|
98
|
+
private debugClipLog;
|
|
99
|
+
private createRuntimeConnector;
|
|
100
|
+
getRuntimeSnapshot(): Record<string, unknown> | null;
|
|
101
|
+
private getActionId;
|
|
102
|
+
private setActionId;
|
|
103
|
+
private clearActionId;
|
|
104
|
+
private uncacheClip;
|
|
105
|
+
private uncacheAction;
|
|
106
|
+
private releaseBakedMixerAction;
|
|
107
|
+
private clearBakedAdditiveMixerClip;
|
|
108
|
+
private clearAllBakedAdditiveMixerClips;
|
|
109
|
+
private resolveTrackTarget;
|
|
110
|
+
private getMorphTrackBaseValue;
|
|
111
|
+
private canCreateFirstFrameReferenceTrack;
|
|
112
|
+
private createFirstFrameReferenceTrack;
|
|
113
|
+
private createAdditiveReferenceTrack;
|
|
114
|
+
private createAdditiveMixerClip;
|
|
115
|
+
private getOrCreateBakedAdditiveMixerClip;
|
|
116
|
+
private setClipEventMetadata;
|
|
117
|
+
private getClipEventMetadata;
|
|
118
|
+
private curvesHaveInheritedStart;
|
|
119
|
+
private channelsHaveInheritedStart;
|
|
120
|
+
private rebuildDynamicClip;
|
|
121
|
+
private resolveInheritedClipForPlayback;
|
|
122
|
+
private getKeyframeIndex;
|
|
123
|
+
private emitClipEvent;
|
|
124
|
+
private emitKeyframesForRange;
|
|
125
|
+
private resetClipMonitor;
|
|
126
|
+
private syncClipMonitorTime;
|
|
127
|
+
private cleanupClipMonitor;
|
|
128
|
+
private advanceClipMonitor;
|
|
129
|
+
private normalizePlaybackOptions;
|
|
130
|
+
private applyPlaybackState;
|
|
131
|
+
private setPlaybackState;
|
|
132
|
+
private getPlaybackStateSnapshot;
|
|
133
|
+
private mergePlaybackOptions;
|
|
134
|
+
private isBakedSourceClip;
|
|
135
|
+
private getBakedSourceClip;
|
|
136
|
+
private getBakedChannelInfo;
|
|
137
|
+
private getBakedAggregateBlendMode;
|
|
138
|
+
private applyPlaybackStateToBakedAction;
|
|
139
|
+
private resolveStartTime;
|
|
140
|
+
private getOrCreateBakedMixerAction;
|
|
141
|
+
private getRepresentativeBakedAction;
|
|
142
|
+
private createBakedActionGroup;
|
|
143
|
+
private getMeshNamesForAU;
|
|
144
|
+
private getMeshNamesForViseme;
|
|
145
|
+
private hasActiveAdditivePlayback;
|
|
146
|
+
update(dtSeconds: number): void;
|
|
147
|
+
dispose(): void;
|
|
148
|
+
loadAnimationClips(clips: unknown[]): void;
|
|
149
|
+
getAnimationClips(): AnimationClipInfo[];
|
|
150
|
+
removeAnimationClip(clipName: string): boolean;
|
|
151
|
+
playAnimation(clipName: string, options?: AnimationPlayOptions): AnimationActionHandle | null;
|
|
152
|
+
stopAnimation(clipName: string): void;
|
|
153
|
+
stopAllAnimations(): void;
|
|
154
|
+
pauseAnimation(clipName: string): void;
|
|
155
|
+
resumeAnimation(clipName: string): void;
|
|
156
|
+
pauseAllAnimations(): void;
|
|
157
|
+
resumeAllAnimations(): void;
|
|
158
|
+
setAnimationSpeed(clipName: string, speed: number): void;
|
|
159
|
+
setAnimationIntensity(clipName: string, intensity: number): void;
|
|
160
|
+
setAnimationLoopMode(clipName: string, loopMode: 'repeat' | 'once' | 'pingpong'): void;
|
|
161
|
+
setAnimationRepeatCount(clipName: string, repeatCount?: number): void;
|
|
162
|
+
setAnimationReverse(clipName: string, reverse: boolean): void;
|
|
163
|
+
setAnimationBlendMode(clipName: string, blendMode: AnimationBlendMode): void;
|
|
164
|
+
seekAnimation(clipName: string, time: number): void;
|
|
165
|
+
setAnimationTimeScale(timeScale: number): void;
|
|
166
|
+
getAnimationState(clipName: string): AnimationState | null;
|
|
167
|
+
getPlayingAnimations(): AnimationState[];
|
|
168
|
+
crossfadeTo(clipName: string, duration?: number, options?: AnimationPlayOptions): AnimationActionHandle | null;
|
|
169
|
+
snippetToClip(clipName: string, curves: CurvesMap, options?: ClipOptions): AnimationClip | null;
|
|
170
|
+
typedSnippetToClip(clipName: string, channels: SnippetChannel[], options?: ClipOptions): AnimationClip | null;
|
|
171
|
+
private playClipDirect;
|
|
172
|
+
playClip(clip: AnimationClip, options?: ClipOptions): ClipHandle | null;
|
|
173
|
+
playSnippet(snippet: Snippet | {
|
|
174
|
+
name: string;
|
|
175
|
+
curves: CurvesMap;
|
|
176
|
+
} | TypedSnippet | {
|
|
177
|
+
name: string;
|
|
178
|
+
channels: SnippetChannel[];
|
|
179
|
+
}, options?: ClipOptions): ClipHandle | null;
|
|
180
|
+
playTypedSnippet(snippet: TypedSnippet | {
|
|
181
|
+
name: string;
|
|
182
|
+
channels: SnippetChannel[];
|
|
183
|
+
}, options?: ClipOptions): ClipHandle | null;
|
|
184
|
+
buildClip(clipName: string, curves: CurvesMap, options?: ClipOptions): ClipHandle | null;
|
|
185
|
+
private buildClipDirect;
|
|
186
|
+
buildTypedClip(clipName: string, channels: SnippetChannel[], options?: ClipOptions): ClipHandle | null;
|
|
187
|
+
cleanupSnippet(name: string): void;
|
|
188
|
+
private cleanupSnippetDirect;
|
|
189
|
+
updateClipParams(name: string, params: ClipParamsUpdate): boolean;
|
|
190
|
+
private updateClipParamsDirect;
|
|
191
|
+
private addMorphTracks;
|
|
192
|
+
private addMorphIndexTracks;
|
|
193
|
+
private sampleFinalKeyframeValue;
|
|
194
|
+
private ensureMixer;
|
|
195
|
+
private ensureClipMixer;
|
|
196
|
+
private handleMixerFinished;
|
|
197
|
+
private createAnimationHandle;
|
|
198
|
+
private createBakedAnimationHandle;
|
|
199
|
+
}
|
|
200
|
+
/** @deprecated Use ThreeAnimationSystem. */
|
|
201
|
+
export { ThreeAnimationSystem as AnimationController };
|
|
202
|
+
/** @deprecated Use ThreeAnimationSystem. */
|
|
203
|
+
export { ThreeAnimationSystem as BakedAnimationController };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AnimationClip } from 'three';
|
|
2
|
+
import type { Object3D } from 'three';
|
|
3
|
+
import type { BoneId, ClipIR, MeshId, MorphTargetId } from '../../core/contracts';
|
|
4
|
+
export interface ThreeClipMeshBinding {
|
|
5
|
+
readonly trackName: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ThreeClipMorphTargetBinding {
|
|
8
|
+
readonly meshId: MeshId;
|
|
9
|
+
readonly index: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ThreeClipAdapterBindings {
|
|
12
|
+
readonly meshes?: ReadonlyMap<MeshId, Object3D | ThreeClipMeshBinding>;
|
|
13
|
+
readonly morphTargets?: ReadonlyMap<MorphTargetId, ThreeClipMorphTargetBinding>;
|
|
14
|
+
readonly bones?: ReadonlyMap<BoneId, Object3D | string>;
|
|
15
|
+
}
|
|
16
|
+
export declare class ThreeClipAdapter {
|
|
17
|
+
private meshes;
|
|
18
|
+
private morphTargets;
|
|
19
|
+
private bones;
|
|
20
|
+
constructor(bindings?: ThreeClipAdapterBindings);
|
|
21
|
+
setBindings(bindings: ThreeClipAdapterBindings): void;
|
|
22
|
+
toAnimationClip(clip: ClipIR): AnimationClip;
|
|
23
|
+
private toKeyframeTrack;
|
|
24
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Mesh, Object3D } from 'three';
|
|
2
|
+
import type { BoneId, FrameDelta, HostFrameApplier, MeshId, MorphTargetId, Transform } from '../../core/contracts';
|
|
3
|
+
export interface ThreeMorphTargetBinding {
|
|
4
|
+
readonly meshId: MeshId;
|
|
5
|
+
readonly mesh: Mesh;
|
|
6
|
+
readonly index: number;
|
|
7
|
+
}
|
|
8
|
+
export interface ThreeFrameApplierBindings {
|
|
9
|
+
readonly meshes?: ReadonlyMap<MeshId, Mesh>;
|
|
10
|
+
readonly morphTargets?: ReadonlyMap<MorphTargetId, ThreeMorphTargetBinding>;
|
|
11
|
+
readonly bones?: ReadonlyMap<BoneId, Object3D>;
|
|
12
|
+
}
|
|
13
|
+
export interface ThreeMaterialConfig {
|
|
14
|
+
renderOrder?: number;
|
|
15
|
+
transparent?: boolean;
|
|
16
|
+
opacity?: number;
|
|
17
|
+
depthWrite?: boolean;
|
|
18
|
+
depthTest?: boolean;
|
|
19
|
+
blending?: keyof typeof THREE_BLENDING_MODES;
|
|
20
|
+
}
|
|
21
|
+
export interface ThreeResolvedMaterialConfig {
|
|
22
|
+
renderOrder: number;
|
|
23
|
+
transparent: boolean;
|
|
24
|
+
opacity: number;
|
|
25
|
+
depthWrite: boolean;
|
|
26
|
+
depthTest: boolean;
|
|
27
|
+
blending: keyof typeof THREE_BLENDING_MODES;
|
|
28
|
+
}
|
|
29
|
+
export interface ThreeMeshMaterialConfig {
|
|
30
|
+
readonly material?: ThreeMaterialConfig;
|
|
31
|
+
}
|
|
32
|
+
export declare const THREE_BLENDING_MODES: {
|
|
33
|
+
readonly Normal: 1;
|
|
34
|
+
readonly Additive: 2;
|
|
35
|
+
readonly Subtractive: 3;
|
|
36
|
+
readonly Multiply: 4;
|
|
37
|
+
readonly None: 0;
|
|
38
|
+
};
|
|
39
|
+
export declare class ThreeFrameApplier implements HostFrameApplier<Object3D> {
|
|
40
|
+
private meshes;
|
|
41
|
+
private morphTargets;
|
|
42
|
+
private bones;
|
|
43
|
+
private originalEmissive;
|
|
44
|
+
constructor(bindings?: ThreeFrameApplierBindings);
|
|
45
|
+
setBindings(bindings: ThreeFrameApplierBindings): void;
|
|
46
|
+
applyFrameDelta(model: Object3D, frame: FrameDelta): void;
|
|
47
|
+
applyPackedMorphFrameDelta(values: ArrayLike<number>, stride?: number): void;
|
|
48
|
+
/** Rows: `[boneId, px, py, pz, qx, qy, qz, qw, flags]`; flags bit0=position, bit1=rotation. */
|
|
49
|
+
applyPackedBoneFrameDelta(values: ArrayLike<number>, stride?: number): void;
|
|
50
|
+
applyObjectTransform(target: Object3D, transform: Transform, mode?: 'absolute' | 'additive'): void;
|
|
51
|
+
applyMorphTargets(targets: readonly {
|
|
52
|
+
infl: number[];
|
|
53
|
+
idx: number;
|
|
54
|
+
}[], value: number): void;
|
|
55
|
+
resetMorphTargets(targets: readonly {
|
|
56
|
+
infl: number[];
|
|
57
|
+
idx: number;
|
|
58
|
+
}[]): void;
|
|
59
|
+
setMeshVisible(root: Object3D, meshName: string, visible: boolean): void;
|
|
60
|
+
highlightMesh(root: Object3D, meshName: string | null, color?: number, intensity?: number): void;
|
|
61
|
+
getMeshMaterialConfig(root: Object3D, meshName: string): ThreeResolvedMaterialConfig | null;
|
|
62
|
+
setMeshMaterialConfig(root: Object3D, meshName: string, config: ThreeMaterialConfig): void;
|
|
63
|
+
applyMeshMaterialConfigs(root: Object3D, configs: Readonly<Record<string, ThreeMeshMaterialConfig>>): void;
|
|
64
|
+
private applyMeshMaterialConfig;
|
|
65
|
+
private setMorphTarget;
|
|
66
|
+
private applyTransform;
|
|
67
|
+
private visitNamedMesh;
|
|
68
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { AnimationClip, Mesh, Object3D } from 'three';
|
|
2
|
+
import type { HostModelInspector, ModelDescriptor } from '../../core/contracts';
|
|
3
|
+
import type { Profile } from '../../mappings/types';
|
|
4
|
+
import type { ResolvedBones } from './types';
|
|
5
|
+
export interface ThreeAnimationTrackDescriptor {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly targetName: string;
|
|
8
|
+
readonly property: string;
|
|
9
|
+
readonly type: 'position' | 'rotation' | 'scale' | 'morph' | 'unknown';
|
|
10
|
+
readonly keyframeCount: number;
|
|
11
|
+
readonly valueSize: number;
|
|
12
|
+
readonly valueRange?: {
|
|
13
|
+
readonly min: readonly number[];
|
|
14
|
+
readonly max: readonly number[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface ThreeAnimationClipDescriptor {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly duration: number;
|
|
20
|
+
readonly tracks: readonly ThreeAnimationTrackDescriptor[];
|
|
21
|
+
readonly animatedBones: readonly string[];
|
|
22
|
+
readonly animatedMorphs: readonly string[];
|
|
23
|
+
}
|
|
24
|
+
export interface ThreeModelInspectionOptions {
|
|
25
|
+
readonly meshes?: readonly Mesh[];
|
|
26
|
+
readonly profile?: Profile;
|
|
27
|
+
readonly previousBones?: ResolvedBones;
|
|
28
|
+
readonly animations?: readonly AnimationClip[];
|
|
29
|
+
}
|
|
30
|
+
export interface ThreeModelInspection {
|
|
31
|
+
readonly descriptor: ModelDescriptor;
|
|
32
|
+
readonly meshByName: Map<string, Mesh>;
|
|
33
|
+
readonly allMeshes: Mesh[];
|
|
34
|
+
readonly morphMeshes: Mesh[];
|
|
35
|
+
readonly bones: ResolvedBones;
|
|
36
|
+
readonly resolvedFaceMeshes: string[];
|
|
37
|
+
readonly faceMesh: Mesh | null;
|
|
38
|
+
readonly animations: ThreeAnimationClipDescriptor[];
|
|
39
|
+
}
|
|
40
|
+
export declare class ThreeModelInspector implements HostModelInspector<Object3D> {
|
|
41
|
+
describeModel(model: Object3D): ModelDescriptor;
|
|
42
|
+
inspectModel(model: Object3D, options?: ThreeModelInspectionOptions): ThreeModelInspection;
|
|
43
|
+
collectMeshes(root: Object3D): Mesh[];
|
|
44
|
+
buildMeshByName(root: Object3D): Map<string, Mesh>;
|
|
45
|
+
resolveBones(root: Object3D, profile: Profile, previousBones?: ResolvedBones): ResolvedBones;
|
|
46
|
+
resolveFaceMeshes(meshes: readonly Mesh[], meshByName: ReadonlyMap<string, Mesh>, bones: ResolvedBones, profile: Profile): string[];
|
|
47
|
+
describeAnimations(animations: readonly AnimationClip[]): ThreeAnimationClipDescriptor[];
|
|
48
|
+
private mergeMorphMeshes;
|
|
49
|
+
private buildDescriptor;
|
|
50
|
+
private collectDescriptorBoneObjects;
|
|
51
|
+
private findNearestDescriptorBoneId;
|
|
52
|
+
private describeTrack;
|
|
53
|
+
}
|
|
54
|
+
export declare function collectMorphMeshes(root: Object3D): Mesh[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnimationClip, KeyframeTrack, Object3D } from 'three';
|
|
2
|
+
import type { AnimationBlendMode, BakedClipChannel, BakedClipChannelInfo } from '../../core/types';
|
|
3
|
+
import type { ResolvedBones } from './types';
|
|
4
|
+
export interface PartitionedBakedMixerClip {
|
|
5
|
+
channel: BakedClipChannel;
|
|
6
|
+
clip: AnimationClip;
|
|
7
|
+
}
|
|
8
|
+
export interface PartitionedBakedClip {
|
|
9
|
+
sourceClip: AnimationClip;
|
|
10
|
+
channels: BakedClipChannelInfo[];
|
|
11
|
+
mixerClips: PartitionedBakedMixerClip[];
|
|
12
|
+
}
|
|
13
|
+
export declare function classifyBakedTrack(track: KeyframeTrack, model: Object3D, bones: ResolvedBones): BakedClipChannel;
|
|
14
|
+
export declare function resolveBakedChannelBlendMode(channel: BakedClipChannel, requestedBlendMode: AnimationBlendMode): AnimationBlendMode | undefined;
|
|
15
|
+
export declare function resolveBakedAggregateBlendMode(channels: BakedClipChannelInfo[], requestedBlendMode: AnimationBlendMode): AnimationBlendMode;
|
|
16
|
+
export declare function partitionBakedClip(clip: AnimationClip, model: Object3D, bones: ResolvedBones): PartitionedBakedClip;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function clampBalance(value: number): number;
|
|
2
|
+
export declare function getSideScale(balance: number, side?: 'left' | 'right'): number;
|
|
3
|
+
export declare function resolveCurveBalance(curveId: string, globalBalance: number, balanceMap?: Record<string, number>): number;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* High-level character host: default scene + model load + Embody binding.
|
|
3
|
+
*
|
|
4
|
+
* Default path: pass a container HTMLElement + character model URL.
|
|
5
|
+
* Advanced path: inject an existing Three.js scene/renderer/camera.
|
|
6
|
+
*/
|
|
7
|
+
import { type AnimationClip, type Camera, type Mesh, type Object3D, type PerspectiveCamera, type Scene, type WebGLRenderer } from 'three';
|
|
8
|
+
import type { EmbodyConfig } from '../../interfaces/EmbodyRuntime';
|
|
9
|
+
import { Embody } from './Embody';
|
|
10
|
+
import { type DefaultCharacterLightingController, type DefaultCharacterSceneOptions } from './characterScene';
|
|
11
|
+
import { type CharacterModelLoadOptions, type CharacterModelTransform } from './modelLoader';
|
|
12
|
+
export interface CharacterHostCharacterOptions extends CharacterModelTransform {
|
|
13
|
+
/** Resolved model URL (GLB/GLTF/FBX). */
|
|
14
|
+
modelUrl: string;
|
|
15
|
+
/** Optional Embody preset / profile (also accepted via `embody`). */
|
|
16
|
+
presetType?: EmbodyConfig['presetType'];
|
|
17
|
+
profile?: EmbodyConfig['profile'];
|
|
18
|
+
}
|
|
19
|
+
export interface CharacterHostExternalScene {
|
|
20
|
+
scene: Scene;
|
|
21
|
+
renderer: WebGLRenderer;
|
|
22
|
+
camera: Camera;
|
|
23
|
+
/**
|
|
24
|
+
* When true, host appends `renderer.domElement` into `container` if it is not
|
|
25
|
+
* already mounted. Default: false.
|
|
26
|
+
*/
|
|
27
|
+
mountCanvas?: boolean;
|
|
28
|
+
/** When true, host listens for window resize. Default: false for external. */
|
|
29
|
+
manageResize?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface CharacterHostOptions {
|
|
32
|
+
/** Element that receives the WebGL canvas in the default scene path. */
|
|
33
|
+
container: HTMLElement;
|
|
34
|
+
/** Character to load and bind. */
|
|
35
|
+
character: CharacterHostCharacterOptions;
|
|
36
|
+
/** Embody runtime config. `presetType` / `profile` on character win when both set. */
|
|
37
|
+
embody?: EmbodyConfig;
|
|
38
|
+
/** Default-scene options (ignored when `external` is provided). */
|
|
39
|
+
scene?: DefaultCharacterSceneOptions;
|
|
40
|
+
/** Advanced: inject an existing Three.js scene instead of creating one. */
|
|
41
|
+
external?: CharacterHostExternalScene;
|
|
42
|
+
/** Model loader options (progress, Draco path, shadows). */
|
|
43
|
+
loader?: CharacterModelLoadOptions;
|
|
44
|
+
/** Call `engine.start()` after binding. Default: true */
|
|
45
|
+
autoStart?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Run a requestAnimationFrame render loop (`renderer.render(scene, camera)`).
|
|
48
|
+
* Default: true when Embody owns the scene, false when `external` is given.
|
|
49
|
+
*/
|
|
50
|
+
renderLoop?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Frame the camera on the loaded model (position + lookAt). Applies on every
|
|
53
|
+
* `setCharacter`. Default: true when Embody owns the scene, false otherwise.
|
|
54
|
+
*/
|
|
55
|
+
autoFrame?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface CharacterHost {
|
|
58
|
+
engine: Embody;
|
|
59
|
+
scene: Scene;
|
|
60
|
+
renderer: WebGLRenderer;
|
|
61
|
+
camera: Camera | PerspectiveCamera;
|
|
62
|
+
model: Object3D;
|
|
63
|
+
meshes: Mesh[];
|
|
64
|
+
animations: AnimationClip[];
|
|
65
|
+
lighting: DefaultCharacterLightingController | null;
|
|
66
|
+
/** True when Embody created and owns the default scene/renderer. */
|
|
67
|
+
ownsScene: boolean;
|
|
68
|
+
container: HTMLElement;
|
|
69
|
+
/** Replace the loaded character while keeping the same scene/engine. */
|
|
70
|
+
setCharacter: (character: CharacterHostCharacterOptions, loader?: CharacterModelLoadOptions) => Promise<void>;
|
|
71
|
+
resize: () => void;
|
|
72
|
+
dispose: () => void;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Create a character host.
|
|
76
|
+
*
|
|
77
|
+
* Default: Embody creates the Three.js scene inside `container` and loads
|
|
78
|
+
* `character.modelUrl`. Advanced: pass `external` with an existing scene.
|
|
79
|
+
*/
|
|
80
|
+
export declare function createCharacterHost(options: CharacterHostOptions): Promise<CharacterHost>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Three.js scene host for Embody characters.
|
|
3
|
+
*
|
|
4
|
+
* Creates renderer / scene / camera / lighting / shadow plane and mounts the
|
|
5
|
+
* canvas into a caller-supplied HTMLElement. Advanced callers can skip this
|
|
6
|
+
* and inject an existing Three.js scene via createCharacterHost.
|
|
7
|
+
*/
|
|
8
|
+
import { Mesh, PerspectiveCamera, Scene, WebGLRenderer, type Texture } from 'three';
|
|
9
|
+
export type DefaultCharacterLightingPresetId = 'cleanStudio' | 'softFill' | 'inspection' | 'contrast';
|
|
10
|
+
export interface DefaultCharacterLightingSettings {
|
|
11
|
+
envMapEnabled: boolean;
|
|
12
|
+
environmentIntensity: number;
|
|
13
|
+
environmentBlur: number;
|
|
14
|
+
exposure: number;
|
|
15
|
+
ambientIntensity: number;
|
|
16
|
+
keyIntensity: number;
|
|
17
|
+
fillIntensity: number;
|
|
18
|
+
rimIntensity: number;
|
|
19
|
+
shadowOpacity: number;
|
|
20
|
+
}
|
|
21
|
+
export interface DefaultCharacterLightingController {
|
|
22
|
+
getSettings: () => DefaultCharacterLightingSettings;
|
|
23
|
+
getEnvironmentTexture: () => Texture | null;
|
|
24
|
+
setSettings: (patch: Partial<DefaultCharacterLightingSettings>) => DefaultCharacterLightingSettings;
|
|
25
|
+
setPreset: (presetId: DefaultCharacterLightingPresetId) => DefaultCharacterLightingSettings;
|
|
26
|
+
subscribe: (listener: (settings: DefaultCharacterLightingSettings) => void) => () => void;
|
|
27
|
+
dispose: () => void;
|
|
28
|
+
}
|
|
29
|
+
export type CharacterSceneTypeId = 'studio' | 'showcase' | 'inspection' | 'void';
|
|
30
|
+
/** A named bundle of scene defaults (background, lighting preset, shadow plane). */
|
|
31
|
+
export interface CharacterSceneTypeDefinition {
|
|
32
|
+
id: CharacterSceneTypeId;
|
|
33
|
+
label: string;
|
|
34
|
+
description: string;
|
|
35
|
+
/** Scene background color (hex), or null for a transparent canvas. */
|
|
36
|
+
background: number | null;
|
|
37
|
+
lightingPreset: DefaultCharacterLightingPresetId;
|
|
38
|
+
shadowPlane: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface DefaultCharacterSceneOptions {
|
|
41
|
+
/** Named scene type providing background/lighting/shadow defaults. Default: 'studio' */
|
|
42
|
+
type?: CharacterSceneTypeId;
|
|
43
|
+
/** Perspective camera FOV. Default: 45 */
|
|
44
|
+
cameraFov?: number;
|
|
45
|
+
/** Cap device pixel ratio. Default: 1.5 */
|
|
46
|
+
pixelRatioCap?: number;
|
|
47
|
+
/** Enable shadow maps. Default: true */
|
|
48
|
+
shadows?: boolean;
|
|
49
|
+
/** Add a ground shadow receiver. Default: from scene type */
|
|
50
|
+
shadowPlane?: boolean;
|
|
51
|
+
/** Scene background color (hex or CSS string), or null for transparent. Default: from scene type */
|
|
52
|
+
background?: number | string | null;
|
|
53
|
+
/** Initial lighting settings / overrides */
|
|
54
|
+
lighting?: Partial<DefaultCharacterLightingSettings>;
|
|
55
|
+
/** Lighting preset applied before lighting overrides. Default: from scene type */
|
|
56
|
+
lightingPreset?: DefaultCharacterLightingPresetId;
|
|
57
|
+
/** Listen for window resize. Default: true */
|
|
58
|
+
manageResize?: boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface DefaultCharacterScene {
|
|
61
|
+
container: HTMLElement;
|
|
62
|
+
scene: Scene;
|
|
63
|
+
renderer: WebGLRenderer;
|
|
64
|
+
camera: PerspectiveCamera;
|
|
65
|
+
lighting: DefaultCharacterLightingController;
|
|
66
|
+
shadowPlane: Mesh | null;
|
|
67
|
+
/** Resolved scene type used for defaults. */
|
|
68
|
+
sceneType: CharacterSceneTypeId;
|
|
69
|
+
ownsScene: true;
|
|
70
|
+
resize: () => void;
|
|
71
|
+
dispose: () => void;
|
|
72
|
+
}
|
|
73
|
+
export declare const DEFAULT_CHARACTER_SCENE_TYPE_ID: CharacterSceneTypeId;
|
|
74
|
+
export declare const CHARACTER_SCENE_TYPES: Record<CharacterSceneTypeId, CharacterSceneTypeDefinition>;
|
|
75
|
+
export declare const CHARACTER_SCENE_TYPE_IDS: readonly CharacterSceneTypeId[];
|
|
76
|
+
export declare const DEFAULT_CHARACTER_LIGHTING_PRESET_ID: DefaultCharacterLightingPresetId;
|
|
77
|
+
export declare const DEFAULT_CHARACTER_LIGHTING_PRESETS: Record<DefaultCharacterLightingPresetId, {
|
|
78
|
+
id: DefaultCharacterLightingPresetId;
|
|
79
|
+
label: string;
|
|
80
|
+
settings: DefaultCharacterLightingSettings;
|
|
81
|
+
}>;
|
|
82
|
+
export declare const DEFAULT_CHARACTER_LIGHTING_SETTINGS: DefaultCharacterLightingSettings;
|
|
83
|
+
export declare const DEFAULT_CHARACTER_LIGHTING_PRESET_IDS: readonly DefaultCharacterLightingPresetId[];
|
|
84
|
+
/**
|
|
85
|
+
* Normalize persisted / untrusted lighting settings (e.g. profile JSON).
|
|
86
|
+
* Returns null when the value is not a plain object.
|
|
87
|
+
*/
|
|
88
|
+
export declare function normalizeDefaultCharacterLightingSettings(value: unknown): DefaultCharacterLightingSettings | null;
|
|
89
|
+
export declare function createShadowPlane(scene: Scene, options?: {
|
|
90
|
+
size?: number;
|
|
91
|
+
opacity?: number;
|
|
92
|
+
yPosition?: number;
|
|
93
|
+
}): Mesh;
|
|
94
|
+
export declare function createDefaultCharacterLighting(scene: Scene, renderer: WebGLRenderer, initialSettings?: Partial<DefaultCharacterLightingSettings>): DefaultCharacterLightingController;
|
|
95
|
+
/**
|
|
96
|
+
* Create a default Embody character scene mounted into `container`.
|
|
97
|
+
*/
|
|
98
|
+
export declare function createDefaultCharacterScene(container: HTMLElement, options?: DefaultCharacterSceneOptions): DefaultCharacterScene;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Mesh } from 'three';
|
|
2
|
+
import type { Object3D } from 'three';
|
|
3
|
+
import type { ClipHandle, ClipOptions, CurvesMap } from '../../../core/types';
|
|
4
|
+
import type { HairPhysicsDirectionConfig as SharedHairPhysicsDirectionConfig, HairMorphTargetsConfig as SharedHairMorphTargetsConfig, HairPhysicsRuntimeConfig as SharedHairPhysicsConfig, HairPhysicsRuntimeConfigUpdate as SharedHairPhysicsConfigUpdate, HairAppearanceState, HairColorAppearance } from '../../../interfaces/Hair';
|
|
5
|
+
import type { HairPhysicsProfileConfig } from '../../../mappings/types';
|
|
6
|
+
import type { EmbodyCoreWasmModule } from '../../../wasmTypes';
|
|
7
|
+
export type HairPhysicsDirectionConfig = SharedHairPhysicsDirectionConfig;
|
|
8
|
+
export type HairMorphTargets = SharedHairMorphTargetsConfig;
|
|
9
|
+
export type HairPhysicsConfig = SharedHairPhysicsConfig;
|
|
10
|
+
export type HairPhysicsConfigUpdate = SharedHairPhysicsConfigUpdate;
|
|
11
|
+
export interface HairPhysicsHost {
|
|
12
|
+
getMeshByName: (name: string) => Mesh | undefined;
|
|
13
|
+
getSelectedHairMeshNames?: () => string[];
|
|
14
|
+
buildClip?: (clipName: string, curves: CurvesMap, options?: ClipOptions) => ClipHandle | null;
|
|
15
|
+
cleanupSnippet?: (name: string) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare class HairPhysicsController {
|
|
18
|
+
private host;
|
|
19
|
+
private core;
|
|
20
|
+
private hairPhysicsEnabled;
|
|
21
|
+
private hairPhysicsConfig;
|
|
22
|
+
private readonly idleClipName;
|
|
23
|
+
private readonly gravityClipName;
|
|
24
|
+
private readonly impulseClipNames;
|
|
25
|
+
private idleClipHandle;
|
|
26
|
+
private gravityClipHandle;
|
|
27
|
+
private idleClipDirty;
|
|
28
|
+
private gravityClipDirty;
|
|
29
|
+
private impulseClips;
|
|
30
|
+
private impulseClipDirty;
|
|
31
|
+
private impulseEndTimers;
|
|
32
|
+
private impulseFadeSteps;
|
|
33
|
+
private hasHeadState;
|
|
34
|
+
private lastHeadHorizontal;
|
|
35
|
+
private lastHeadVertical;
|
|
36
|
+
private registeredHairObjects;
|
|
37
|
+
private cachedHairMeshNames;
|
|
38
|
+
private warnedMissingMorphTargets;
|
|
39
|
+
private appearance;
|
|
40
|
+
private appearanceSampled;
|
|
41
|
+
constructor(host: HairPhysicsHost);
|
|
42
|
+
/** Attach the Wasm module owned by the engine/session that created this controller. */
|
|
43
|
+
setCore(core: EmbodyCoreWasmModule): void;
|
|
44
|
+
private requireCore;
|
|
45
|
+
private isEyebrowMesh;
|
|
46
|
+
private sampleColorFromMesh;
|
|
47
|
+
private ensureAppearanceSampled;
|
|
48
|
+
private applyColorToCategory;
|
|
49
|
+
getHairAppearance(): HairAppearanceState;
|
|
50
|
+
setHairColor(color: HairColorAppearance | string): void;
|
|
51
|
+
setEyebrowColor(color: HairColorAppearance | string): void;
|
|
52
|
+
setHairBaseColor(baseColor: string): void;
|
|
53
|
+
setEyebrowBaseColor(baseColor: string): void;
|
|
54
|
+
setHairGlow(emissive: string, intensity: number): void;
|
|
55
|
+
setEyebrowGlow(emissive: string, intensity: number): void;
|
|
56
|
+
setHairOutline(outline: {
|
|
57
|
+
show: boolean;
|
|
58
|
+
color?: string;
|
|
59
|
+
opacity?: number;
|
|
60
|
+
}): void;
|
|
61
|
+
clearRegisteredHairObjects(): void;
|
|
62
|
+
registerHairObjects(objects: Object3D[]): Array<{
|
|
63
|
+
name: string;
|
|
64
|
+
isMesh: boolean;
|
|
65
|
+
isEyebrow: boolean;
|
|
66
|
+
}>;
|
|
67
|
+
autoRegisterHairMesh(mesh: Mesh, category: 'hair' | 'eyebrow'): void;
|
|
68
|
+
getRegisteredHairObjects(): Mesh[];
|
|
69
|
+
setHairPhysicsEnabled(enabled: boolean): void;
|
|
70
|
+
isHairPhysicsEnabled(): boolean;
|
|
71
|
+
setHairPhysicsProfileConfig(hairConfig?: HairPhysicsProfileConfig): void;
|
|
72
|
+
setHairPhysicsConfig(config: HairPhysicsConfigUpdate): void;
|
|
73
|
+
getHairPhysicsConfig(): HairPhysicsConfig;
|
|
74
|
+
validateHairMorphTargets(): string[];
|
|
75
|
+
update(dtSeconds: number): void;
|
|
76
|
+
onHeadRotationChanged(yaw: number, pitch: number): void;
|
|
77
|
+
getHairMorphTargets(meshName?: string): string[];
|
|
78
|
+
private collectConfiguredMorphKeys;
|
|
79
|
+
private collectAvailableHairMorphKeys;
|
|
80
|
+
private warnMissingHairMorphTargets;
|
|
81
|
+
setMorphOnMeshes(meshNames: string[], morphKey: string, value: number): void;
|
|
82
|
+
applyHairStateToObject(objectName: string, state: {
|
|
83
|
+
color?: {
|
|
84
|
+
baseColor: string;
|
|
85
|
+
emissive: string;
|
|
86
|
+
emissiveIntensity: number;
|
|
87
|
+
};
|
|
88
|
+
outline?: {
|
|
89
|
+
show: boolean;
|
|
90
|
+
color: string;
|
|
91
|
+
opacity: number;
|
|
92
|
+
};
|
|
93
|
+
visible?: boolean;
|
|
94
|
+
scale?: {
|
|
95
|
+
x: number;
|
|
96
|
+
y: number;
|
|
97
|
+
z: number;
|
|
98
|
+
};
|
|
99
|
+
position?: {
|
|
100
|
+
x: number;
|
|
101
|
+
y: number;
|
|
102
|
+
z: number;
|
|
103
|
+
};
|
|
104
|
+
isEyebrow?: boolean;
|
|
105
|
+
}): void;
|
|
106
|
+
private getHairMeshNames;
|
|
107
|
+
refreshMeshSelection(): void;
|
|
108
|
+
private supportsMixerClips;
|
|
109
|
+
private startIdleClip;
|
|
110
|
+
private startGravityClip;
|
|
111
|
+
private stopIdleClip;
|
|
112
|
+
private stopGravityClip;
|
|
113
|
+
private buildImpulseClips;
|
|
114
|
+
private stopImpulseClips;
|
|
115
|
+
private clearImpulseTimers;
|
|
116
|
+
private triggerHeadImpulse;
|
|
117
|
+
private updateGravityFromHeadPitch;
|
|
118
|
+
private playImpulseClip;
|
|
119
|
+
private fadeImpulseClip;
|
|
120
|
+
private buildIdleWindCurves;
|
|
121
|
+
private buildImpulseCurves;
|
|
122
|
+
private buildGravityCurves;
|
|
123
|
+
private hairCurveConfigJson;
|
|
124
|
+
}
|