@spatialwalk/avatarkit 1.0.0-beta.4 → 1.0.0-beta.41
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/CHANGELOG.md +378 -2
- package/README.md +261 -283
- package/dist/StreamingAudioPlayer-BXytpr5T.js +506 -0
- package/dist/animation/AnimationWebSocketClient.d.ts +9 -24
- package/dist/animation/utils/eventEmitter.d.ts +0 -4
- package/dist/animation/utils/flameConverter.d.ts +3 -11
- package/dist/audio/AnimationPlayer.d.ts +4 -32
- package/dist/audio/StreamingAudioPlayer.d.ts +12 -75
- package/dist/avatar_core_wasm-i0Ocpx6q.js +2693 -0
- package/dist/avatar_core_wasm.wasm +0 -0
- package/dist/config/app-config.d.ts +1 -6
- package/dist/config/constants.d.ts +5 -27
- package/dist/config/sdk-config-loader.d.ts +2 -9
- package/dist/core/Avatar.d.ts +0 -15
- package/dist/core/AvatarController.d.ts +35 -116
- package/dist/core/AvatarDownloader.d.ts +0 -95
- package/dist/core/AvatarManager.d.ts +10 -18
- package/dist/core/AvatarSDK.d.ts +21 -0
- package/dist/core/AvatarView.d.ts +24 -110
- package/dist/core/NetworkLayer.d.ts +1 -59
- package/dist/generated/common/v1/models.d.ts +29 -0
- package/dist/generated/driveningress/v1/driveningress.d.ts +1 -12
- package/dist/generated/driveningress/v2/driveningress.d.ts +81 -3
- package/dist/generated/google/protobuf/struct.d.ts +5 -39
- package/dist/generated/google/protobuf/timestamp.d.ts +1 -103
- package/dist/index-CRKYjlwp.js +14267 -0
- package/dist/index.d.ts +1 -6
- package/dist/index.js +17 -18
- package/dist/renderer/RenderSystem.d.ts +1 -79
- package/dist/renderer/covariance.d.ts +0 -12
- package/dist/renderer/renderer.d.ts +6 -2
- package/dist/renderer/sortSplats.d.ts +0 -11
- package/dist/renderer/webgl/reorderData.d.ts +0 -13
- package/dist/renderer/webgl/webglRenderer.d.ts +19 -42
- package/dist/renderer/webgpu/webgpuRenderer.d.ts +18 -31
- package/dist/types/character-settings.d.ts +0 -5
- package/dist/types/character.d.ts +3 -21
- package/dist/types/index.d.ts +72 -36
- package/dist/utils/animation-interpolation.d.ts +3 -13
- package/dist/utils/client-id.d.ts +1 -0
- package/dist/utils/conversationId.d.ts +1 -0
- package/dist/utils/error-utils.d.ts +1 -25
- package/dist/utils/heartbeat-manager.d.ts +18 -0
- package/dist/utils/id-manager.d.ts +38 -0
- package/dist/utils/logger.d.ts +5 -11
- package/dist/utils/posthog-tracker.d.ts +11 -0
- package/dist/utils/usage-tracker.d.ts +5 -0
- package/dist/vanilla/vite.config.d.ts +2 -0
- package/dist/wasm/avatarCoreAdapter.d.ts +11 -97
- package/dist/wasm/avatarCoreMemory.d.ts +5 -54
- package/package.json +15 -13
- package/dist/StreamingAudioPlayer-L87IFoao.js +0 -319
- package/dist/StreamingAudioPlayer-L87IFoao.js.map +0 -1
- package/dist/animation/AnimationWebSocketClient.d.ts.map +0 -1
- package/dist/animation/utils/eventEmitter.d.ts.map +0 -1
- package/dist/animation/utils/flameConverter.d.ts.map +0 -1
- package/dist/audio/AnimationPlayer.d.ts.map +0 -1
- package/dist/audio/StreamingAudioPlayer.d.ts.map +0 -1
- package/dist/avatar_core_wasm-D4eEi7Eh.js +0 -1666
- package/dist/avatar_core_wasm-D4eEi7Eh.js.map +0 -1
- package/dist/config/app-config.d.ts.map +0 -1
- package/dist/config/constants.d.ts.map +0 -1
- package/dist/config/sdk-config-loader.d.ts.map +0 -1
- package/dist/core/Avatar.d.ts.map +0 -1
- package/dist/core/AvatarController.d.ts.map +0 -1
- package/dist/core/AvatarDownloader.d.ts.map +0 -1
- package/dist/core/AvatarKit.d.ts +0 -66
- package/dist/core/AvatarKit.d.ts.map +0 -1
- package/dist/core/AvatarManager.d.ts.map +0 -1
- package/dist/core/AvatarView.d.ts.map +0 -1
- package/dist/core/NetworkLayer.d.ts.map +0 -1
- package/dist/generated/driveningress/v1/driveningress.d.ts.map +0 -1
- package/dist/generated/driveningress/v2/driveningress.d.ts.map +0 -1
- package/dist/generated/google/protobuf/struct.d.ts.map +0 -1
- package/dist/generated/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/index-BDxVrKwm.js +0 -5942
- package/dist/index-BDxVrKwm.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/renderer/RenderSystem.d.ts.map +0 -1
- package/dist/renderer/covariance.d.ts.map +0 -1
- package/dist/renderer/renderer.d.ts.map +0 -1
- package/dist/renderer/sortSplats.d.ts.map +0 -1
- package/dist/renderer/webgl/reorderData.d.ts.map +0 -1
- package/dist/renderer/webgl/webglRenderer.d.ts.map +0 -1
- package/dist/renderer/webgpu/webgpuRenderer.d.ts.map +0 -1
- package/dist/types/character-settings.d.ts.map +0 -1
- package/dist/types/character.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/utils/animation-interpolation.d.ts.map +0 -1
- package/dist/utils/cls-tracker.d.ts +0 -17
- package/dist/utils/cls-tracker.d.ts.map +0 -1
- package/dist/utils/error-utils.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/reqId.d.ts +0 -20
- package/dist/utils/reqId.d.ts.map +0 -1
- package/dist/wasm/avatarCoreAdapter.d.ts.map +0 -1
- package/dist/wasm/avatarCoreMemory.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,382 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.0-beta.41] - 2025-12-29
|
|
9
|
+
|
|
10
|
+
### 🔄 Breaking Changes
|
|
11
|
+
- **Background Image Support Removed** - Removed background image functionality from `AvatarView`:
|
|
12
|
+
- Removed `isOpaque` getter/setter property
|
|
13
|
+
- Removed `setBackgroundImage()` method
|
|
14
|
+
- Removed background image loading from `AvatarDownloader`
|
|
15
|
+
- Canvas now always uses transparent background
|
|
16
|
+
|
|
17
|
+
## [1.0.0-beta.40] - 2025-12-27
|
|
18
|
+
|
|
19
|
+
### 🔧 API Improvements
|
|
20
|
+
- Extended post-processing parameter configuration interface
|
|
21
|
+
|
|
22
|
+
## [1.0.0-beta.39] - 2025-12-27
|
|
23
|
+
|
|
24
|
+
### 🔧 Improvements
|
|
25
|
+
- Filter localhost domain from telemetry reporting to avoid test data pollution
|
|
26
|
+
|
|
27
|
+
## [1.0.0-beta.38] - 2025-12-27
|
|
28
|
+
|
|
29
|
+
### 🔄 Breaking Changes
|
|
30
|
+
- Migrated telemetry reporting from Tencent Cloud CLS to PostHog
|
|
31
|
+
|
|
32
|
+
### ✨ New Features
|
|
33
|
+
- Implemented download queue for character resource loading
|
|
34
|
+
|
|
35
|
+
## [1.0.0-beta.37] - 2025-12-24
|
|
36
|
+
|
|
37
|
+
### 🐛 Bugfix
|
|
38
|
+
- Various bug fixes and improvements
|
|
39
|
+
|
|
40
|
+
## [1.0.0-beta.36] - 2025-12-20
|
|
41
|
+
|
|
42
|
+
### ✨ New Features
|
|
43
|
+
- **Audio Sample Rate Configuration** - Added configurable audio sample rate support in SDK initialization
|
|
44
|
+
- Added `audioFormat` configuration option with `channelCount` (fixed to 1) and `sampleRate` (supports: 8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz, default: 16000)
|
|
45
|
+
- Audio recording and playback now automatically use the configured sample rate
|
|
46
|
+
- Vanilla demo updated with sample rate dropdown selector for easy testing
|
|
47
|
+
|
|
48
|
+
## [1.0.0-beta.35] - 2025-12-16
|
|
49
|
+
|
|
50
|
+
### 🔄 API Changes
|
|
51
|
+
- **Avatar Transform API** - Changed `setTransform` method to `transform` getter/setter property for more idiomatic JavaScript API. Now supports both reading and setting transform values.
|
|
52
|
+
|
|
53
|
+
## [1.0.0-beta.34] - 2025-12-16
|
|
54
|
+
|
|
55
|
+
### ✨ New Features
|
|
56
|
+
- **Avatar Transform API** - Added `setTransform` method to `AvatarView` for controlling avatar position and scale within the canvas. Supports normalized coordinates (-1 to 1) for position and scale factor.
|
|
57
|
+
|
|
58
|
+
## [1.0.0-beta.32] - 2025-12-16
|
|
59
|
+
|
|
60
|
+
### 🔄 Breaking Changes
|
|
61
|
+
- **Host Mode Interface** - Updated `yieldFramesData` method to accept binary data array instead of single binary data. The method now processes multiple protobuf-encoded Message objects in a single call.
|
|
62
|
+
|
|
63
|
+
## [1.0.0-beta.31] - 2025-12-16
|
|
64
|
+
|
|
65
|
+
### 🐛 Bugfix
|
|
66
|
+
- **Environment CORS Issue** - Fixed CORS issues when requesting configuration and character data APIs. SDK now provides default configuration fallback when config requests fail, ensuring smooth operation across different environments.
|
|
67
|
+
|
|
68
|
+
## [1.0.0-beta.30] - 2025-12-15
|
|
69
|
+
|
|
70
|
+
### 🐛 Bugfix
|
|
71
|
+
- **Template Resources Duplicate Download** - Fixed issue where template resources were being re-downloaded for each new character load. Template resources are now only loaded once during SDK initialization and reused for all characters.
|
|
72
|
+
|
|
73
|
+
## [1.0.0-beta.29] - 2025-12-15
|
|
74
|
+
|
|
75
|
+
### 🔄 Breaking Changes
|
|
76
|
+
- **Environment Enum** - Removed `Environment.test`. Only `Environment.cn` and `Environment.intl` are now supported. Environment configuration must be explicitly provided.
|
|
77
|
+
- **Log Level Default** - Default log level changed from `LogLevel.all` to `LogLevel.off`. Set `logLevel: LogLevel.all` in configuration to enable all logs.
|
|
78
|
+
|
|
79
|
+
### ✨ New Features
|
|
80
|
+
- **Avatar Caching** - Added avatar caching methods in `AvatarManager`:
|
|
81
|
+
- `retrieve(id: string): Avatar | undefined` - Get cached avatar by ID
|
|
82
|
+
- `clear(id: string): void` - Clear cached avatar for specific ID
|
|
83
|
+
- `clearAll(): void` - Clear all cached avatars
|
|
84
|
+
- `clearCache()` is now deprecated, use `clearAll()` instead
|
|
85
|
+
- **Background Image Support** - Added background image control in `AvatarView`:
|
|
86
|
+
- `isOpaque: boolean` - Getter/setter to control canvas background transparency
|
|
87
|
+
- `setBackgroundImage(image: HTMLImageElement | string | null): void` - Set or remove background image
|
|
88
|
+
|
|
89
|
+
### 🔧 Improvements
|
|
90
|
+
- **Avatar Version Checking** - Avatar cache now automatically checks version and reloads if cached avatar version differs from latest metadata
|
|
91
|
+
- **Concurrent Loading** - Multiple concurrent `load()` calls for the same avatar ID now reuse the same loading promise
|
|
92
|
+
|
|
93
|
+
## [1.0.0-beta.28] - 2025-12-08
|
|
94
|
+
|
|
95
|
+
### 🔄 Breaking Changes
|
|
96
|
+
- **Class Renamed** - `AvatarKit` class has been renamed to `AvatarSDK` for better consistency
|
|
97
|
+
- Update all imports: `import { AvatarKit } from '@spatialwalk/avatarkit'` → `import { AvatarSDK } from '@spatialwalk/avatarkit'`
|
|
98
|
+
- Update all API calls: `AvatarKit.initialize()` → `AvatarSDK.initialize()`
|
|
99
|
+
- All static methods and properties remain the same, only the class name has changed
|
|
100
|
+
|
|
101
|
+
### 🔧 Improvements
|
|
102
|
+
- **Rendering Optimizations** - Added fragment shader discard optimization to improve performance and edge quality
|
|
103
|
+
- **Shader Alignment** - Removed view matrix transpose to align with Android SDK implementation
|
|
104
|
+
- **Resource Cleanup** - Removed unused `frameMono` and `audioMono` resources from SDK and tests
|
|
105
|
+
|
|
106
|
+
## [1.0.0-beta.27] - 2025-12-04
|
|
107
|
+
|
|
108
|
+
### 🐛 Bugfix
|
|
109
|
+
|
|
110
|
+
## [1.0.0-beta.26] - 2025-12-03
|
|
111
|
+
|
|
112
|
+
### ✨ New Features
|
|
113
|
+
- **Log Level Configuration** - Added `logLevel` configuration option to control SDK logging verbosity
|
|
114
|
+
- `LogLevel.off` - Disable all logs
|
|
115
|
+
- `LogLevel.error` - Only error logs
|
|
116
|
+
- `LogLevel.warning` - Warning and error logs
|
|
117
|
+
- `LogLevel.all` - All logs (default)
|
|
118
|
+
- **Standardized CLS Logging Events** - All CLS logging events now use standardized field names for better querying
|
|
119
|
+
- Standard events: `sdk_initialized`, `send_audio_failed`, `message_error`, `heartbeat_failed`, `service_restarted`, `session_token_invalid`, `session_token_expired`, `yield_animation_failed`, `fetch_avatar_metadata_failed`, `download_avatar_assets_failed`
|
|
120
|
+
- Standard fields: `req_id`, `con_id`, `avatar_id`, `description`
|
|
121
|
+
- **End-to-End Latency Tracking** - Added `driving_latency` event to track latency metrics for both SDK and Host modes
|
|
122
|
+
- Tracks: `start`, `tap2`, `tap4`, `end`, `first_frame` timestamps
|
|
123
|
+
- Automatically reported at key moments during audio/animation processing
|
|
124
|
+
|
|
125
|
+
### 🔧 Improvements
|
|
126
|
+
- **CLS Configuration Alignment** - Updated CLS endpoints and Topic IDs to match iOS SDK configuration
|
|
127
|
+
- **Default API Endpoints** - Fixed default API endpoint for `intl` environment to `api.intl.spatialwalk.cloud`
|
|
128
|
+
- **Error Code Enum** - Added new error codes: `appIDUnrecognized`, `sessionTokenInvalid`, `sessionTokenExpired`, `failedToFetchAvatarMetadata`, `failedToDownloadAvatarAssets`
|
|
129
|
+
|
|
130
|
+
### 🗑️ Removed
|
|
131
|
+
- **Redundant Log Events** - Removed unnecessary log events: `playback_paused`, `playback_resumed`, `reconnecting`, `connect_success`, `server_error`, `decode_failed`
|
|
132
|
+
|
|
133
|
+
## [1.0.0-beta.25] - 2025-12-03
|
|
134
|
+
|
|
135
|
+
### 🔧 Improvements
|
|
136
|
+
- **Removed Audio Buffer Limit** - Removed the 100 chunk limit on pending audio buffers to allow unlimited audio data buffering
|
|
137
|
+
|
|
138
|
+
## [1.0.0-beta.24] - 2025-11-26
|
|
139
|
+
|
|
140
|
+
### 🔧 API Changes
|
|
141
|
+
- **Backend Endpoints Updated** - Backend API endpoints have been updated for all environments
|
|
142
|
+
|
|
143
|
+
## [1.0.0-beta.23] - 2025-11-26
|
|
144
|
+
|
|
145
|
+
### 🔧 API Changes
|
|
146
|
+
- **Breaking Change** - `playback()` method is no longer supported and has been removed from public API
|
|
147
|
+
|
|
148
|
+
## [1.0.0-beta.22] - 2025-11-26
|
|
149
|
+
|
|
150
|
+
### 🔧 API Changes
|
|
151
|
+
- **State Callback Renamed** - `onAvatarState` has been renamed to `onConversationState` for better clarity
|
|
152
|
+
- The callback now uses `ConversationState` enum with states: `idle` and `playing`
|
|
153
|
+
- **Environment Enum Updated** - `Environment.us` has been renamed to `Environment.intl` for better internationalization support
|
|
154
|
+
- All references to `Environment.us` should be updated to `Environment.intl`
|
|
155
|
+
- Remote config endpoints now use `intl` instead of `us`
|
|
156
|
+
|
|
157
|
+
### ✨ New Features
|
|
158
|
+
- **Volume Control** - Added volume control API for audio playback
|
|
159
|
+
- `setVolume(volume: number)` - Set audio volume (0.0 to 1.0)
|
|
160
|
+
- `getVolume(): number` - Get current audio volume
|
|
161
|
+
- Volume control only affects the avatar's audio player, not system volume
|
|
162
|
+
- Volume changes take effect immediately, including for currently playing audio
|
|
163
|
+
|
|
164
|
+
## [1.0.0-beta.21] - 2025-11-25
|
|
165
|
+
|
|
166
|
+
### ✨ New Features
|
|
167
|
+
- **SDK Mode Connection Timeout Fallback** - Enhanced fallback mechanism for SDK mode:
|
|
168
|
+
- If WebSocket connection fails to establish within 15 seconds, the SDK automatically enters fallback mode
|
|
169
|
+
- In fallback mode, audio data can still be sent and will play normally, even though no animation data will be received
|
|
170
|
+
- Connection failures also trigger this fallback mechanism
|
|
171
|
+
- `ConnectionState.connecting` and `ConnectionState.failed` events are emitted to notify external applications
|
|
172
|
+
- Concurrent connection attempts are prevented to avoid race conditions
|
|
173
|
+
|
|
174
|
+
### 🔧 Improvements
|
|
175
|
+
- Improved connection state management: `isConnected` now accurately reflects actual connection status (false in fallback mode)
|
|
176
|
+
- Added `canSend()` method in `NetworkLayer` to check if audio can be sent (including fallback mode)
|
|
177
|
+
- Better separation of concerns: connection state checks are now handled by `NetworkLayer`, while playback logic remains in `AvatarController`
|
|
178
|
+
|
|
179
|
+
## [1.0.0-beta.20] - 2025-11-25
|
|
180
|
+
|
|
181
|
+
### 🔧 Improvements
|
|
182
|
+
- Removed 1-second audio buffer requirement for auto-starting playback in Host mode
|
|
183
|
+
|
|
184
|
+
## [1.0.0-beta.19] - 2025-11-25
|
|
185
|
+
|
|
186
|
+
### 📚 Documentation
|
|
187
|
+
- **Fixed misleading documentation** - Corrected Host mode API documentation to accurately reflect that `yieldAudioData()` can be called directly to start a new session without requiring `playback()` first
|
|
188
|
+
- Removed misleading "after playback() is called" comments
|
|
189
|
+
- Clarified two ways to start a session: using `playback()` for existing data, or `yieldAudioData()` directly for streaming
|
|
190
|
+
- Updated all examples and workflow descriptions to reflect correct API usage
|
|
191
|
+
|
|
192
|
+
## [1.0.0-beta.18] - 2025-11-25
|
|
193
|
+
|
|
194
|
+
### 🔧 API Changes
|
|
195
|
+
- **Renamed `reqId` to `conversationId`** - Updated terminology for better clarity
|
|
196
|
+
- All methods and parameters that used `reqId` now use `conversationId`
|
|
197
|
+
- `getCurrentReqId()` → `getCurrentConversationId()`
|
|
198
|
+
- `generateReqId()` → `generateConversationId()`
|
|
199
|
+
- Updated all event logs and documentation to use `conversationId`
|
|
200
|
+
- Note: Protobuf protocol still uses `reqId` field name internally, but SDK API uses `conversationId`
|
|
201
|
+
|
|
202
|
+
### 📚 Documentation
|
|
203
|
+
- Enhanced Host mode documentation to clearly emphasize the workflow: send audio data first to get conversationId, then use that conversationId to send animation data
|
|
204
|
+
- Updated Host Mode Example and Host Mode Flow sections with clearer step-by-step instructions
|
|
205
|
+
|
|
206
|
+
## [1.0.0-beta.17] - 2025-11-24
|
|
207
|
+
|
|
208
|
+
### ✨ New Features
|
|
209
|
+
- **Audio-Only Fallback Mechanism** - SDK now includes automatic fallback to audio-only playback when animation data is unavailable
|
|
210
|
+
- SDK mode: Automatically enters audio-only mode when server returns an error
|
|
211
|
+
- Host mode: Automatically enters audio-only mode when empty animation data is provided
|
|
212
|
+
- Once in audio-only mode, subsequent animation data for that session is ignored
|
|
213
|
+
- Fallback mode is interruptible, just like normal playback mode
|
|
214
|
+
|
|
215
|
+
### 🔧 API Changes
|
|
216
|
+
- **Playback Mode Configuration** - Moved playback mode configuration from `AvatarView` constructor to `AvatarSDK.initialize()`
|
|
217
|
+
- Playback mode is now determined by `drivingServiceMode` in `AvatarSDK.initialize()` configuration
|
|
218
|
+
- `AvatarView` constructor now only requires `avatar` and `container` parameters
|
|
219
|
+
- Removed `AvatarViewOptions` interface
|
|
220
|
+
- `container` parameter is now required (no longer optional)
|
|
221
|
+
- **Method Renames** - Renamed methods in `AvatarController` for Host mode to better reflect their purpose
|
|
222
|
+
- `play()` → `playback()`: Renamed to better reflect that the method is used for playback of existing data (replay mode)
|
|
223
|
+
- Old API: `avatarController.play(initialAudioChunks, initialKeyframes)`
|
|
224
|
+
- New API: `avatarController.playback(initialAudioChunks, initialKeyframes)`
|
|
225
|
+
- `sendAudioChunk()` → `yieldAudioData()`: Renamed to better reflect that the method yields/streams audio data
|
|
226
|
+
- Old API: `avatarController.sendAudioChunk(data, isLast)`
|
|
227
|
+
- New API: `avatarController.yieldAudioData(data, isLast)`
|
|
228
|
+
- `sendKeyframes()` → `yieldFramesData()`: Renamed to better reflect that the method yields/streams animation keyframes
|
|
229
|
+
- Old API: `avatarController.sendKeyframes(keyframes, reqId)`
|
|
230
|
+
- New API: `avatarController.yieldFramesData(keyframes, conversationId)`
|
|
231
|
+
|
|
232
|
+
### 🔧 Improvements
|
|
233
|
+
- Extended transition animation duration from 200ms to 400ms for smoother end-of-playback transitions
|
|
234
|
+
|
|
235
|
+
### 📚 Documentation
|
|
236
|
+
- Updated README.md to use "SDK mode" and "Host mode" terminology instead of "Network mode" and "External data mode"
|
|
237
|
+
- Added fallback mechanism documentation
|
|
238
|
+
- Updated API reference to reflect new constructor signature
|
|
239
|
+
|
|
240
|
+
## [1.0.0-beta.16] - 2025-11-21
|
|
241
|
+
|
|
242
|
+
### ✨ New Features
|
|
243
|
+
- **Multi-AvatarView Support** - SDK now supports multiple `AvatarView` instances simultaneously
|
|
244
|
+
- Each `AvatarView` instance can manage its own character independently
|
|
245
|
+
- Multiple characters can be displayed and controlled at the same time
|
|
246
|
+
- Each instance maintains its own rendering context, playback state, and network connection
|
|
247
|
+
- Removed the previous limitation of "only one AvatarView instance at a time"
|
|
248
|
+
|
|
249
|
+
### 📚 Documentation
|
|
250
|
+
- Updated README.md to reflect multi-character support capabilities
|
|
251
|
+
- Added multi-character usage examples
|
|
252
|
+
- Removed outdated limitation notes about single AvatarView instance
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## [1.0.0-beta.15] - 2025-11-20
|
|
257
|
+
|
|
258
|
+
### ✨ New Features
|
|
259
|
+
- Added authentication support for API requests
|
|
260
|
+
- `appId` is now automatically included in HTTP headers (`X-App-Id`) and WebSocket URL query parameters
|
|
261
|
+
- `sessionToken` is now automatically included in HTTP headers (`Authorization: Bearer {token}`) and WebSocket URL query parameters
|
|
262
|
+
- All network requests (character loading, resource downloads, WebSocket connections) now include authentication credentials
|
|
263
|
+
|
|
264
|
+
### 🔧 Improvements
|
|
265
|
+
- Fixed canvas resize handling for different aspect ratios
|
|
266
|
+
- Projection matrix is now correctly updated when canvas aspect ratio changes
|
|
267
|
+
- Rendering system properly handles portrait (9:16) and landscape (16:9) aspect ratios
|
|
268
|
+
- Canvas automatically adapts to container size changes via ResizeObserver
|
|
269
|
+
|
|
270
|
+
### 🐛 Bug Fixes
|
|
271
|
+
- Fixed `RenderSystem.handleResize()` to update projection matrix when canvas size changes
|
|
272
|
+
- Previously only updated aspect ratio, now also updates projection matrix for correct rendering
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## [1.0.0-beta.14] - 2025-11-18
|
|
277
|
+
|
|
278
|
+
### ✨ New Features
|
|
279
|
+
- Added pause and resume functionality for avatar playback
|
|
280
|
+
- New `pause()` method to pause audio and animation playback
|
|
281
|
+
- New `resume()` method to resume playback from paused state
|
|
282
|
+
- Added `paused` state to `AvatarState` enum
|
|
283
|
+
- State changes are communicated via `onAvatarState` callback
|
|
284
|
+
- Works in both network mode and external data mode
|
|
285
|
+
|
|
286
|
+
### 🔧 Improvements
|
|
287
|
+
- Canvas now uses container's full dimensions instead of fixed 1:1 aspect ratio
|
|
288
|
+
- Canvas automatically adapts to container size (width and height)
|
|
289
|
+
- External developers can control canvas aspect ratio by setting container dimensions
|
|
290
|
+
- Rendering system correctly handles any aspect ratio without distortion
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## [1.0.0-beta.13] - 2025-11-17
|
|
295
|
+
|
|
296
|
+
### 🔒 API Improvements
|
|
297
|
+
- Reduced console noise by setting default log level to Warning
|
|
298
|
+
- Logger now only outputs warnings and errors by default
|
|
299
|
+
- Set `VITE_DEBUG_LOG=true` to enable all logs
|
|
300
|
+
- Simplified logger configuration using `setGlobalLogLevel(LogLevel.Warning)`
|
|
301
|
+
|
|
302
|
+
### 🐛 Bug Fixes
|
|
303
|
+
- Fixed SDK config loader warning in non-debug mode
|
|
304
|
+
- Config loading failures are now silently handled in production
|
|
305
|
+
- Warnings only shown when `VITE_DEBUG_LOG=true`
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## [1.0.0-beta.12] - 2025-11-17
|
|
310
|
+
|
|
311
|
+
### 🔒 API Improvements
|
|
312
|
+
- Marked performance monitoring APIs as internal
|
|
313
|
+
- `RenderPerformanceStats` interface and `getPerformanceStats()` method are now marked with `@internal` tag
|
|
314
|
+
- These APIs are not exposed in the public TypeScript definitions
|
|
315
|
+
- Reverted performance monitoring implementation to simpler version (only `renderTime` and `sortTime`)
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## [1.0.0-beta.11] - 2025-11-17
|
|
320
|
+
|
|
321
|
+
### 📚 Documentation
|
|
322
|
+
- Updated demo repository link in README.md
|
|
323
|
+
- Changed example project link from `Avatarkit-web-demo` to `AvatarSDK-Web-Demo` to match the new repository name
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## [1.0.0-beta.10] - 2025-11-16
|
|
328
|
+
|
|
329
|
+
### 🔒 API Improvements
|
|
330
|
+
- Cleaned up public API to hide internal implementation details
|
|
331
|
+
- Marked internal methods with `@internal` JSDoc tag to exclude them from TypeScript declarations
|
|
332
|
+
- Removed unused environment configuration options (`realtimeApiBaseUrl`, `realtimeWsUrl`)
|
|
333
|
+
- Added `appId` getter to `AvatarSDK` for accessing initialized app ID
|
|
334
|
+
- Internal methods like `getEnvironmentConfig`, `logEvent`, `getCanvas`, `getCameraConfig`, `updateCameraConfig` are now properly hidden from public API
|
|
335
|
+
|
|
336
|
+
### 🐛 Bug Fixes
|
|
337
|
+
- Fixed memory leaks when disposing AvatarView instances
|
|
338
|
+
- Improved resource cleanup to prevent memory leaks when switching or disposing avatar instances
|
|
339
|
+
- Properly clears all callbacks, event listeners, and large data buffers on disposal
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
## [1.0.0-beta.9] - 2025-11-15
|
|
343
|
+
|
|
344
|
+
### 🐛 Bug Fixes
|
|
345
|
+
- Fixed memory leaks when disposing AvatarView instances
|
|
346
|
+
- Improved resource cleanup to prevent memory leaks when switching or disposing avatar instances
|
|
347
|
+
- Properly clears all callbacks, event listeners, and large data buffers on disposal
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
## [1.0.0-beta.8] - 2025-11-14
|
|
352
|
+
|
|
353
|
+
### 🐛 Bug Fixes
|
|
354
|
+
- Fixed audio-animation synchronization issue after normal playback completion
|
|
355
|
+
- Playback state is now properly cleaned up when audio finishes normally, preventing synchronization issues in subsequent conversations
|
|
356
|
+
|
|
357
|
+
---
|
|
358
|
+
|
|
359
|
+
## [1.0.0-beta.7] - 2025-11-14
|
|
360
|
+
|
|
361
|
+
### 🔄 Refactoring
|
|
362
|
+
- Improved rendering state management for better stability and maintainability
|
|
363
|
+
|
|
364
|
+
### 🐛 Bug Fixes
|
|
365
|
+
- Fixed interrupt not generating transition animation when interrupting during playback
|
|
366
|
+
- Fixed transition animation being regenerated and reset in external data mode when sending keyframes after playback starts
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## [1.0.0-beta.6] - 2025-11-14
|
|
371
|
+
|
|
372
|
+
### 🐛 Bug Fixes
|
|
373
|
+
- Fixed transition animation being regenerated and reset in external data mode when sending keyframes after playback starts, causing the transition to play twice
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## [1.0.0-beta.5] - 2025-11-14
|
|
378
|
+
|
|
379
|
+
### 🐛 Bug Fixes
|
|
380
|
+
- Fixed missing `DrivingServiceMode` enum export in published package
|
|
381
|
+
|
|
382
|
+
---
|
|
383
|
+
|
|
8
384
|
## [1.0.0-beta.4] - 2025-11-14
|
|
9
385
|
|
|
10
386
|
### 🔄 Updates
|
|
@@ -30,7 +406,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
30
406
|
- **External Data Mode**:
|
|
31
407
|
- External components fully control audio and animation data acquisition
|
|
32
408
|
- SDK only responsible for synchronized playback of externally provided data
|
|
33
|
-
- Use `controller.
|
|
409
|
+
- Use `controller.playback()`, `controller.yieldAudioData()` and `controller.yieldFramesData()` methods
|
|
34
410
|
|
|
35
411
|
### ✨ New Features
|
|
36
412
|
|
|
@@ -66,7 +442,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
66
442
|
// New API
|
|
67
443
|
new AvatarView(avatar, {
|
|
68
444
|
container: container,
|
|
69
|
-
playbackMode:
|
|
445
|
+
playbackMode: DrivingServiceMode.sdk // or DrivingServiceMode.host
|
|
70
446
|
})
|
|
71
447
|
```
|
|
72
448
|
|