@myned-ai/gsplat-flame-avatar-renderer 1.0.5 → 1.0.6

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.
@@ -1,12 +1,15 @@
1
1
  /**
2
2
  * AnimationManager
3
- *
3
+ *
4
4
  * Derived from gaussian-splat-renderer-for-lam
5
5
  * Manages animation state machine with Three.js AnimationMixer.
6
6
  */
7
7
 
8
8
  import { LoopOnce, LoopRepeat } from 'three';
9
9
  import { TYVoiceChatState } from './AppConstants.js';
10
+ import { getLogger } from '../utils/Logger.js';
11
+
12
+ const logger = getLogger('AnimationManager');
10
13
 
11
14
  /**
12
15
  * Base State class for animation states
@@ -256,7 +259,7 @@ class Think extends State {
256
259
  class Speak extends State {
257
260
  constructor(actions, isGroup) {
258
261
  super(actions, isGroup);
259
- console.log('[SPEAK] Initialized with', actions?.length || 0, 'actions, isGroup:', isGroup);
262
+ logger.debug('[SPEAK] Initialized with', actions?.length || 0, 'actions, isGroup:', isGroup);
260
263
  }
261
264
 
262
265
  /**
@@ -271,7 +274,7 @@ class Speak extends State {
271
274
  // Safety check: return early if no actions available
272
275
  if (!this.actions || this.actions.length === 0) {
273
276
  if (!this._warnedNoActions) {
274
- console.warn('[SPEAK] No actions available!');
277
+ logger.warn('[SPEAK] No actions available!');
275
278
  this._warnedNoActions = true;
276
279
  }
277
280
  return;
@@ -283,7 +286,7 @@ class Speak extends State {
283
286
  this.isPlaying === false) {
284
287
  // Randomly select initial animation
285
288
  this.stage = Math.ceil(this.getRandomNumber(0, this.actions.length - 1));
286
- console.log('[SPEAK] Starting animation, stage:', this.stage, 'of', this.actions.length);
289
+ logger.debug('[SPEAK] Starting animation, stage:', this.stage, 'of', this.actions.length);
287
290
  this.actions[this.stage].time = 0;
288
291
  this.actions[this.stage].play();
289
292
  AnimationManager.SetWeight(this.actions[this.stage], 1.0);
@@ -304,7 +307,7 @@ class Speak extends State {
304
307
  const lastAction = this.actions[this.stage];
305
308
  // Pick a different random animation
306
309
  this.stage = (this.stage + Math.ceil(this.getRandomNumber(1, this.actions.length - 1))) % this.actions.length;
307
- console.log('[SPEAK] Cycling to next animation, stage:', this.stage);
310
+ logger.debug('[SPEAK] Cycling to next animation, stage:', this.stage);
308
311
  this.actions[this.stage].time = 0;
309
312
  this.actions[this.stage].play();
310
313
  AnimationManager.SetWeight(this.actions[this.stage], 1.0);