@spatius/avatarkit 1.2.0-beta.1 → 1.2.0-beta.3
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 +10 -0
- package/dist/{StreamingAudioPlayer-Br8UrVgO.js → StreamingAudioPlayer-Ciurs5Zc.js} +11 -11
- package/dist/avatar_core_wasm-C-3YSVeh.js +2697 -0
- package/dist/{avatar_core_wasm-bd762669.wasm → avatar_core_wasm-f7208ab9.wasm} +0 -0
- package/dist/core/AvatarController.d.ts +1 -8
- package/dist/index-Dgung4xA.js +21781 -0
- package/dist/index.js +1 -1
- package/dist/types/character.d.ts +5 -0
- package/dist/types/index.d.ts +2 -47
- package/package.json +1 -1
- package/dist/avatar_core_wasm-CQbUl6zN.js +0 -2696
- package/dist/index-DHCQ9wsL.js +0 -21856
package/dist/index.js
CHANGED
|
@@ -29,6 +29,11 @@ export interface CustomAnimation {
|
|
|
29
29
|
export interface CharacterAsset {
|
|
30
30
|
characterId: string;
|
|
31
31
|
version: string;
|
|
32
|
+
/**
|
|
33
|
+
* 资产兼容性标记。core 据此精确匹配渲染逻辑:
|
|
34
|
+
* [] → 基础;["easy_body"] → 身体固定;其它组合 → 当前 SDK 不支持。
|
|
35
|
+
*/
|
|
36
|
+
compatibilityFlags: string[];
|
|
32
37
|
createdAt?: string;
|
|
33
38
|
updatedAt?: string;
|
|
34
39
|
camera?: ResourceHolder;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -107,6 +107,8 @@ export declare enum ErrorCode {
|
|
|
107
107
|
invalidAvatarMetadata = "invalidAvatarMetadata",
|
|
108
108
|
/** Failed to download avatar assets */
|
|
109
109
|
failedToDownloadAvatarAssets = "failedToDownloadAvatarAssets",
|
|
110
|
+
/** Avatar asset compatibility_flags not supported by this SDK version (upgrade SDK) */
|
|
111
|
+
unsupportedAvatarAsset = "unsupportedAvatarAsset",
|
|
110
112
|
/** WebSocket connection error (handshake failure, network error) */
|
|
111
113
|
websocketError = "websocketError",
|
|
112
114
|
/** WebSocket connection closed abnormally (close code 1006) */
|
|
@@ -147,53 +149,6 @@ export interface CameraConfig {
|
|
|
147
149
|
up?: [number, number, number];
|
|
148
150
|
aspect?: number;
|
|
149
151
|
}
|
|
150
|
-
/**
|
|
151
|
-
* Post-processing parameter configuration
|
|
152
|
-
* Used to overlay in real-time on animation parameters returned by the server
|
|
153
|
-
*/
|
|
154
|
-
export interface PostProcessingConfig {
|
|
155
|
-
/** Rotation (Euler angles, in radians) */
|
|
156
|
-
rotation?: {
|
|
157
|
-
x?: number;
|
|
158
|
-
y?: number;
|
|
159
|
-
z?: number;
|
|
160
|
-
};
|
|
161
|
-
/** Translation (position offset) */
|
|
162
|
-
translation?: {
|
|
163
|
-
x?: number;
|
|
164
|
-
y?: number;
|
|
165
|
-
z?: number;
|
|
166
|
-
};
|
|
167
|
-
/** Neck pose offset (in radians) */
|
|
168
|
-
neckPose?: {
|
|
169
|
-
x?: number;
|
|
170
|
-
y?: number;
|
|
171
|
-
z?: number;
|
|
172
|
-
weightX?: number;
|
|
173
|
-
weightY?: number;
|
|
174
|
-
weightZ?: number;
|
|
175
|
-
};
|
|
176
|
-
/** Jaw pose offset (in radians) */
|
|
177
|
-
jawPose?: {
|
|
178
|
-
x?: number;
|
|
179
|
-
y?: number;
|
|
180
|
-
z?: number;
|
|
181
|
-
weight?: number;
|
|
182
|
-
};
|
|
183
|
-
/** Eye pose offset (in radians) */
|
|
184
|
-
eyePose?: {
|
|
185
|
-
x?: number;
|
|
186
|
-
y?: number;
|
|
187
|
-
z?: number;
|
|
188
|
-
weightX?: number;
|
|
189
|
-
weightY?: number;
|
|
190
|
-
weightZ?: number;
|
|
191
|
-
};
|
|
192
|
-
/** Eye blink value (-1.0 to 1.0, larger value means more closed) */
|
|
193
|
-
eyeBlink?: number;
|
|
194
|
-
/** Expression weight (0.0-2.0, 0=no expression, 1=normal, >1=enhanced) */
|
|
195
|
-
expressionWeight?: number;
|
|
196
|
-
}
|
|
197
152
|
export interface CharacterInfo {
|
|
198
153
|
pointCount: number;
|
|
199
154
|
hasAnimation: boolean;
|
package/package.json
CHANGED