@spatialwalk/avatarkit 1.0.0-beta.50 → 1.0.0-beta.51
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
CHANGED
|
@@ -5,6 +5,16 @@ 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.51] - 2025-01-05
|
|
9
|
+
|
|
10
|
+
### 🐛 Bugfix
|
|
11
|
+
- **Character Settings Update** - Fixed issue where cached Avatar instances would not update `characterSettings` in resources when `characterMeta` was updated. Now `resources.characterSettings` is synchronized when `characterMeta` changes, ensuring new `AvatarView` instances use the latest configuration.
|
|
12
|
+
|
|
13
|
+
### ✨ New Features
|
|
14
|
+
- **Post-Processing Config Enhancement** - Added `translation` and `eyePose` fields to `PostProcessingConfig` interface:
|
|
15
|
+
- `translation`: Position offset (x, y, z)
|
|
16
|
+
- `eyePose`: Eye pose offset with bias and weights (x, y, z, weightX, weightY, weightZ), applied to both left and right eyes
|
|
17
|
+
|
|
8
18
|
## [1.0.0-beta.50] - 2025-01-05
|
|
9
19
|
|
|
10
20
|
### 🔧 Performance Improvements
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import { A as APP_CONFIG, e as errorToMessage, l as logEvent, a as logger } from "./index-
|
|
4
|
+
import { A as APP_CONFIG, e as errorToMessage, l as logEvent, a as logger } from "./index-D2_q6K22.js";
|
|
5
5
|
class StreamingAudioPlayer {
|
|
6
6
|
constructor(options) {
|
|
7
7
|
__publicField(this, "audioContext", null);
|
|
@@ -15,6 +15,9 @@ class Avatar {
|
|
|
15
15
|
}
|
|
16
16
|
updateCharacterMeta(newMeta) {
|
|
17
17
|
this.characterMeta = newMeta;
|
|
18
|
+
if (this.resources.characterSettings !== newMeta.characterSettings) {
|
|
19
|
+
this.resources.characterSettings = newMeta.characterSettings;
|
|
20
|
+
}
|
|
18
21
|
}
|
|
19
22
|
getResources() {
|
|
20
23
|
return this.resources;
|
|
@@ -7576,7 +7579,7 @@ const _AnimationPlayer = class _AnimationPlayer {
|
|
|
7576
7579
|
if (this.streamingPlayer) {
|
|
7577
7580
|
return;
|
|
7578
7581
|
}
|
|
7579
|
-
const { StreamingAudioPlayer } = await import("./StreamingAudioPlayer-
|
|
7582
|
+
const { StreamingAudioPlayer } = await import("./StreamingAudioPlayer-DXKLgGU3.js");
|
|
7580
7583
|
const { AvatarSDK: AvatarSDK2 } = await Promise.resolve().then(() => AvatarSDK$1);
|
|
7581
7584
|
const audioFormat = AvatarSDK2.getAudioFormat();
|
|
7582
7585
|
this.streamingPlayer = new StreamingAudioPlayer({
|
|
@@ -8966,7 +8969,7 @@ class AvatarSDK {
|
|
|
8966
8969
|
}
|
|
8967
8970
|
__publicField(AvatarSDK, "_isInitialized", false);
|
|
8968
8971
|
__publicField(AvatarSDK, "_configuration", null);
|
|
8969
|
-
__publicField(AvatarSDK, "_version", "1.0.0-beta.
|
|
8972
|
+
__publicField(AvatarSDK, "_version", "1.0.0-beta.51");
|
|
8970
8973
|
__publicField(AvatarSDK, "_avatarCore", null);
|
|
8971
8974
|
__publicField(AvatarSDK, "_dynamicSdkConfig", null);
|
|
8972
8975
|
const AvatarSDK$1 = Object.freeze(Object.defineProperty({
|
|
@@ -11569,6 +11572,11 @@ class AvatarController {
|
|
|
11569
11572
|
result2.rotation[1] += this.postProcessingConfig.rotation.y ?? 0;
|
|
11570
11573
|
result2.rotation[2] += this.postProcessingConfig.rotation.z ?? 0;
|
|
11571
11574
|
}
|
|
11575
|
+
if (this.postProcessingConfig.translation && result2.translation) {
|
|
11576
|
+
result2.translation[0] += this.postProcessingConfig.translation.x ?? 0;
|
|
11577
|
+
result2.translation[1] += this.postProcessingConfig.translation.y ?? 0;
|
|
11578
|
+
result2.translation[2] += this.postProcessingConfig.translation.z ?? 0;
|
|
11579
|
+
}
|
|
11572
11580
|
if (this.postProcessingConfig.neckPose && result2.neck_pose) {
|
|
11573
11581
|
const biasX = this.postProcessingConfig.neckPose.x ?? 0;
|
|
11574
11582
|
const biasY = this.postProcessingConfig.neckPose.y ?? 0;
|
|
@@ -11589,6 +11597,20 @@ class AvatarController {
|
|
|
11589
11597
|
result2.jaw_pose[1] = result2.jaw_pose[1] * weight + biasY;
|
|
11590
11598
|
result2.jaw_pose[2] = result2.jaw_pose[2] * weight + biasZ;
|
|
11591
11599
|
}
|
|
11600
|
+
if (this.postProcessingConfig.eyePose && result2.eyes_pose) {
|
|
11601
|
+
const biasX = this.postProcessingConfig.eyePose.x ?? 0;
|
|
11602
|
+
const biasY = this.postProcessingConfig.eyePose.y ?? 0;
|
|
11603
|
+
const biasZ = this.postProcessingConfig.eyePose.z ?? 0;
|
|
11604
|
+
const weightX = this.postProcessingConfig.eyePose.weightX ?? 1;
|
|
11605
|
+
const weightY = this.postProcessingConfig.eyePose.weightY ?? 1;
|
|
11606
|
+
const weightZ = this.postProcessingConfig.eyePose.weightZ ?? 1;
|
|
11607
|
+
result2.eyes_pose[0] = result2.eyes_pose[0] * weightX + biasX;
|
|
11608
|
+
result2.eyes_pose[1] = result2.eyes_pose[1] * weightY + biasY;
|
|
11609
|
+
result2.eyes_pose[2] = result2.eyes_pose[2] * weightZ + biasZ;
|
|
11610
|
+
result2.eyes_pose[3] = result2.eyes_pose[3] * weightX + biasX;
|
|
11611
|
+
result2.eyes_pose[4] = result2.eyes_pose[4] * weightY + biasY;
|
|
11612
|
+
result2.eyes_pose[5] = result2.eyes_pose[5] * weightZ + biasZ;
|
|
11613
|
+
}
|
|
11592
11614
|
if (this.postProcessingConfig.eyeBlink !== void 0 && result2.eyelid) {
|
|
11593
11615
|
const blinkValue = this.postProcessingConfig.eyeBlink;
|
|
11594
11616
|
result2.eyelid[0] = blinkValue;
|
package/dist/index.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -102,6 +102,11 @@ export interface PostProcessingConfig {
|
|
|
102
102
|
y?: number;
|
|
103
103
|
z?: number;
|
|
104
104
|
};
|
|
105
|
+
translation?: {
|
|
106
|
+
x?: number;
|
|
107
|
+
y?: number;
|
|
108
|
+
z?: number;
|
|
109
|
+
};
|
|
105
110
|
neckPose?: {
|
|
106
111
|
x?: number;
|
|
107
112
|
y?: number;
|
|
@@ -116,6 +121,14 @@ export interface PostProcessingConfig {
|
|
|
116
121
|
z?: number;
|
|
117
122
|
weight?: number;
|
|
118
123
|
};
|
|
124
|
+
eyePose?: {
|
|
125
|
+
x?: number;
|
|
126
|
+
y?: number;
|
|
127
|
+
z?: number;
|
|
128
|
+
weightX?: number;
|
|
129
|
+
weightY?: number;
|
|
130
|
+
weightZ?: number;
|
|
131
|
+
};
|
|
119
132
|
eyeBlink?: number;
|
|
120
133
|
expressionWeight?: number;
|
|
121
134
|
}
|
package/package.json
CHANGED