narrator-avatar 1.0.9 → 1.1.0

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 CHANGED
@@ -91,10 +91,12 @@ function MyPage() {
91
91
  | `lipsyncModules` | Array of language codes (default `['en']`) |
92
92
  | `lipsyncLang` | Lip-sync language (default `'en'`) |
93
93
  | `visualPreset` | Lighting preset: `'cinematic'`, `'beauty'`, `'studio'`, `'sunset'`, `'broadcast'` |
94
+ | `visualQuality` | `'auto'` (default): ultra on desktop, balanced ultra on mobile. `'ultra'` \| `'balanced'` \| `'performance'` |
94
95
  | `skinGloss` | Skin sheen/sweat intensity from `0` to `2` |
95
96
  | `skinPores` | Procedural pore/normal intensity from `0` to `2` |
96
97
  | `skinWarmth` | Warm skin tone blend from `0` to `2` |
97
98
  | `eyeContactIntensity` | Eye openness/contact strength from `0` to `2` |
99
+ | `modelFPS`, `modelPixelRatio` | Render cadence and resolution multiplier. **TalkingHead also multiplies `modelPixelRatio` by `devicePixelRatio`**, so use values near `1` (not `4`). Mobile is capped automatically. |
98
100
  | `dracoEnabled`, `dracoDecoderPath` | Enable Draco-compressed avatar loading |
99
101
  | `modelDynamicBones` | TalkingHead dynamic-bone config for rigged hair/body parts |
100
102
  | `update` | Per-frame callback `(dt, talkingHead)` |
@@ -135,6 +137,25 @@ function MyPage() {
135
137
 
136
138
  The package is JavaScript. For TypeScript, add a declaration file (e.g. `src/narrator-avatar.d.ts`) that declares the component props and ref type, or use the component with `// @ts-expect-error` if you prefer.
137
139
 
140
+ ## Performance (web and mobile)
141
+
142
+ `visualQuality="auto"` (default) keeps **ultra-realistic** polish on desktop and a **balanced ultra** tier on mobile (same lighting and skin shaders, tuned GPU settings).
143
+
144
+ Ship optimized GLBs beside each source model:
145
+
146
+ | File | Use |
147
+ |------|-----|
148
+ | `avatar-web.glb` | Desktop / tablet (1024px textures, ~3–5MB) |
149
+ | `avatar-mobile.glb` | Phones (512px textures, ~1–2MB) |
150
+
151
+ `avatarUrl="/avatars/avatar.glb"` resolves automatically to `-web` or `-mobile`.
152
+
153
+ ```bash
154
+ npm run optimize-avatars # in narrator-avatar-test
155
+ ```
156
+
157
+ Keep `modelPixelRatio` near **1–1.25**. TalkingHead multiplies it again by `devicePixelRatio`; the old value of `4` meant up to 12× pixels on retina phones.
158
+
138
159
  ## License
139
160
 
140
161
  MIT