@convai/web-sdk 0.3.1-beta.3 → 0.3.2-beta.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/README.md +535 -1077
- package/dist/core/AudioManager.d.ts.map +1 -0
- package/dist/core/AudioManager.js +262 -0
- package/dist/core/AudioManager.js.map +1 -0
- package/dist/core/BlendshapeQueue.d.ts +112 -0
- package/dist/core/BlendshapeQueue.d.ts.map +1 -0
- package/dist/core/BlendshapeQueue.js +172 -0
- package/dist/core/BlendshapeQueue.js.map +1 -0
- package/dist/{types/core → core}/ConvaiClient.d.ts +5 -15
- package/dist/core/ConvaiClient.d.ts.map +1 -0
- package/dist/core/ConvaiClient.js +602 -0
- package/dist/core/ConvaiClient.js.map +1 -0
- package/dist/core/EventEmitter.d.ts.map +1 -0
- package/dist/core/EventEmitter.js +68 -0
- package/dist/core/EventEmitter.js.map +1 -0
- package/dist/{types/core → core}/MessageHandler.d.ts +7 -0
- package/dist/core/MessageHandler.d.ts.map +1 -0
- package/dist/core/MessageHandler.js +332 -0
- package/dist/core/MessageHandler.js.map +1 -0
- package/dist/core/ScreenShareManager.d.ts.map +1 -0
- package/dist/core/ScreenShareManager.js +207 -0
- package/dist/core/ScreenShareManager.js.map +1 -0
- package/dist/core/VideoManager.d.ts.map +1 -0
- package/dist/core/VideoManager.js +205 -0
- package/dist/core/VideoManager.js.map +1 -0
- package/dist/{types/core → core}/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +14 -1970
- package/dist/core/index.js.map +1 -0
- package/dist/{types/core → core}/types.d.ts +9 -23
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/dev.d.ts +12 -0
- package/dist/dev.d.ts.map +1 -0
- package/dist/dev.js +12 -0
- package/dist/dev.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/lipsync-helpers/arkitOrder61.d.ts.map +1 -0
- package/dist/lipsync-helpers/arkitOrder61.js +287 -0
- package/dist/lipsync-helpers/arkitOrder61.js.map +1 -0
- package/dist/lipsync-helpers/createBlendshapeQueue.d.ts +86 -0
- package/dist/lipsync-helpers/createBlendshapeQueue.d.ts.map +1 -0
- package/dist/lipsync-helpers/createBlendshapeQueue.js +126 -0
- package/dist/lipsync-helpers/createBlendshapeQueue.js.map +1 -0
- package/dist/lipsync-helpers/declarativeMapping.d.ts +93 -0
- package/dist/lipsync-helpers/declarativeMapping.d.ts.map +1 -0
- package/dist/lipsync-helpers/declarativeMapping.js +228 -0
- package/dist/lipsync-helpers/declarativeMapping.js.map +1 -0
- package/dist/lipsync-helpers/index.d.ts +15 -0
- package/dist/lipsync-helpers/index.d.ts.map +1 -0
- package/dist/lipsync-helpers/index.js +31 -1164
- package/dist/lipsync-helpers/index.js.map +1 -0
- package/dist/lipsync-helpers/mappingTypes.d.ts +64 -0
- package/dist/lipsync-helpers/mappingTypes.d.ts.map +1 -0
- package/dist/lipsync-helpers/mappingTypes.js +28 -0
- package/dist/lipsync-helpers/mappingTypes.js.map +1 -0
- package/dist/lipsync-helpers/metahumanOrder251.d.ts +115 -0
- package/dist/lipsync-helpers/metahumanOrder251.d.ts.map +1 -0
- package/dist/lipsync-helpers/metahumanOrder251.js +432 -0
- package/dist/lipsync-helpers/metahumanOrder251.js.map +1 -0
- package/dist/lipsync-helpers/presetMappers.d.ts +24 -0
- package/dist/lipsync-helpers/presetMappers.d.ts.map +1 -0
- package/dist/lipsync-helpers/presetMappers.js +38 -0
- package/dist/lipsync-helpers/presetMappers.js.map +1 -0
- package/dist/react/components/ConvaiWidget.d.ts +68 -0
- package/dist/react/components/ConvaiWidget.d.ts.map +1 -0
- package/dist/react/components/ConvaiWidget.js +505 -0
- package/dist/react/components/ConvaiWidget.js.map +1 -0
- package/dist/react/components/index.d.ts +2 -0
- package/dist/react/components/index.d.ts.map +1 -0
- package/dist/react/components/index.js +3 -0
- package/dist/react/components/index.js.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +10 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +316 -0
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts +36 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js +259 -0
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +1 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.d.ts +10 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.js +14 -0
- package/dist/react/components/rtc-widget/components/ConviMessage.js.map +1 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +9 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.js +122 -0
- package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +7 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +68 -0
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.d.ts +10 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.js +23 -0
- package/dist/react/components/rtc-widget/components/MessageBubble.js.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageList.d.ts +11 -0
- package/dist/react/components/rtc-widget/components/MessageList.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/MessageList.js +89 -0
- package/dist/react/components/rtc-widget/components/MessageList.js.map +1 -0
- package/dist/react/components/rtc-widget/components/UserMessage.d.ts +9 -0
- package/dist/react/components/rtc-widget/components/UserMessage.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/UserMessage.js +15 -0
- package/dist/react/components/rtc-widget/components/UserMessage.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +6 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +15 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +25 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +172 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +17 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +66 -0
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +12 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +68 -0
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +12 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +255 -0
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +6 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.js +6 -0
- package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +1 -0
- package/dist/react/components/rtc-widget/components/index.d.ts +9 -0
- package/dist/react/components/rtc-widget/components/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/components/index.js +15 -0
- package/dist/react/components/rtc-widget/components/index.js.map +1 -0
- package/dist/react/components/rtc-widget/index.d.ts +6 -0
- package/dist/react/components/rtc-widget/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/index.js +9 -0
- package/dist/react/components/rtc-widget/index.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.d.ts +116 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.js +73 -0
- package/dist/react/components/rtc-widget/styles/framerConfig.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/icons.d.ts +28 -0
- package/dist/react/components/rtc-widget/styles/icons.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/icons.js +257 -0
- package/dist/react/components/rtc-widget/styles/icons.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/index.d.ts +6 -0
- package/dist/react/components/rtc-widget/styles/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/index.js +9 -0
- package/dist/react/components/rtc-widget/styles/index.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.d.ts +90 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.js +663 -0
- package/dist/react/components/rtc-widget/styles/styledComponents.js.map +1 -0
- package/dist/react/components/rtc-widget/styles/theme.d.ts +188 -0
- package/dist/react/components/rtc-widget/styles/theme.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/styles/theme.js +290 -0
- package/dist/react/components/rtc-widget/styles/theme.js.map +1 -0
- package/dist/react/components/rtc-widget/types/index.d.ts +60 -0
- package/dist/react/components/rtc-widget/types/index.d.ts.map +1 -0
- package/dist/react/components/rtc-widget/types/index.js +2 -0
- package/dist/react/components/rtc-widget/types/index.js.map +1 -0
- package/dist/react/hooks/index.d.ts +4 -0
- package/dist/react/hooks/index.d.ts.map +1 -0
- package/dist/react/hooks/index.js +6 -0
- package/dist/react/hooks/index.js.map +1 -0
- package/dist/react/hooks/useCharacterInfo.d.ts +17 -0
- package/dist/react/hooks/useCharacterInfo.d.ts.map +1 -0
- package/dist/react/hooks/useCharacterInfo.js +60 -0
- package/dist/react/hooks/useCharacterInfo.js.map +1 -0
- package/dist/react/hooks/useConvaiClient.d.ts +35 -0
- package/dist/react/hooks/useConvaiClient.d.ts.map +1 -0
- package/dist/react/hooks/useConvaiClient.js +179 -0
- package/dist/react/hooks/useConvaiClient.js.map +1 -0
- package/dist/react/hooks/useLocalCameraTrack.d.ts +22 -0
- package/dist/react/hooks/useLocalCameraTrack.d.ts.map +1 -0
- package/dist/react/hooks/useLocalCameraTrack.js +34 -0
- package/dist/react/hooks/useLocalCameraTrack.js.map +1 -0
- package/dist/react/index.d.ts +7 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +13 -0
- package/dist/react/index.js.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/LatencyMonitor.d.ts.map +1 -0
- package/dist/utils/LatencyMonitor.js +136 -0
- package/dist/utils/LatencyMonitor.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +96 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/speakerManagement.d.ts.map +1 -0
- package/dist/utils/speakerManagement.js +64 -0
- package/dist/utils/speakerManagement.js.map +1 -0
- package/dist/{types/vanilla → vanilla}/AudioRenderer.d.ts +5 -0
- package/dist/vanilla/AudioRenderer.d.ts.map +1 -0
- package/dist/vanilla/AudioRenderer.js +135 -0
- package/dist/vanilla/AudioRenderer.js.map +1 -0
- package/dist/{types/vanilla → vanilla}/ConvaiWidget.d.ts +13 -6
- package/dist/vanilla/ConvaiWidget.d.ts.map +1 -0
- package/dist/vanilla/ConvaiWidget.js +1823 -0
- package/dist/vanilla/ConvaiWidget.js.map +1 -0
- package/dist/vanilla/icons.d.ts.map +1 -0
- package/dist/vanilla/icons.js +222 -0
- package/dist/vanilla/icons.js.map +1 -0
- package/dist/{types/vanilla → vanilla}/index.d.ts +1 -3
- package/dist/vanilla/index.d.ts.map +1 -0
- package/dist/vanilla/index.js +20 -5509
- package/dist/vanilla/index.js.map +1 -0
- package/dist/vanilla/styles.d.ts.map +1 -0
- package/dist/vanilla/styles.js +287 -0
- package/dist/vanilla/styles.js.map +1 -0
- package/dist/vanilla/types.d.ts +63 -0
- package/dist/vanilla/types.d.ts.map +1 -0
- package/dist/vanilla/types.js +2 -0
- package/dist/vanilla/types.js.map +1 -0
- package/package.json +33 -38
- package/CHANGELOG.md +0 -165
- package/dist/core/index.cjs +0 -1977
- package/dist/lipsync-helpers/index.cjs +0 -1195
- package/dist/types/core/AudioManager.d.ts.map +0 -1
- package/dist/types/core/ConvaiClient.d.ts.map +0 -1
- package/dist/types/core/EventEmitter.d.ts.map +0 -1
- package/dist/types/core/MessageHandler.d.ts.map +0 -1
- package/dist/types/core/ScreenShareManager.d.ts.map +0 -1
- package/dist/types/core/VideoManager.d.ts.map +0 -1
- package/dist/types/core/index.d.ts.map +0 -1
- package/dist/types/core/types.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitBlendshapeHelpers.d.ts +0 -80
- package/dist/types/lipsync-helpers/arkitBlendshapeHelpers.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitOrder61.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/arkitPhonemeReference.d.ts +0 -155
- package/dist/types/lipsync-helpers/arkitPhonemeReference.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/index.d.ts +0 -9
- package/dist/types/lipsync-helpers/index.d.ts.map +0 -1
- package/dist/types/lipsync-helpers/neurosyncBlendshapeMapper.d.ts +0 -30
- package/dist/types/lipsync-helpers/neurosyncBlendshapeMapper.d.ts.map +0 -1
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/utils/LatencyMonitor.d.ts.map +0 -1
- package/dist/types/utils/logger.d.ts.map +0 -1
- package/dist/types/utils/speakerManagement.d.ts.map +0 -1
- package/dist/types/vanilla/AudioRenderer.d.ts.map +0 -1
- package/dist/types/vanilla/ConvaiWidget.d.ts.map +0 -1
- package/dist/types/vanilla/icons.d.ts.map +0 -1
- package/dist/types/vanilla/index.d.ts.map +0 -1
- package/dist/types/vanilla/styles.d.ts.map +0 -1
- package/dist/types/vanilla/types.d.ts +0 -106
- package/dist/types/vanilla/types.d.ts.map +0 -1
- package/dist/umd/convai.umd.js +0 -1
- package/dist/vanilla/index.cjs +0 -5559
- /package/dist/{types/core → core}/AudioManager.d.ts +0 -0
- /package/dist/{types/core → core}/EventEmitter.d.ts +0 -0
- /package/dist/{types/core → core}/ScreenShareManager.d.ts +0 -0
- /package/dist/{types/core → core}/VideoManager.d.ts +0 -0
- /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitOrder61.d.ts +0 -0
- /package/dist/types/{types/index.d.ts → index.d.ts} +0 -0
- /package/dist/{types/utils → utils}/LatencyMonitor.d.ts +0 -0
- /package/dist/{types/utils → utils}/logger.d.ts +0 -0
- /package/dist/{types/utils → utils}/speakerManagement.d.ts +0 -0
- /package/dist/{types/vanilla → vanilla}/icons.d.ts +0 -0
- /package/dist/{types/vanilla → vanilla}/styles.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lipsync-helpers/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+EAA+E;AAC/E,iEAAiE;AACjE,+EAA+E;AAE/E,OAAO;AACL,+BAA+B;AAC/B,cAAc;AAEd,kCAAkC;AAClC,oBAAoB;AAEpB,mBAAmB;AACnB,wBAAwB,EACxB,iBAAiB,EACjB,6BAA6B,EAC7B,eAAe,EACf,eAAe,EACf,2BAA2B,EAC3B,+BAA+B,EAC/B,uBAAuB,GACxB,MAAM,gBAAgB,CAAC;AAExB,+EAA+E;AAC/E,wDAAwD;AACxD,+EAA+E;AAE/E,OAAO;AACL,oCAAoC;AACpC,mBAAmB;AAEnB,qBAAqB;AACrB,oBAAoB;AAEpB,0BAA0B;AAC1B,qBAAqB;AAErB,mBAAmB;AACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,iCAAiC,EACjC,oCAAoC,GACrC,MAAM,qBAAqB,CAAC;AAY7B,OAAO,EACL,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,cAAc,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,yBAAyB,CAAC;AAWjC,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blendshape Mapping Types
|
|
3
|
+
*
|
|
4
|
+
* Defines interfaces and types for mapping server blendshape data
|
|
5
|
+
* to various target formats (ARKit, MetaHuman, custom rigs, etc.)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Function that maps an input blendshape array to an output format
|
|
9
|
+
* @param input - Raw blendshape data from server
|
|
10
|
+
* @returns Mapped blendshape array in target format
|
|
11
|
+
*/
|
|
12
|
+
export type BlendshapeMapper = (input: number[] | Float32Array) => Float32Array;
|
|
13
|
+
/**
|
|
14
|
+
* Blendshape format types
|
|
15
|
+
* - arkit: 61-element ARKit format (52 blendshapes + 9 rotation values)
|
|
16
|
+
* - mha: 251-element MetaHuman format (CTRL_expressions_*)
|
|
17
|
+
* - custom: User-defined format with custom mapper
|
|
18
|
+
*/
|
|
19
|
+
export type BlendshapeFormat = 'arkit' | 'mha' | 'custom';
|
|
20
|
+
/**
|
|
21
|
+
* Configuration for blendshape mapping
|
|
22
|
+
*/
|
|
23
|
+
export interface BlendshapeMappingConfig {
|
|
24
|
+
/**
|
|
25
|
+
* Input format from server
|
|
26
|
+
* - arkit: Server sends 61-element array
|
|
27
|
+
* - mha: Server sends 251-element array
|
|
28
|
+
*/
|
|
29
|
+
inputFormat: BlendshapeFormat;
|
|
30
|
+
/**
|
|
31
|
+
* Output format for application
|
|
32
|
+
* - arkit: Map to 61-element ARKit format
|
|
33
|
+
* - mha: Map to 251-element MetaHuman format
|
|
34
|
+
* - custom: Use custom mapper function
|
|
35
|
+
*/
|
|
36
|
+
outputFormat: BlendshapeFormat;
|
|
37
|
+
/**
|
|
38
|
+
* Custom mapper function (required if inputFormat or outputFormat is 'custom')
|
|
39
|
+
* Takes raw server data and returns mapped blendshapes
|
|
40
|
+
*/
|
|
41
|
+
mapper?: BlendshapeMapper;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Preset mapping configurations
|
|
45
|
+
*/
|
|
46
|
+
export declare const PRESET_MAPPINGS: {
|
|
47
|
+
/**
|
|
48
|
+
* ARKit passthrough - no mapping needed
|
|
49
|
+
* Server sends 61 elements, output 61 elements
|
|
50
|
+
*/
|
|
51
|
+
readonly ARKIT_PASSTHROUGH: {
|
|
52
|
+
readonly inputFormat: "arkit";
|
|
53
|
+
readonly outputFormat: "arkit";
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* MetaHuman passthrough - no mapping needed
|
|
57
|
+
* Server sends 251 elements, output 251 elements
|
|
58
|
+
*/
|
|
59
|
+
readonly MHA_PASSTHROUGH: {
|
|
60
|
+
readonly inputFormat: "mha";
|
|
61
|
+
readonly outputFormat: "mha";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=mappingTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappingTypes.d.ts","sourceRoot":"","sources":["../../src/lipsync-helpers/mappingTypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY,KAAK,YAAY,CAAC;AAEhF;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,WAAW,EAAE,gBAAgB,CAAC;IAE9B;;;;;OAKG;IACH,YAAY,EAAE,gBAAgB,CAAC;IAE/B;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B;;;OAGG;;;;;IAMH;;;OAGG;;;;;CAKK,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blendshape Mapping Types
|
|
3
|
+
*
|
|
4
|
+
* Defines interfaces and types for mapping server blendshape data
|
|
5
|
+
* to various target formats (ARKit, MetaHuman, custom rigs, etc.)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Preset mapping configurations
|
|
9
|
+
*/
|
|
10
|
+
export const PRESET_MAPPINGS = {
|
|
11
|
+
/**
|
|
12
|
+
* ARKit passthrough - no mapping needed
|
|
13
|
+
* Server sends 61 elements, output 61 elements
|
|
14
|
+
*/
|
|
15
|
+
ARKIT_PASSTHROUGH: {
|
|
16
|
+
inputFormat: 'arkit',
|
|
17
|
+
outputFormat: 'arkit',
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* MetaHuman passthrough - no mapping needed
|
|
21
|
+
* Server sends 251 elements, output 251 elements
|
|
22
|
+
*/
|
|
23
|
+
MHA_PASSTHROUGH: {
|
|
24
|
+
inputFormat: 'mha',
|
|
25
|
+
outputFormat: 'mha',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=mappingTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappingTypes.js","sourceRoot":"","sources":["../../src/lipsync-helpers/mappingTypes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2CH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;;;OAGG;IACH,iBAAiB,EAAE;QACjB,WAAW,EAAE,OAAgB;QAC7B,YAAY,EAAE,OAAgB;KAC/B;IAED;;;OAGG;IACH,eAAe,EAAE;QACf,WAAW,EAAE,KAAc;QAC3B,YAAY,EAAE,KAAc;KAC7B;CACO,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MetaHuman 251-Element Blendshape Order
|
|
3
|
+
*
|
|
4
|
+
* This is the standard format sent by Convai's MetaHuman blendshape provider.
|
|
5
|
+
* The server sends 251 CTRL_expressions_* values in this specific order.
|
|
6
|
+
*
|
|
7
|
+
* Based on Unreal Engine MetaHuman Control Rig specification.
|
|
8
|
+
*
|
|
9
|
+
* Source: UConvaiNeuroSyncComponent::CtrlExpressionNames[251]
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* MetaHuman 251-element blendshape names (CTRL_expressions_*)
|
|
13
|
+
* This is the order in which blendshapes are received from the server
|
|
14
|
+
*/
|
|
15
|
+
export declare const METAHUMAN_ORDER_251: readonly string[];
|
|
16
|
+
/**
|
|
17
|
+
* Category breakdown for MetaHuman blendshapes
|
|
18
|
+
*/
|
|
19
|
+
export declare const METAHUMAN_CATEGORIES: {
|
|
20
|
+
brows: {
|
|
21
|
+
start: number;
|
|
22
|
+
end: number;
|
|
23
|
+
count: number;
|
|
24
|
+
};
|
|
25
|
+
ears: {
|
|
26
|
+
start: number;
|
|
27
|
+
end: number;
|
|
28
|
+
count: number;
|
|
29
|
+
};
|
|
30
|
+
eyes: {
|
|
31
|
+
start: number;
|
|
32
|
+
end: number;
|
|
33
|
+
count: number;
|
|
34
|
+
};
|
|
35
|
+
eyelashes: {
|
|
36
|
+
start: number;
|
|
37
|
+
end: number;
|
|
38
|
+
count: number;
|
|
39
|
+
};
|
|
40
|
+
jaw: {
|
|
41
|
+
start: number;
|
|
42
|
+
end: number;
|
|
43
|
+
count: number;
|
|
44
|
+
};
|
|
45
|
+
mouth: {
|
|
46
|
+
start: number;
|
|
47
|
+
end: number;
|
|
48
|
+
count: number;
|
|
49
|
+
};
|
|
50
|
+
neck: {
|
|
51
|
+
start: number;
|
|
52
|
+
end: number;
|
|
53
|
+
count: number;
|
|
54
|
+
};
|
|
55
|
+
nose: {
|
|
56
|
+
start: number;
|
|
57
|
+
end: number;
|
|
58
|
+
count: number;
|
|
59
|
+
};
|
|
60
|
+
teeth: {
|
|
61
|
+
start: number;
|
|
62
|
+
end: number;
|
|
63
|
+
count: number;
|
|
64
|
+
};
|
|
65
|
+
tongue: {
|
|
66
|
+
start: number;
|
|
67
|
+
end: number;
|
|
68
|
+
count: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Key blendshapes for lip-sync (most important for speech animation)
|
|
73
|
+
*/
|
|
74
|
+
export declare const KEY_METAHUMAN_LIPSYNC: {
|
|
75
|
+
EYE_BLINK_L: number;
|
|
76
|
+
EYE_BLINK_R: number;
|
|
77
|
+
JAW_FORWARD: number;
|
|
78
|
+
JAW_LEFT: number;
|
|
79
|
+
JAW_OPEN: number;
|
|
80
|
+
JAW_RIGHT: number;
|
|
81
|
+
MOUTH_FUNNEL_DL: number;
|
|
82
|
+
MOUTH_FUNNEL_DR: number;
|
|
83
|
+
MOUTH_FUNNEL_UL: number;
|
|
84
|
+
MOUTH_FUNNEL_UR: number;
|
|
85
|
+
MOUTH_LEFT: number;
|
|
86
|
+
MOUTH_RIGHT: number;
|
|
87
|
+
MOUTH_STRETCH_L: number;
|
|
88
|
+
MOUTH_STRETCH_R: number;
|
|
89
|
+
MOUTH_LIPS_TOGETHER_DL: number;
|
|
90
|
+
MOUTH_LIPS_TOGETHER_DR: number;
|
|
91
|
+
MOUTH_LIPS_TOGETHER_UL: number;
|
|
92
|
+
MOUTH_LIPS_TOGETHER_UR: number;
|
|
93
|
+
TONGUE_OUT: number;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Get blendshape name by index
|
|
97
|
+
*/
|
|
98
|
+
export declare function getMetaHumanBlendshapeName(index: number): string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Get blendshape index by name
|
|
101
|
+
*/
|
|
102
|
+
export declare function getMetaHumanBlendshapeIndex(name: string): number;
|
|
103
|
+
/**
|
|
104
|
+
* Get blendshapes by category
|
|
105
|
+
*/
|
|
106
|
+
export declare function getMetaHumanBlendshapesByCategory(category: keyof typeof METAHUMAN_CATEGORIES): readonly string[];
|
|
107
|
+
/**
|
|
108
|
+
* Format MetaHuman blendshapes for logging
|
|
109
|
+
*/
|
|
110
|
+
export declare function formatMetaHumanBlendshapesForLogging(values: number[] | Float32Array, threshold?: number, maxEntries?: number): {
|
|
111
|
+
active: Record<string, number>;
|
|
112
|
+
total: number;
|
|
113
|
+
activeCount: number;
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=metahumanOrder251.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metahumanOrder251.d.ts","sourceRoot":"","sources":["../../src/lipsync-helpers/metahumanOrder251.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAmSvC,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;CAiCjC,CAAC;AAEF;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE5E;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhE;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAAC,QAAQ,EAAE,MAAM,OAAO,oBAAoB,GAAG,SAAS,MAAM,EAAE,CAGhH;AAED;;GAEG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,MAAM,EAAE,GAAG,YAAY,EAC/B,SAAS,GAAE,MAAa,EACxB,UAAU,GAAE,MAAW,GACtB;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB,CA4BA"}
|
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MetaHuman 251-Element Blendshape Order
|
|
3
|
+
*
|
|
4
|
+
* This is the standard format sent by Convai's MetaHuman blendshape provider.
|
|
5
|
+
* The server sends 251 CTRL_expressions_* values in this specific order.
|
|
6
|
+
*
|
|
7
|
+
* Based on Unreal Engine MetaHuman Control Rig specification.
|
|
8
|
+
*
|
|
9
|
+
* Source: UConvaiNeuroSyncComponent::CtrlExpressionNames[251]
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* MetaHuman 251-element blendshape names (CTRL_expressions_*)
|
|
13
|
+
* This is the order in which blendshapes are received from the server
|
|
14
|
+
*/
|
|
15
|
+
export const METAHUMAN_ORDER_251 = [
|
|
16
|
+
// ============================================================================
|
|
17
|
+
// BROWS (8 blendshapes)
|
|
18
|
+
// ============================================================================
|
|
19
|
+
"CTRL_expressions_browDownL", // 0
|
|
20
|
+
"CTRL_expressions_browDownR", // 1
|
|
21
|
+
"CTRL_expressions_browLateralL", // 2
|
|
22
|
+
"CTRL_expressions_browLateralR", // 3
|
|
23
|
+
"CTRL_expressions_browRaiseInL", // 4
|
|
24
|
+
"CTRL_expressions_browRaiseInR", // 5
|
|
25
|
+
"CTRL_expressions_browRaiseOuterL", // 6
|
|
26
|
+
"CTRL_expressions_browRaiseOuterR", // 7
|
|
27
|
+
// ============================================================================
|
|
28
|
+
// EARS (2 blendshapes)
|
|
29
|
+
// ============================================================================
|
|
30
|
+
"CTRL_expressions_earUpL", // 8
|
|
31
|
+
"CTRL_expressions_earUpR", // 9
|
|
32
|
+
// ============================================================================
|
|
33
|
+
// EYES (43 blendshapes)
|
|
34
|
+
// ============================================================================
|
|
35
|
+
"CTRL_expressions_eyeBlinkL", // 10 - 🔑 KEY
|
|
36
|
+
"CTRL_expressions_eyeBlinkR", // 11 - 🔑 KEY
|
|
37
|
+
"CTRL_expressions_eyeCheekRaiseL", // 12
|
|
38
|
+
"CTRL_expressions_eyeCheekRaiseR", // 13
|
|
39
|
+
"CTRL_expressions_eyeFaceScrunchL", // 14
|
|
40
|
+
"CTRL_expressions_eyeFaceScrunchR", // 15
|
|
41
|
+
"CTRL_expressions_eyeLidPressL", // 16
|
|
42
|
+
"CTRL_expressions_eyeLidPressR", // 17
|
|
43
|
+
"CTRL_expressions_eyeLookDownL", // 18 - 🔑 KEY
|
|
44
|
+
"CTRL_expressions_eyeLookDownR", // 19 - 🔑 KEY
|
|
45
|
+
"CTRL_expressions_eyeLookLeftL", // 20 - 🔑 KEY
|
|
46
|
+
"CTRL_expressions_eyeLookLeftR", // 21 - 🔑 KEY
|
|
47
|
+
"CTRL_expressions_eyeLookRightL", // 22 - 🔑 KEY
|
|
48
|
+
"CTRL_expressions_eyeLookRightR", // 23 - 🔑 KEY
|
|
49
|
+
"CTRL_expressions_eyeLookUpL", // 24 - 🔑 KEY
|
|
50
|
+
"CTRL_expressions_eyeLookUpR", // 25 - 🔑 KEY
|
|
51
|
+
"CTRL_expressions_eyeLowerLidDownL", // 26
|
|
52
|
+
"CTRL_expressions_eyeLowerLidDownR", // 27
|
|
53
|
+
"CTRL_expressions_eyeLowerLidUpL", // 28
|
|
54
|
+
"CTRL_expressions_eyeLowerLidUpR", // 29
|
|
55
|
+
"CTRL_expressions_eyeParallelLookDirection", // 30
|
|
56
|
+
"CTRL_expressions_eyePupilNarrowL", // 31
|
|
57
|
+
"CTRL_expressions_eyePupilNarrowR", // 32
|
|
58
|
+
"CTRL_expressions_eyePupilWideL", // 33
|
|
59
|
+
"CTRL_expressions_eyePupilWideR", // 34
|
|
60
|
+
"CTRL_expressions_eyeRelaxL", // 35
|
|
61
|
+
"CTRL_expressions_eyeRelaxR", // 36
|
|
62
|
+
"CTRL_expressions_eyeSquintInnerL", // 37 - 🔑 KEY
|
|
63
|
+
"CTRL_expressions_eyeSquintInnerR", // 38 - 🔑 KEY
|
|
64
|
+
"CTRL_expressions_eyeUpperLidUpL", // 39
|
|
65
|
+
"CTRL_expressions_eyeUpperLidUpR", // 40
|
|
66
|
+
"CTRL_expressions_eyeWidenL", // 41 - 🔑 KEY
|
|
67
|
+
"CTRL_expressions_eyeWidenR", // 42 - 🔑 KEY
|
|
68
|
+
// ============================================================================
|
|
69
|
+
// EYELASHES (8 blendshapes)
|
|
70
|
+
// ============================================================================
|
|
71
|
+
"CTRL_expressions_eyelashesDownINL", // 43
|
|
72
|
+
"CTRL_expressions_eyelashesDownINR", // 44
|
|
73
|
+
"CTRL_expressions_eyelashesDownOUTL", // 45
|
|
74
|
+
"CTRL_expressions_eyelashesDownOUTR", // 46
|
|
75
|
+
"CTRL_expressions_eyelashesUpINL", // 47
|
|
76
|
+
"CTRL_expressions_eyelashesUpINR", // 48
|
|
77
|
+
"CTRL_expressions_eyelashesUpOUTL", // 49
|
|
78
|
+
"CTRL_expressions_eyelashesUpOUTR", // 50
|
|
79
|
+
// ============================================================================
|
|
80
|
+
// JAW (13 blendshapes)
|
|
81
|
+
// ============================================================================
|
|
82
|
+
"CTRL_expressions_jawBack", // 51
|
|
83
|
+
"CTRL_expressions_jawChinCompressL", // 52
|
|
84
|
+
"CTRL_expressions_jawChinCompressR", // 53
|
|
85
|
+
"CTRL_expressions_jawChinRaiseDL", // 54
|
|
86
|
+
"CTRL_expressions_jawChinRaiseDR", // 55
|
|
87
|
+
"CTRL_expressions_jawChinRaiseUL", // 56
|
|
88
|
+
"CTRL_expressions_jawChinRaiseUR", // 57
|
|
89
|
+
"CTRL_expressions_jawClenchL", // 58
|
|
90
|
+
"CTRL_expressions_jawClenchR", // 59
|
|
91
|
+
"CTRL_expressions_jawFwd", // 60 - 🔑 KEY
|
|
92
|
+
"CTRL_expressions_jawLeft", // 61 - 🔑 KEY
|
|
93
|
+
"CTRL_expressions_jawOpen", // 62 - 🔑 KEY (most important!)
|
|
94
|
+
"CTRL_expressions_jawOpenExtreme", // 63
|
|
95
|
+
"CTRL_expressions_jawRight", // 64 - 🔑 KEY
|
|
96
|
+
// ============================================================================
|
|
97
|
+
// MOUTH (133 blendshapes) - Most important for lipsync!
|
|
98
|
+
// ============================================================================
|
|
99
|
+
"CTRL_expressions_mouthCheekBlowL", // 65
|
|
100
|
+
"CTRL_expressions_mouthCheekBlowR", // 66
|
|
101
|
+
"CTRL_expressions_mouthCheekSuckL", // 67
|
|
102
|
+
"CTRL_expressions_mouthCheekSuckR", // 68
|
|
103
|
+
"CTRL_expressions_mouthCornerDepressL", // 69
|
|
104
|
+
"CTRL_expressions_mouthCornerDepressR", // 70
|
|
105
|
+
"CTRL_expressions_mouthCornerDownL", // 71
|
|
106
|
+
"CTRL_expressions_mouthCornerDownR", // 72
|
|
107
|
+
"CTRL_expressions_mouthCornerNarrowL", // 73
|
|
108
|
+
"CTRL_expressions_mouthCornerNarrowR", // 74
|
|
109
|
+
"CTRL_expressions_mouthCornerPullL", // 75
|
|
110
|
+
"CTRL_expressions_mouthCornerPullR", // 76
|
|
111
|
+
"CTRL_expressions_mouthCornerRounderDL", // 77
|
|
112
|
+
"CTRL_expressions_mouthCornerRounderDR", // 78
|
|
113
|
+
"CTRL_expressions_mouthCornerRounderUL", // 79
|
|
114
|
+
"CTRL_expressions_mouthCornerRounderUR", // 80
|
|
115
|
+
"CTRL_expressions_mouthCornerSharpenDL", // 81
|
|
116
|
+
"CTRL_expressions_mouthCornerSharpenDR", // 82
|
|
117
|
+
"CTRL_expressions_mouthCornerSharpenUL", // 83
|
|
118
|
+
"CTRL_expressions_mouthCornerSharpenUR", // 84
|
|
119
|
+
"CTRL_expressions_mouthCornerUpL", // 85
|
|
120
|
+
"CTRL_expressions_mouthCornerUpR", // 86
|
|
121
|
+
"CTRL_expressions_mouthCornerWideL", // 87
|
|
122
|
+
"CTRL_expressions_mouthCornerWideR", // 88
|
|
123
|
+
"CTRL_expressions_mouthDimpleL", // 89
|
|
124
|
+
"CTRL_expressions_mouthDimpleR", // 90
|
|
125
|
+
"CTRL_expressions_mouthDown", // 91
|
|
126
|
+
"CTRL_expressions_mouthFunnelDL", // 92 - 🔑 KEY
|
|
127
|
+
"CTRL_expressions_mouthFunnelDR", // 93 - 🔑 KEY
|
|
128
|
+
"CTRL_expressions_mouthFunnelUL", // 94 - 🔑 KEY
|
|
129
|
+
"CTRL_expressions_mouthFunnelUR", // 95 - 🔑 KEY
|
|
130
|
+
"CTRL_expressions_mouthLeft", // 96 - 🔑 KEY
|
|
131
|
+
"CTRL_expressions_mouthLipsBlowL", // 97
|
|
132
|
+
"CTRL_expressions_mouthLipsBlowR", // 98
|
|
133
|
+
"CTRL_expressions_mouthLipsPressL", // 99
|
|
134
|
+
"CTRL_expressions_mouthLipsPressR", // 100
|
|
135
|
+
"CTRL_expressions_mouthLipsPullDL", // 101
|
|
136
|
+
"CTRL_expressions_mouthLipsPullDR", // 102
|
|
137
|
+
"CTRL_expressions_mouthLipsPullUL", // 103
|
|
138
|
+
"CTRL_expressions_mouthLipsPullUR", // 104
|
|
139
|
+
"CTRL_expressions_mouthLipsPurseDL", // 105
|
|
140
|
+
"CTRL_expressions_mouthLipsPurseDR", // 106
|
|
141
|
+
"CTRL_expressions_mouthLipsPurseUL", // 107
|
|
142
|
+
"CTRL_expressions_mouthLipsPurseUR", // 108
|
|
143
|
+
"CTRL_expressions_mouthLipsPushDL", // 109
|
|
144
|
+
"CTRL_expressions_mouthLipsPushDR", // 110
|
|
145
|
+
"CTRL_expressions_mouthLipsPushUL", // 111
|
|
146
|
+
"CTRL_expressions_mouthLipsPushUR", // 112
|
|
147
|
+
"CTRL_expressions_mouthLipsStickyLPh1", // 113
|
|
148
|
+
"CTRL_expressions_mouthLipsStickyLPh2", // 114
|
|
149
|
+
"CTRL_expressions_mouthLipsStickyLPh3", // 115
|
|
150
|
+
"CTRL_expressions_mouthLipsStickyRPh1", // 116
|
|
151
|
+
"CTRL_expressions_mouthLipsStickyRPh2", // 117
|
|
152
|
+
"CTRL_expressions_mouthLipsStickyRPh3", // 118
|
|
153
|
+
"CTRL_expressions_mouthLipsThickDL", // 119
|
|
154
|
+
"CTRL_expressions_mouthLipsThickDR", // 120
|
|
155
|
+
"CTRL_expressions_mouthLipsThickInwardDL", // 121
|
|
156
|
+
"CTRL_expressions_mouthLipsThickInwardDR", // 122
|
|
157
|
+
"CTRL_expressions_mouthLipsThickInwardUL", // 123
|
|
158
|
+
"CTRL_expressions_mouthLipsThickInwardUR", // 124
|
|
159
|
+
"CTRL_expressions_mouthLipsThickUL", // 125
|
|
160
|
+
"CTRL_expressions_mouthLipsThickUR", // 126
|
|
161
|
+
"CTRL_expressions_mouthLipsThinDL", // 127
|
|
162
|
+
"CTRL_expressions_mouthLipsThinDR", // 128
|
|
163
|
+
"CTRL_expressions_mouthLipsThinInwardDL", // 129
|
|
164
|
+
"CTRL_expressions_mouthLipsThinInwardDR", // 130
|
|
165
|
+
"CTRL_expressions_mouthLipsThinInwardUL", // 131
|
|
166
|
+
"CTRL_expressions_mouthLipsThinInwardUR", // 132
|
|
167
|
+
"CTRL_expressions_mouthLipsThinUL", // 133
|
|
168
|
+
"CTRL_expressions_mouthLipsThinUR", // 134
|
|
169
|
+
"CTRL_expressions_mouthLipsTightenDL", // 135
|
|
170
|
+
"CTRL_expressions_mouthLipsTightenDR", // 136
|
|
171
|
+
"CTRL_expressions_mouthLipsTightenUL", // 137
|
|
172
|
+
"CTRL_expressions_mouthLipsTightenUR", // 138
|
|
173
|
+
"CTRL_expressions_mouthLipsTogetherDL", // 139 - 🔑 KEY
|
|
174
|
+
"CTRL_expressions_mouthLipsTogetherDR", // 140 - 🔑 KEY
|
|
175
|
+
"CTRL_expressions_mouthLipsTogetherUL", // 141 - 🔑 KEY
|
|
176
|
+
"CTRL_expressions_mouthLipsTogetherUR", // 142 - 🔑 KEY
|
|
177
|
+
"CTRL_expressions_mouthLipsTowardsDL", // 143
|
|
178
|
+
"CTRL_expressions_mouthLipsTowardsDR", // 144
|
|
179
|
+
"CTRL_expressions_mouthLipsTowardsUL", // 145
|
|
180
|
+
"CTRL_expressions_mouthLipsTowardsUR", // 146
|
|
181
|
+
"CTRL_expressions_mouthLowerLipBiteL", // 147
|
|
182
|
+
"CTRL_expressions_mouthLowerLipBiteR", // 148
|
|
183
|
+
"CTRL_expressions_mouthLowerLipDepressL", // 149
|
|
184
|
+
"CTRL_expressions_mouthLowerLipDepressR", // 150
|
|
185
|
+
"CTRL_expressions_mouthLowerLipRollInL", // 151
|
|
186
|
+
"CTRL_expressions_mouthLowerLipRollInR", // 152
|
|
187
|
+
"CTRL_expressions_mouthLowerLipRollOutL", // 153
|
|
188
|
+
"CTRL_expressions_mouthLowerLipRollOutR", // 154
|
|
189
|
+
"CTRL_expressions_mouthLowerLipShiftLeft", // 155
|
|
190
|
+
"CTRL_expressions_mouthLowerLipShiftRight", // 156
|
|
191
|
+
"CTRL_expressions_mouthLowerLipTowardsTeethL", // 157
|
|
192
|
+
"CTRL_expressions_mouthLowerLipTowardsTeethR", // 158
|
|
193
|
+
"CTRL_expressions_mouthPressDL", // 159
|
|
194
|
+
"CTRL_expressions_mouthPressDR", // 160
|
|
195
|
+
"CTRL_expressions_mouthPressUL", // 161
|
|
196
|
+
"CTRL_expressions_mouthPressUR", // 162
|
|
197
|
+
"CTRL_expressions_mouthRight", // 163 - 🔑 KEY
|
|
198
|
+
"CTRL_expressions_mouthSharpCornerPullL", // 164
|
|
199
|
+
"CTRL_expressions_mouthSharpCornerPullR", // 165
|
|
200
|
+
"CTRL_expressions_mouthStickyDC", // 166
|
|
201
|
+
"CTRL_expressions_mouthStickyDINL", // 167
|
|
202
|
+
"CTRL_expressions_mouthStickyDINR", // 168
|
|
203
|
+
"CTRL_expressions_mouthStickyDOUTL", // 169
|
|
204
|
+
"CTRL_expressions_mouthStickyDOUTR", // 170
|
|
205
|
+
"CTRL_expressions_mouthStickyUC", // 171
|
|
206
|
+
"CTRL_expressions_mouthStickyUINL", // 172
|
|
207
|
+
"CTRL_expressions_mouthStickyUINR", // 173
|
|
208
|
+
"CTRL_expressions_mouthStickyUOUTL", // 174
|
|
209
|
+
"CTRL_expressions_mouthStickyUOUTR", // 175
|
|
210
|
+
"CTRL_expressions_mouthStretchL", // 176 - 🔑 KEY
|
|
211
|
+
"CTRL_expressions_mouthStretchLipsCloseL", // 177
|
|
212
|
+
"CTRL_expressions_mouthStretchLipsCloseR", // 178
|
|
213
|
+
"CTRL_expressions_mouthStretchR", // 179 - 🔑 KEY
|
|
214
|
+
"CTRL_expressions_mouthUp", // 180
|
|
215
|
+
"CTRL_expressions_mouthUpperLipBiteL", // 181
|
|
216
|
+
"CTRL_expressions_mouthUpperLipBiteR", // 182
|
|
217
|
+
"CTRL_expressions_mouthUpperLipRaiseL", // 183
|
|
218
|
+
"CTRL_expressions_mouthUpperLipRaiseR", // 184
|
|
219
|
+
"CTRL_expressions_mouthUpperLipRollInL", // 185
|
|
220
|
+
"CTRL_expressions_mouthUpperLipRollInR", // 186
|
|
221
|
+
"CTRL_expressions_mouthUpperLipRollOutL", // 187
|
|
222
|
+
"CTRL_expressions_mouthUpperLipRollOutR", // 188
|
|
223
|
+
"CTRL_expressions_mouthUpperLipShiftLeft", // 189
|
|
224
|
+
"CTRL_expressions_mouthUpperLipShiftRight", // 190
|
|
225
|
+
"CTRL_expressions_mouthUpperLipTowardsTeethL", // 191
|
|
226
|
+
"CTRL_expressions_mouthUpperLipTowardsTeethR", // 192
|
|
227
|
+
// ============================================================================
|
|
228
|
+
// NECK (14 blendshapes)
|
|
229
|
+
// ============================================================================
|
|
230
|
+
"CTRL_expressions_neckDigastricDown", // 193
|
|
231
|
+
"CTRL_expressions_neckDigastricUp", // 194
|
|
232
|
+
"CTRL_expressions_neckMastoidContractL", // 195
|
|
233
|
+
"CTRL_expressions_neckMastoidContractR", // 196
|
|
234
|
+
"CTRL_expressions_neckStretchL", // 197
|
|
235
|
+
"CTRL_expressions_neckStretchR", // 198
|
|
236
|
+
"CTRL_expressions_neckSwallowPh1", // 199
|
|
237
|
+
"CTRL_expressions_neckSwallowPh2", // 200
|
|
238
|
+
"CTRL_expressions_neckSwallowPh3", // 201
|
|
239
|
+
"CTRL_expressions_neckSwallowPh4", // 202
|
|
240
|
+
"CTRL_expressions_neckThroatDown", // 203
|
|
241
|
+
"CTRL_expressions_neckThroatExhale", // 204
|
|
242
|
+
"CTRL_expressions_neckThroatInhale", // 205
|
|
243
|
+
"CTRL_expressions_neckThroatUp", // 206
|
|
244
|
+
// ============================================================================
|
|
245
|
+
// NOSE (10 blendshapes)
|
|
246
|
+
// ============================================================================
|
|
247
|
+
"CTRL_expressions_noseNasolabialDeepenL", // 207
|
|
248
|
+
"CTRL_expressions_noseNasolabialDeepenR", // 208
|
|
249
|
+
"CTRL_expressions_noseNostrilCompressL", // 209
|
|
250
|
+
"CTRL_expressions_noseNostrilCompressR", // 210
|
|
251
|
+
"CTRL_expressions_noseNostrilDepressL", // 211
|
|
252
|
+
"CTRL_expressions_noseNostrilDepressR", // 212
|
|
253
|
+
"CTRL_expressions_noseNostrilDilateL", // 213
|
|
254
|
+
"CTRL_expressions_noseNostrilDilateR", // 214
|
|
255
|
+
"CTRL_expressions_noseWrinkleL", // 215
|
|
256
|
+
"CTRL_expressions_noseWrinkleR", // 216
|
|
257
|
+
"CTRL_expressions_noseWrinkleUpperL", // 217
|
|
258
|
+
"CTRL_expressions_noseWrinkleUpperR", // 218
|
|
259
|
+
// ============================================================================
|
|
260
|
+
// TEETH (12 blendshapes)
|
|
261
|
+
// ============================================================================
|
|
262
|
+
"CTRL_expressions_teethBackD", // 219
|
|
263
|
+
"CTRL_expressions_teethBackU", // 220
|
|
264
|
+
"CTRL_expressions_teethDownD", // 221
|
|
265
|
+
"CTRL_expressions_teethDownU", // 222
|
|
266
|
+
"CTRL_expressions_teethFwdD", // 223
|
|
267
|
+
"CTRL_expressions_teethFwdU", // 224
|
|
268
|
+
"CTRL_expressions_teethLeftD", // 225
|
|
269
|
+
"CTRL_expressions_teethLeftU", // 226
|
|
270
|
+
"CTRL_expressions_teethRightD", // 227
|
|
271
|
+
"CTRL_expressions_teethRightU", // 228
|
|
272
|
+
"CTRL_expressions_teethUpD", // 229
|
|
273
|
+
"CTRL_expressions_teethUpU", // 230
|
|
274
|
+
// ============================================================================
|
|
275
|
+
// TONGUE (20 blendshapes)
|
|
276
|
+
// ============================================================================
|
|
277
|
+
"CTRL_expressions_tongueBendDown", // 231
|
|
278
|
+
"CTRL_expressions_tongueBendUp", // 232
|
|
279
|
+
"CTRL_expressions_tongueDown", // 233
|
|
280
|
+
"CTRL_expressions_tongueIn", // 234
|
|
281
|
+
"CTRL_expressions_tongueLeft", // 235
|
|
282
|
+
"CTRL_expressions_tongueNarrow", // 236
|
|
283
|
+
"CTRL_expressions_tongueOut", // 237 - 🔑 KEY
|
|
284
|
+
"CTRL_expressions_tonguePress", // 238
|
|
285
|
+
"CTRL_expressions_tongueRight", // 239
|
|
286
|
+
"CTRL_expressions_tongueRoll", // 240
|
|
287
|
+
"CTRL_expressions_tongueThick", // 241
|
|
288
|
+
"CTRL_expressions_tongueThin", // 242
|
|
289
|
+
"CTRL_expressions_tongueTipDown", // 243
|
|
290
|
+
"CTRL_expressions_tongueTipLeft", // 244
|
|
291
|
+
"CTRL_expressions_tongueTipRight", // 245
|
|
292
|
+
"CTRL_expressions_tongueTipUp", // 246
|
|
293
|
+
"CTRL_expressions_tongueTwistLeft", // 247
|
|
294
|
+
"CTRL_expressions_tongueTwistRight", // 248
|
|
295
|
+
"CTRL_expressions_tongueUp", // 249
|
|
296
|
+
"CTRL_expressions_tongueWide", // 250
|
|
297
|
+
];
|
|
298
|
+
/**
|
|
299
|
+
* Category breakdown for MetaHuman blendshapes
|
|
300
|
+
*/
|
|
301
|
+
export const METAHUMAN_CATEGORIES = {
|
|
302
|
+
brows: {
|
|
303
|
+
start: 0,
|
|
304
|
+
end: 7,
|
|
305
|
+
count: 8,
|
|
306
|
+
},
|
|
307
|
+
ears: {
|
|
308
|
+
start: 8,
|
|
309
|
+
end: 9,
|
|
310
|
+
count: 2,
|
|
311
|
+
},
|
|
312
|
+
eyes: {
|
|
313
|
+
start: 10,
|
|
314
|
+
end: 52,
|
|
315
|
+
count: 43,
|
|
316
|
+
},
|
|
317
|
+
eyelashes: {
|
|
318
|
+
start: 43,
|
|
319
|
+
end: 50,
|
|
320
|
+
count: 8,
|
|
321
|
+
},
|
|
322
|
+
jaw: {
|
|
323
|
+
start: 51,
|
|
324
|
+
end: 64,
|
|
325
|
+
count: 14,
|
|
326
|
+
},
|
|
327
|
+
mouth: {
|
|
328
|
+
start: 65,
|
|
329
|
+
end: 197,
|
|
330
|
+
count: 133,
|
|
331
|
+
},
|
|
332
|
+
neck: {
|
|
333
|
+
start: 193,
|
|
334
|
+
end: 206,
|
|
335
|
+
count: 14,
|
|
336
|
+
},
|
|
337
|
+
nose: {
|
|
338
|
+
start: 207,
|
|
339
|
+
end: 218,
|
|
340
|
+
count: 12,
|
|
341
|
+
},
|
|
342
|
+
teeth: {
|
|
343
|
+
start: 219,
|
|
344
|
+
end: 230,
|
|
345
|
+
count: 12,
|
|
346
|
+
},
|
|
347
|
+
tongue: {
|
|
348
|
+
start: 231,
|
|
349
|
+
end: 250,
|
|
350
|
+
count: 20,
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* Key blendshapes for lip-sync (most important for speech animation)
|
|
355
|
+
*/
|
|
356
|
+
export const KEY_METAHUMAN_LIPSYNC = {
|
|
357
|
+
// Eyes
|
|
358
|
+
EYE_BLINK_L: 10,
|
|
359
|
+
EYE_BLINK_R: 11,
|
|
360
|
+
// Jaw
|
|
361
|
+
JAW_FORWARD: 60,
|
|
362
|
+
JAW_LEFT: 61,
|
|
363
|
+
JAW_OPEN: 62, // Most important!
|
|
364
|
+
JAW_RIGHT: 64,
|
|
365
|
+
// Mouth - Funnel (O sounds)
|
|
366
|
+
MOUTH_FUNNEL_DL: 92,
|
|
367
|
+
MOUTH_FUNNEL_DR: 93,
|
|
368
|
+
MOUTH_FUNNEL_UL: 94,
|
|
369
|
+
MOUTH_FUNNEL_UR: 95,
|
|
370
|
+
// Mouth - Movement
|
|
371
|
+
MOUTH_LEFT: 96,
|
|
372
|
+
MOUTH_RIGHT: 163,
|
|
373
|
+
// Mouth - Stretch (wide mouth)
|
|
374
|
+
MOUTH_STRETCH_L: 176,
|
|
375
|
+
MOUTH_STRETCH_R: 179,
|
|
376
|
+
// Mouth - Lips Together
|
|
377
|
+
MOUTH_LIPS_TOGETHER_DL: 139,
|
|
378
|
+
MOUTH_LIPS_TOGETHER_DR: 140,
|
|
379
|
+
MOUTH_LIPS_TOGETHER_UL: 141,
|
|
380
|
+
MOUTH_LIPS_TOGETHER_UR: 142,
|
|
381
|
+
// Tongue
|
|
382
|
+
TONGUE_OUT: 237,
|
|
383
|
+
};
|
|
384
|
+
/**
|
|
385
|
+
* Get blendshape name by index
|
|
386
|
+
*/
|
|
387
|
+
export function getMetaHumanBlendshapeName(index) {
|
|
388
|
+
return METAHUMAN_ORDER_251[index];
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Get blendshape index by name
|
|
392
|
+
*/
|
|
393
|
+
export function getMetaHumanBlendshapeIndex(name) {
|
|
394
|
+
return METAHUMAN_ORDER_251.indexOf(name);
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Get blendshapes by category
|
|
398
|
+
*/
|
|
399
|
+
export function getMetaHumanBlendshapesByCategory(category) {
|
|
400
|
+
const cat = METAHUMAN_CATEGORIES[category];
|
|
401
|
+
return METAHUMAN_ORDER_251.slice(cat.start, cat.end + 1);
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Format MetaHuman blendshapes for logging
|
|
405
|
+
*/
|
|
406
|
+
export function formatMetaHumanBlendshapesForLogging(values, threshold = 0.01, maxEntries = 20) {
|
|
407
|
+
const active = {};
|
|
408
|
+
const activeList = [];
|
|
409
|
+
for (let i = 0; i < Math.min(values.length, METAHUMAN_ORDER_251.length); i++) {
|
|
410
|
+
const value = values[i];
|
|
411
|
+
if (Math.abs(value) > threshold) {
|
|
412
|
+
activeList.push({
|
|
413
|
+
name: METAHUMAN_ORDER_251[i],
|
|
414
|
+
value,
|
|
415
|
+
index: i,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
// Sort by absolute value (descending)
|
|
420
|
+
activeList
|
|
421
|
+
.sort((a, b) => Math.abs(b.value) - Math.abs(a.value))
|
|
422
|
+
.slice(0, maxEntries)
|
|
423
|
+
.forEach(item => {
|
|
424
|
+
active[item.name] = Number(item.value.toFixed(4));
|
|
425
|
+
});
|
|
426
|
+
return {
|
|
427
|
+
active,
|
|
428
|
+
total: values.length,
|
|
429
|
+
activeCount: activeList.length,
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
//# sourceMappingURL=metahumanOrder251.js.map
|