talking-head-studio 0.4.10 → 0.4.12
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 +299 -337
- package/dist/TalkingHead.d.ts +44 -28
- package/dist/TalkingHead.js +21 -2
- package/dist/TalkingHead.web.d.ts +37 -4
- package/dist/TalkingHead.web.js +28 -8
- package/dist/TalkingHeadVisualization.d.ts +22 -0
- package/dist/TalkingHeadVisualization.js +30 -10
- package/dist/api/studioApi.d.ts +12 -1
- package/dist/api/studioApi.js +41 -28
- package/dist/appearance/apply.js +2 -3
- package/dist/appearance/matchers.js +1 -2
- package/dist/appearance/schema.js +1 -2
- package/dist/contract.d.ts +14 -0
- package/dist/contract.js +30 -0
- package/dist/core/avatar/avatarCapabilities.d.ts +60 -0
- package/dist/core/avatar/avatarCapabilities.js +100 -0
- package/dist/core/avatar/backend.d.ts +130 -0
- package/dist/core/avatar/backend.js +4 -0
- package/dist/core/avatar/backends/gaussian.d.ts +49 -0
- package/dist/core/avatar/backends/gaussian.js +293 -0
- package/dist/core/avatar/backends/index.d.ts +3 -0
- package/dist/core/avatar/backends/index.js +7 -0
- package/dist/core/avatar/backends/morphTarget.d.ts +39 -0
- package/dist/core/avatar/backends/morphTarget.js +179 -0
- package/dist/core/avatar/faceControls.d.ts +40 -0
- package/dist/core/avatar/faceControls.js +138 -0
- package/dist/core/avatar/motion.d.ts +1713 -0
- package/dist/core/avatar/motion.js +550 -0
- package/dist/core/avatar/motionRuntime.d.ts +46 -0
- package/dist/core/avatar/motionRuntime.js +84 -0
- package/dist/core/avatar/schema.d.ts +78 -0
- package/dist/core/avatar/schema.js +134 -0
- package/dist/core/avatar/visemes.d.ts +47 -1
- package/dist/core/avatar/visemes.js +114 -1
- package/dist/editor/AvatarCanvas.js +93 -3
- package/dist/editor/AvatarEditor.native.js +19 -9
- package/dist/editor/AvatarModel.js +2 -2
- package/dist/editor/FaceSqueezeEditor.d.ts +3 -1
- package/dist/editor/FaceSqueezeEditor.js +195 -121
- package/dist/editor/FaceSqueezeEditor.web.d.ts +3 -1
- package/dist/editor/FaceSqueezeEditor.web.js +32 -30
- package/dist/editor/RigidAccessory.js +18 -4
- package/dist/editor/SkinnedClothing.js +19 -9
- package/dist/editor/boneLockedDrag.d.ts +11 -0
- package/dist/editor/boneLockedDrag.js +68 -0
- package/dist/editor/boneSnap.js +22 -12
- package/dist/editor/boneSnap.web.d.ts +27 -0
- package/dist/editor/boneSnap.web.js +99 -0
- package/dist/editor/index.web.d.ts +10 -0
- package/dist/editor/index.web.js +26 -0
- package/dist/editor/sounds/haha.wav +0 -0
- package/dist/editor/sounds/owie.wav +0 -0
- package/dist/editor/sounds/stop.wav +0 -0
- package/dist/editor/studioTheme.d.ts +14 -14
- package/dist/editor/studioTheme.js +19 -16
- package/dist/editor/types.d.ts +1 -0
- package/dist/html/accessories.d.ts +7 -0
- package/dist/html/accessories.js +149 -0
- package/dist/html/motion.d.ts +1 -0
- package/dist/html/motion.js +189 -0
- package/dist/html/visemes.d.ts +7 -0
- package/dist/html/visemes.js +348 -0
- package/dist/html.d.ts +1 -1
- package/dist/html.js +56 -734
- package/dist/index.d.ts +19 -1
- package/dist/index.js +44 -5
- package/dist/index.web.d.ts +18 -1
- package/dist/index.web.js +36 -3
- package/dist/platform/api/types.d.ts +10 -0
- package/dist/platform/api/types.js +2 -0
- package/dist/platform/marketplace/types.d.ts +32 -0
- package/dist/platform/marketplace/types.js +2 -0
- package/dist/platform/sdk/unity.d.ts +27 -0
- package/dist/platform/sdk/unity.js +2 -0
- package/dist/platform/sdk/unreal.d.ts +23 -0
- package/dist/platform/sdk/unreal.js +2 -0
- package/dist/platform/sdk/web.d.ts +16 -0
- package/dist/platform/sdk/web.js +2 -0
- package/dist/sketchfab/api.js +5 -5
- package/dist/sketchfab/glbInspect.d.ts +22 -0
- package/dist/sketchfab/glbInspect.js +58 -0
- package/dist/sketchfab/index.d.ts +3 -0
- package/dist/sketchfab/index.js +8 -1
- package/dist/sketchfab/inspectRemote.d.ts +13 -0
- package/dist/sketchfab/inspectRemote.js +77 -0
- package/dist/sketchfab/types.d.ts +10 -0
- package/dist/sketchfab/useSketchfabSearch.js +1 -2
- package/dist/studio/AccessoryBrowserScreen.d.ts +6 -0
- package/dist/studio/AccessoryBrowserScreen.js +626 -0
- package/dist/studio/AccessoryPanel.d.ts +10 -0
- package/dist/studio/AccessoryPanel.js +396 -0
- package/dist/studio/AppearancePanel.d.ts +9 -0
- package/dist/studio/AppearancePanel.js +77 -0
- package/dist/studio/AvatarCreatorScreen.d.ts +5 -0
- package/dist/studio/AvatarCreatorScreen.js +806 -0
- package/dist/studio/AvatarEditorScreen.d.ts +14 -0
- package/dist/studio/AvatarEditorScreen.js +510 -0
- package/dist/studio/AvatarGrid.d.ts +23 -0
- package/dist/studio/AvatarGrid.js +257 -0
- package/dist/studio/ColorSwatch.d.ts +8 -0
- package/dist/studio/ColorSwatch.js +100 -0
- package/dist/studio/CreateVoiceProfileSheet.d.ts +8 -0
- package/dist/studio/CreateVoiceProfileSheet.js +242 -0
- package/dist/studio/DetailsPanel.d.ts +15 -0
- package/dist/studio/DetailsPanel.js +239 -0
- package/dist/studio/FilamentEditor.d.ts +2 -0
- package/dist/studio/FilamentEditor.js +6 -0
- package/dist/studio/PrecisionPanel.d.ts +2 -0
- package/dist/studio/PrecisionPanel.js +7 -0
- package/dist/studio/PublicGalleryScreen.d.ts +5 -0
- package/dist/studio/PublicGalleryScreen.js +358 -0
- package/dist/studio/SketchfabModelCard.d.ts +20 -0
- package/dist/studio/SketchfabModelCard.js +104 -0
- package/dist/studio/StudioBrowseHeader.d.ts +9 -0
- package/dist/studio/StudioBrowseHeader.js +28 -0
- package/dist/studio/StudioEmptyState.d.ts +8 -0
- package/dist/studio/StudioEmptyState.js +29 -0
- package/dist/studio/StudioFloatingAction.d.ts +13 -0
- package/dist/studio/StudioFloatingAction.js +42 -0
- package/dist/studio/StudioSectionHeader.d.ts +7 -0
- package/dist/studio/StudioSectionHeader.js +27 -0
- package/dist/studio/StudioSurfaceCard.d.ts +8 -0
- package/dist/studio/StudioSurfaceCard.js +20 -0
- package/dist/studio/VoicePanel.d.ts +15 -0
- package/dist/studio/VoicePanel.js +305 -0
- package/dist/studio/constants.d.ts +3 -0
- package/dist/studio/constants.js +6 -0
- package/dist/studio/index.d.ts +29 -0
- package/dist/studio/index.js +54 -0
- package/dist/studio/useSketchfabCapabilities.d.ts +31 -0
- package/dist/studio/useSketchfabCapabilities.js +82 -0
- package/dist/tts/useDirectVisemeStream.d.ts +2 -6
- package/dist/tts/useDirectVisemeStream.js +16 -12
- package/dist/tts/useMotionMarkers.d.ts +0 -1
- package/dist/tts/useMotionMarkers.js +1 -2
- package/dist/utils/avatarUtils.js +94 -8
- package/dist/utils/faceLandmarkerToShapeWeights.js +21 -14
- package/dist/voice/convertToWav.js +1 -2
- package/dist/voice/index.d.ts +3 -0
- package/dist/voice/index.js +6 -1
- package/dist/voice/useAudioPlayer.js +18 -6
- package/dist/voice/useAudioRecording.js +1 -2
- package/dist/voice/useFaceControls.d.ts +14 -0
- package/dist/voice/useFaceControls.js +81 -0
- package/dist/voice/useVoicePreview.d.ts +7 -0
- package/dist/voice/useVoicePreview.js +83 -0
- package/dist/wardrobe/index.d.ts +3 -0
- package/dist/wardrobe/index.js +8 -1
- package/dist/wardrobe/useAccessoryGestures.d.ts +20 -0
- package/dist/wardrobe/useAccessoryGestures.js +94 -0
- package/dist/wardrobe/useAvatarWardrobeHydration.js +9 -4
- package/dist/wardrobe/useStudioAvatar.d.ts +29 -0
- package/dist/wardrobe/useStudioAvatar.js +186 -0
- package/dist/wardrobe/wardrobeStore.d.ts +2 -0
- package/dist/wardrobe/wardrobeStore.js +12 -2
- package/dist/wgpu/R3FWebGpuCanvas.d.ts +15 -0
- package/dist/wgpu/R3FWebGpuCanvas.js +176 -0
- package/dist/wgpu/WgpuAvatar.d.ts +26 -2
- package/dist/wgpu/WgpuAvatar.js +313 -46
- package/dist/wgpu/accessoryDefaults.d.ts +12 -0
- package/dist/wgpu/accessoryDefaults.js +19 -0
- package/dist/wgpu/blobShim.d.ts +2 -0
- package/dist/wgpu/blobShim.js +191 -0
- package/dist/wgpu/index.d.ts +1 -0
- package/dist/wgpu/index.js +4 -1
- package/dist/wgpu/loadGLTFFromUri.d.ts +2 -0
- package/dist/wgpu/loadGLTFFromUri.js +75 -0
- package/dist/wgpu/morphTables.js +21 -10
- package/dist/wgpu/motionState.d.ts +20 -0
- package/dist/wgpu/motionState.js +31 -0
- package/dist/wgpu/patchThreeForRN.d.ts +28 -0
- package/dist/wgpu/patchThreeForRN.js +292 -0
- package/dist/wgpu/scenePlacement.d.ts +5 -0
- package/dist/wgpu/scenePlacement.js +50 -0
- package/dist/wgpu/useAuthedModelUri.js +22 -11
- package/dist/wgpu/useNativeGLTF.d.ts +7 -0
- package/dist/wgpu/useNativeGLTF.js +36 -0
- package/package.json +102 -32
package/package.json
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "talking-head-studio",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.12",
|
|
4
4
|
"description": "Cross-platform 3D avatar component for React Native & web — lip-sync, gestures, accessories, and LLM integration. Powered by TalkingHead + Three.js.",
|
|
5
5
|
"main": "dist/index.web.js",
|
|
6
6
|
"browser": "dist/index.web.js",
|
|
7
7
|
"react-native": "dist/index.js",
|
|
8
|
-
"types": "dist/index.
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
9
|
"source": "src/index.ts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
12
|
"react-native": "./dist/index.js",
|
|
13
|
-
"types": "./dist/index.
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
14
|
"default": "./dist/index.web.js"
|
|
15
15
|
},
|
|
16
16
|
"./editor": {
|
|
17
17
|
"types": "./dist/editor/index.d.ts",
|
|
18
|
+
"browser": "./dist/editor/index.web.js",
|
|
18
19
|
"default": "./dist/editor/index.js"
|
|
19
20
|
},
|
|
20
21
|
"./voice": {
|
|
21
22
|
"types": "./dist/voice/index.d.ts",
|
|
22
23
|
"default": "./dist/voice/index.js"
|
|
23
24
|
},
|
|
25
|
+
"./contract": {
|
|
26
|
+
"types": "./dist/contract.d.ts",
|
|
27
|
+
"default": "./dist/contract.js"
|
|
28
|
+
},
|
|
24
29
|
"./appearance": {
|
|
25
30
|
"types": "./dist/appearance/index.d.ts",
|
|
26
31
|
"default": "./dist/appearance/index.js"
|
|
@@ -42,6 +47,14 @@
|
|
|
42
47
|
"types": "./dist/wgpu/index.d.ts",
|
|
43
48
|
"default": "./dist/wgpu/index.js"
|
|
44
49
|
},
|
|
50
|
+
"./studio": {
|
|
51
|
+
"types": "./dist/studio/index.d.ts",
|
|
52
|
+
"default": "./dist/studio/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./html": {
|
|
55
|
+
"types": "./dist/html.d.ts",
|
|
56
|
+
"default": "./dist/html.js"
|
|
57
|
+
},
|
|
45
58
|
"./dist/assets/*.glb": "./dist/assets/*.glb"
|
|
46
59
|
},
|
|
47
60
|
"files": [
|
|
@@ -49,13 +62,14 @@
|
|
|
49
62
|
],
|
|
50
63
|
"scripts": {
|
|
51
64
|
"clean": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"",
|
|
52
|
-
"build": "npm run clean && tsc --project tsconfig.json &&
|
|
65
|
+
"build": "npm run clean && tsc --project tsconfig.json && node tools/copy-build-assets.mjs",
|
|
53
66
|
"typecheck": "tsc --noEmit",
|
|
54
67
|
"lint": "eslint 'src/**/*.{ts,tsx}'",
|
|
55
68
|
"format": "prettier --write 'src/**/*.{ts,tsx}'",
|
|
56
69
|
"test": "jest",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
70
|
+
"test:metadata": "node --test 'tests/*.test.mjs'",
|
|
71
|
+
"prepublishOnly": "npm run lint && npm run typecheck && npm test -- --runInBand && npm run test:metadata && npm run build",
|
|
72
|
+
"build:creator": "vite build --config packages/avatar-creator/vite.config.ts"
|
|
59
73
|
},
|
|
60
74
|
"keywords": [
|
|
61
75
|
"react-native",
|
|
@@ -92,26 +106,49 @@
|
|
|
92
106
|
"bugs": {
|
|
93
107
|
"url": "https://github.com/sitebay/talking-head-studio/issues"
|
|
94
108
|
},
|
|
109
|
+
"workspaces": [
|
|
110
|
+
"packages/*"
|
|
111
|
+
],
|
|
95
112
|
"sideEffects": false,
|
|
96
113
|
"dependencies": {
|
|
114
|
+
"@gltf-transform/core": "^4.3.0",
|
|
97
115
|
"@mediapipe/tasks-vision": "^0.10.34",
|
|
98
|
-
"
|
|
116
|
+
"base64-js": "^1.5.1",
|
|
99
117
|
"zustand": "^5.0.12"
|
|
100
118
|
},
|
|
101
119
|
"peerDependencies": {
|
|
120
|
+
"@expo/vector-icons": ">=14",
|
|
121
|
+
"@gorhom/bottom-sheet": ">=5",
|
|
102
122
|
"@react-three/drei": ">=9",
|
|
103
123
|
"@react-three/fiber": ">=8",
|
|
124
|
+
"@shopify/flash-list": ">=1",
|
|
104
125
|
"expo": ">=51",
|
|
105
126
|
"expo-asset": ">=10",
|
|
106
127
|
"expo-audio": ">=0.3",
|
|
128
|
+
"expo-blur": ">=13",
|
|
129
|
+
"expo-document-picker": ">=12",
|
|
107
130
|
"expo-file-system": ">=17",
|
|
131
|
+
"expo-haptics": ">=13",
|
|
132
|
+
"expo-image": ">=1",
|
|
133
|
+
"moti": ">=0.29",
|
|
108
134
|
"react": ">=18",
|
|
109
|
-
"react-native": ">=0.
|
|
135
|
+
"react-native": ">=0.81",
|
|
136
|
+
"react-native-reanimated": ">=3",
|
|
110
137
|
"react-native-webview": ">=13",
|
|
111
138
|
"react-native-wgpu": ">=0.1",
|
|
112
|
-
"three": ">=0.170"
|
|
139
|
+
"three": ">=0.170",
|
|
140
|
+
"three-stdlib": ">=2"
|
|
113
141
|
},
|
|
114
142
|
"peerDependenciesMeta": {
|
|
143
|
+
"@expo/vector-icons": {
|
|
144
|
+
"optional": true
|
|
145
|
+
},
|
|
146
|
+
"@gorhom/bottom-sheet": {
|
|
147
|
+
"optional": true
|
|
148
|
+
},
|
|
149
|
+
"@shopify/flash-list": {
|
|
150
|
+
"optional": true
|
|
151
|
+
},
|
|
115
152
|
"react-native": {
|
|
116
153
|
"optional": true
|
|
117
154
|
},
|
|
@@ -130,9 +167,24 @@
|
|
|
130
167
|
"expo-audio": {
|
|
131
168
|
"optional": true
|
|
132
169
|
},
|
|
170
|
+
"expo-blur": {
|
|
171
|
+
"optional": true
|
|
172
|
+
},
|
|
173
|
+
"expo-document-picker": {
|
|
174
|
+
"optional": true
|
|
175
|
+
},
|
|
133
176
|
"expo-file-system": {
|
|
134
177
|
"optional": true
|
|
135
178
|
},
|
|
179
|
+
"expo-haptics": {
|
|
180
|
+
"optional": true
|
|
181
|
+
},
|
|
182
|
+
"expo-image": {
|
|
183
|
+
"optional": true
|
|
184
|
+
},
|
|
185
|
+
"moti": {
|
|
186
|
+
"optional": true
|
|
187
|
+
},
|
|
136
188
|
"@react-three/fiber": {
|
|
137
189
|
"optional": true
|
|
138
190
|
},
|
|
@@ -141,48 +193,66 @@
|
|
|
141
193
|
},
|
|
142
194
|
"three": {
|
|
143
195
|
"optional": true
|
|
196
|
+
},
|
|
197
|
+
"three-stdlib": {
|
|
198
|
+
"optional": true
|
|
199
|
+
},
|
|
200
|
+
"react-native-reanimated": {
|
|
201
|
+
"optional": true
|
|
144
202
|
}
|
|
145
203
|
},
|
|
146
204
|
"devDependencies": {
|
|
147
205
|
"@babel/core": "^7.29.0",
|
|
148
|
-
"@babel/preset-env": "^7.29.
|
|
206
|
+
"@babel/preset-env": "^7.29.2",
|
|
149
207
|
"@babel/preset-typescript": "^7.28.5",
|
|
150
208
|
"@expo/vector-icons": "^15.1.1",
|
|
209
|
+
"@gorhom/bottom-sheet": "^5.2.8",
|
|
151
210
|
"@react-native/babel-preset": "^0.84.1",
|
|
152
|
-
"@react-three/drei": "^
|
|
153
|
-
"@react-three/fiber": "^
|
|
211
|
+
"@react-three/drei": "^10.7.7",
|
|
212
|
+
"@react-three/fiber": "^9.5.0",
|
|
213
|
+
"@shopify/flash-list": "2.0.2",
|
|
154
214
|
"@testing-library/react-native": "^13.3.3",
|
|
155
215
|
"@types/jest": "^30.0.0",
|
|
216
|
+
"@types/node": "^25.5.0",
|
|
156
217
|
"@types/react": "^19.2.14",
|
|
157
|
-
"@types/react-dom": "^
|
|
218
|
+
"@types/react-dom": "^19.2.3",
|
|
158
219
|
"@types/react-native": "^0.73.0",
|
|
159
|
-
"@types/three": "^0.
|
|
160
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
161
|
-
"@typescript-eslint/parser": "^8.
|
|
162
|
-
"@vitejs/plugin-react": "^
|
|
163
|
-
"babel-jest": "^30.
|
|
164
|
-
"eslint": "^9.39.
|
|
220
|
+
"@types/three": "^0.183.1",
|
|
221
|
+
"@typescript-eslint/eslint-plugin": "^8.57.2",
|
|
222
|
+
"@typescript-eslint/parser": "^8.57.2",
|
|
223
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
224
|
+
"babel-jest": "^30.3.0",
|
|
225
|
+
"eslint": "^9.39.4",
|
|
165
226
|
"eslint-config-prettier": "^10.1.8",
|
|
166
227
|
"eslint-plugin-react": "^7.37.5",
|
|
167
228
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
168
229
|
"eslint-plugin-react-native": "^5.0.0",
|
|
169
|
-
"expo-
|
|
230
|
+
"expo-asset": "55.0.13",
|
|
231
|
+
"expo-audio": "55.0.11",
|
|
232
|
+
"expo-blur": "55.0.12",
|
|
233
|
+
"expo-document-picker": "55.0.11",
|
|
234
|
+
"expo-file-system": "55.0.15",
|
|
235
|
+
"expo-haptics": "55.0.11",
|
|
236
|
+
"expo-image": "55.0.8",
|
|
170
237
|
"express": "^5.2.1",
|
|
171
|
-
"jest": "^30.
|
|
172
|
-
"jest-environment-jsdom": "^30.
|
|
238
|
+
"jest": "^30.3.0",
|
|
239
|
+
"jest-environment-jsdom": "^30.3.0",
|
|
173
240
|
"metro-react-native-babel-preset": "^0.77.0",
|
|
174
241
|
"moti": "^0.30.0",
|
|
175
|
-
"multer": "^2.1.
|
|
242
|
+
"multer": "^2.1.1",
|
|
176
243
|
"prettier": "^3.8.1",
|
|
177
|
-
"react": "
|
|
178
|
-
"react-dom": "
|
|
179
|
-
"react-native-gesture-handler": "
|
|
180
|
-
"react-native-reanimated": "
|
|
181
|
-
"react-native-webview": "
|
|
182
|
-
"react-
|
|
183
|
-
"
|
|
244
|
+
"react": "19.2.0",
|
|
245
|
+
"react-dom": "19.2.0",
|
|
246
|
+
"react-native-gesture-handler": "~2.30.0",
|
|
247
|
+
"react-native-reanimated": "4.2.1",
|
|
248
|
+
"react-native-webview": "13.16.0",
|
|
249
|
+
"react-native-wgpu": "0.5.11",
|
|
250
|
+
"react-native-worklets": "0.7.2",
|
|
251
|
+
"react-test-renderer": "19.2.0",
|
|
252
|
+
"three": "^0.183.2",
|
|
253
|
+
"three-stdlib": "^2.36.1",
|
|
184
254
|
"ts-jest": "^29.4.6",
|
|
185
|
-
"typescript": "^
|
|
186
|
-
"vite": "^
|
|
255
|
+
"typescript": "^6.0.2",
|
|
256
|
+
"vite": "^8.0.3"
|
|
187
257
|
}
|
|
188
258
|
}
|