@spatialwalk/avatarkit 1.0.0-beta.55 → 1.0.0-beta.56

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,11 @@ 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.56] - 2025-01-05
9
+
10
+ ### ✨ New Features
11
+ - **Eye Tracking Config API** - Changed `eyeTrackingEnabled` to complete `eyefocus` configuration object in `PostProcessingConfig`. External callers must provide full `eyefocus` configuration (enabled, auto_eyelid_adjustment, eyelid_threshold, targets) instead of just a boolean flag.
12
+
8
13
  ## [1.0.0-beta.55] - 2025-01-05
9
14
 
10
15
  ### ✨ New Features
@@ -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-WcnOBRys.js";
4
+ import { A as APP_CONFIG, e as errorToMessage, l as logEvent, a as logger } from "./index-C4RgEOS1.js";
5
5
  class StreamingAudioPlayer {
6
6
  constructor(options) {
7
7
  __publicField(this, "audioContext", null);
@@ -60,7 +60,7 @@ export declare class AvatarController {
60
60
  private getEffectiveConversationId;
61
61
  getPointCount(): number | null;
62
62
  setPostProcessingConfig(config: PostProcessingConfig | null): void;
63
- private updateEyeTrackingEnabled;
63
+ private setEyeTrackingConfig;
64
64
  private rerenderCurrentFrame;
65
65
  setVolume(volume: number): void;
66
66
  getVolume(): number;
@@ -7639,7 +7639,7 @@ const _AnimationPlayer = class _AnimationPlayer {
7639
7639
  if (this.streamingPlayer) {
7640
7640
  return;
7641
7641
  }
7642
- const { StreamingAudioPlayer } = await import("./StreamingAudioPlayer-C6hiS_B5.js");
7642
+ const { StreamingAudioPlayer } = await import("./StreamingAudioPlayer-BL5cZ22i.js");
7643
7643
  const { AvatarSDK: AvatarSDK2 } = await Promise.resolve().then(() => AvatarSDK$1);
7644
7644
  const audioFormat = AvatarSDK2.getAudioFormat();
7645
7645
  this.streamingPlayer = new StreamingAudioPlayer({
@@ -9062,7 +9062,7 @@ class AvatarSDK {
9062
9062
  }
9063
9063
  __publicField(AvatarSDK, "_isInitialized", false);
9064
9064
  __publicField(AvatarSDK, "_configuration", null);
9065
- __publicField(AvatarSDK, "_version", "1.0.0-beta.55");
9065
+ __publicField(AvatarSDK, "_version", "1.0.0-beta.56");
9066
9066
  __publicField(AvatarSDK, "_avatarCore", null);
9067
9067
  __publicField(AvatarSDK, "_dynamicSdkConfig", null);
9068
9068
  const AvatarSDK$1 = Object.freeze(Object.defineProperty({
@@ -11212,31 +11212,36 @@ class AvatarController {
11212
11212
  }
11213
11213
  setPostProcessingConfig(config) {
11214
11214
  this.postProcessingConfig = config;
11215
- if ((config == null ? void 0 : config.eyeTrackingEnabled) !== void 0) {
11216
- this.updateEyeTrackingEnabled(config.eyeTrackingEnabled).catch((error) => {
11217
- logger.warn("[AvatarController] Failed to update eye tracking enabled state:", error instanceof Error ? error.message : String(error));
11215
+ if (config == null ? void 0 : config.eyefocus) {
11216
+ this.setEyeTrackingConfig(config.eyefocus).catch((error) => {
11217
+ logger.warn("[AvatarController] Failed to set eye tracking config:", error instanceof Error ? error.message : String(error));
11218
11218
  });
11219
11219
  }
11220
11220
  if (this.currentState === AvatarState.paused && this.isPlaying) {
11221
11221
  this.rerenderCurrentFrame();
11222
11222
  }
11223
11223
  }
11224
- async updateEyeTrackingEnabled(enabled) {
11225
- var _a;
11224
+ async setEyeTrackingConfig(eyefocus) {
11226
11225
  const avatarCore = AvatarSDK.getAvatarCore();
11227
11226
  if (!avatarCore || !this.characterId) {
11228
11227
  return;
11229
11228
  }
11230
11229
  try {
11231
- const characterMeta = this.avatar.getCharacterMeta();
11232
- const eyefocus = (_a = characterMeta.characterSettings) == null ? void 0 : _a.eyefocus;
11233
11230
  await avatarCore.setEyeTrackingConfig({
11234
- enabled,
11235
- auto_eyelid_adjustment: (eyefocus == null ? void 0 : eyefocus.auto_eyelid_adjustment) ?? true,
11236
- eyelid_threshold: (eyefocus == null ? void 0 : eyefocus.eyelid_threshold) ?? 0.2
11231
+ enabled: eyefocus.enabled,
11232
+ auto_eyelid_adjustment: eyefocus.auto_eyelid_adjustment ?? true,
11233
+ eyelid_threshold: eyefocus.eyelid_threshold ?? 0.2
11237
11234
  }, this.characterId);
11235
+ if (eyefocus.targets && eyefocus.targets.length >= 3) {
11236
+ await avatarCore.setGazeTarget(
11237
+ eyefocus.targets[0],
11238
+ eyefocus.targets[1],
11239
+ eyefocus.targets[2],
11240
+ this.characterId
11241
+ );
11242
+ }
11238
11243
  } catch (error) {
11239
- logger.warn("[AvatarController] Failed to update eye tracking enabled state:", error instanceof Error ? error.message : String(error));
11244
+ logger.warn("[AvatarController] Failed to set eye tracking config:", error instanceof Error ? error.message : String(error));
11240
11245
  }
11241
11246
  }
11242
11247
  async rerenderCurrentFrameIfPaused() {
@@ -14137,7 +14142,7 @@ class AvatarView {
14137
14142
  auto_eyelid_adjustment: eyefocus.auto_eyelid_adjustment,
14138
14143
  eyelid_threshold: eyefocus.eyelid_threshold
14139
14144
  }, this.characterId);
14140
- if (eyefocus.enabled && eyefocus.targets && eyefocus.targets.length >= 3) {
14145
+ if (eyefocus.targets && eyefocus.targets.length >= 3) {
14141
14146
  await avatarCore.setGazeTarget(
14142
14147
  eyefocus.targets[0],
14143
14148
  eyefocus.targets[1],
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b, c, f, d, j, g, C, i, D, E, k, h, L, R, S, m } from "./index-WcnOBRys.js";
1
+ import { b, c, f, d, j, g, C, i, D, E, k, h, L, R, S, m } from "./index-C4RgEOS1.js";
2
2
  export {
3
3
  b as Avatar,
4
4
  c as AvatarController,
@@ -131,6 +131,11 @@ export interface PostProcessingConfig {
131
131
  };
132
132
  eyeBlink?: number;
133
133
  expressionWeight?: number;
134
- eyeTrackingEnabled?: boolean;
134
+ eyefocus?: {
135
+ enabled: boolean;
136
+ auto_eyelid_adjustment?: boolean;
137
+ eyelid_threshold?: number;
138
+ targets?: number[];
139
+ };
135
140
  }
136
141
  export * from './character';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spatialwalk/avatarkit",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.55",
4
+ "version": "1.0.0-beta.56",
5
5
  "packageManager": "pnpm@10.18.2",
6
6
  "description": "SPAvatar SDK - 3D Gaussian Splatting Avatar Rendering SDK",
7
7
  "author": "SPAvatar Team",