@sage-rsc/talking-head-react 1.0.36 → 1.0.38

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/dist/index.js CHANGED
@@ -2734,9 +2734,9 @@ class Le {
2734
2734
  cameraPanEnable: !1,
2735
2735
  cameraZoomEnable: !1,
2736
2736
  lightAmbientColor: 16777215,
2737
- lightAmbientIntensity: 2,
2737
+ lightAmbientIntensity: 1.2,
2738
2738
  lightDirectColor: 8947882,
2739
- lightDirectIntensity: 30,
2739
+ lightDirectIntensity: 18,
2740
2740
  lightDirectPhi: 1,
2741
2741
  lightDirectTheta: 2,
2742
2742
  lightSpotIntensity: 0,
@@ -7208,14 +7208,14 @@ const $e = ye(({
7208
7208
  onSpeechEnd: () => {
7209
7209
  setTimeout(() => {
7210
7210
  g.current && g.current();
7211
- }, 1e3);
7211
+ }, 100);
7212
7212
  }
7213
7213
  }) : u.current.speakText(R, {
7214
7214
  lipsyncLang: ne.lipsyncLang,
7215
7215
  onSpeechEnd: () => {
7216
7216
  setTimeout(() => {
7217
7217
  I.current && I.current();
7218
- }, 1e3);
7218
+ }, 100);
7219
7219
  }
7220
7220
  });
7221
7221
  }
@@ -7299,13 +7299,13 @@ const $e = ye(({
7299
7299
  lessonIndex: l.current.currentLessonIndex
7300
7300
  }), u.current && (u.current.setMood("happy"), u.current.setBodyMovement("idle"), setTimeout(() => {
7301
7301
  d.current && d.current();
7302
- }, 500))) : l.current.currentModuleIndex < (b.modules?.length || 0) - 1 ? (l.current.currentModuleIndex += 1, l.current.currentLessonIndex = 0, l.current.currentQuestionIndex = 0, l.current.lessonCompleted = !1, l.current.isQuestionMode = !1, l.current.isTeaching = !1, l.current.score = 0, l.current.totalQuestions = 0, c.current.onCustomAction({
7302
+ }, 100))) : l.current.currentModuleIndex < (b.modules?.length || 0) - 1 ? (l.current.currentModuleIndex += 1, l.current.currentLessonIndex = 0, l.current.currentQuestionIndex = 0, l.current.lessonCompleted = !1, l.current.isQuestionMode = !1, l.current.isTeaching = !1, l.current.score = 0, l.current.totalQuestions = 0, c.current.onCustomAction({
7303
7303
  type: "lessonStart",
7304
7304
  moduleIndex: l.current.currentModuleIndex,
7305
7305
  lessonIndex: l.current.currentLessonIndex
7306
7306
  }), u.current && (u.current.setMood("happy"), u.current.setBodyMovement("idle"), setTimeout(() => {
7307
7307
  d.current && d.current();
7308
- }, 500))) : I.current && I.current();
7308
+ }, 100))) : I.current && I.current();
7309
7309
  }, []), V = M(() => {
7310
7310
  const b = v();
7311
7311
  let R = null;
@@ -7339,7 +7339,7 @@ const $e = ye(({
7339
7339
  onSpeechEnd: () => {
7340
7340
  l.current.isTeaching = !1, setTimeout(() => {
7341
7341
  b.questions && b.questions.length > 0 ? H.current && H.current() : f.current && f.current();
7342
- }, 500);
7342
+ }, 50);
7343
7343
  }
7344
7344
  });
7345
7345
  }
@@ -7367,7 +7367,7 @@ const $e = ye(({
7367
7367
  onSpeechEnd: () => {
7368
7368
  setTimeout(() => {
7369
7369
  x.current && x.current();
7370
- }, 500);
7370
+ }, 50);
7371
7371
  }
7372
7372
  });
7373
7373
  } else {
@@ -7384,7 +7384,7 @@ const $e = ye(({
7384
7384
  onSpeechEnd: () => {
7385
7385
  setTimeout(() => {
7386
7386
  x.current && x.current();
7387
- }, 500);
7387
+ }, 50);
7388
7388
  }
7389
7389
  });
7390
7390
  }
@@ -7425,7 +7425,7 @@ const $e = ye(({
7425
7425
  const R = v(), w = R?.avatar_script || R?.body;
7426
7426
  h && w && setTimeout(() => {
7427
7427
  d.current && d.current();
7428
- }, 1e3);
7428
+ }, 200);
7429
7429
  }, [h, v]);
7430
7430
  Ce(() => {
7431
7431
  d.current = V, g.current = W, f.current = K, x.current = F, I.current = J, H.current = S, p.current = j;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sage-rsc/talking-head-react",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "A reusable React component for 3D talking avatars with lip-sync and text-to-speech",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -219,7 +219,7 @@ const CurriculumLearning = forwardRef(({
219
219
  if (nextLessonRef.current) {
220
220
  nextLessonRef.current();
221
221
  }
222
- }, 1000);
222
+ }, 100);
223
223
  }
224
224
  });
225
225
  } else {
@@ -232,7 +232,7 @@ const CurriculumLearning = forwardRef(({
232
232
  if (completeCurriculumRef.current) {
233
233
  completeCurriculumRef.current();
234
234
  }
235
- }, 1000);
235
+ }, 100);
236
236
  }
237
237
  });
238
238
  }
@@ -405,12 +405,12 @@ const CurriculumLearning = forwardRef(({
405
405
  avatarRef.current.setMood("happy");
406
406
  avatarRef.current.setBodyMovement("idle");
407
407
 
408
- // Automatically start teaching the next lesson after a brief pause
408
+ // Automatically start teaching the next lesson after a brief pause
409
409
  setTimeout(() => {
410
410
  if (startTeachingRef.current) {
411
411
  startTeachingRef.current();
412
412
  }
413
- }, 500);
413
+ }, 100);
414
414
  }
415
415
  } else {
416
416
  // No more lessons in current module - check if there's a next module
@@ -439,11 +439,11 @@ const CurriculumLearning = forwardRef(({
439
439
  avatarRef.current.setBodyMovement("idle");
440
440
 
441
441
  // Automatically start teaching the next lesson after a brief pause
442
- setTimeout(() => {
443
- if (startTeachingRef.current) {
444
- startTeachingRef.current();
445
- }
446
- }, 500);
442
+ setTimeout(() => {
443
+ if (startTeachingRef.current) {
444
+ startTeachingRef.current();
445
+ }
446
+ }, 100);
447
447
  }
448
448
  } else {
449
449
  // No more modules or lessons - complete curriculum
@@ -512,7 +512,7 @@ const CurriculumLearning = forwardRef(({
512
512
  // Wait for avatar to finish speaking before moving to questions
513
513
  avatarRef.current.speakText(teachingText, {
514
514
  lipsyncLang: config.lipsyncLang,
515
- onSpeechEnd: () => {
515
+ onSpeechEnd: () => {
516
516
  stateRef.current.isTeaching = false;
517
517
  // Add a small delay after speech ends for natural flow
518
518
  setTimeout(() => {
@@ -527,7 +527,7 @@ const CurriculumLearning = forwardRef(({
527
527
  completeLessonRef.current();
528
528
  }
529
529
  }
530
- }, 500);
530
+ }, 50);
531
531
  }
532
532
  });
533
533
  }
@@ -577,7 +577,7 @@ const CurriculumLearning = forwardRef(({
577
577
  if (nextQuestionRef.current) {
578
578
  nextQuestionRef.current();
579
579
  }
580
- }, 500);
580
+ }, 50);
581
581
  }
582
582
  });
583
583
  } else {
@@ -605,7 +605,7 @@ const CurriculumLearning = forwardRef(({
605
605
  if (nextQuestionRef.current) {
606
606
  nextQuestionRef.current();
607
607
  }
608
- }, 500);
608
+ }, 50);
609
609
  }
610
610
  });
611
611
  }
@@ -685,7 +685,7 @@ const CurriculumLearning = forwardRef(({
685
685
  if (startTeachingRef.current) {
686
686
  startTeachingRef.current();
687
687
  }
688
- }, 1000);
688
+ }, 200);
689
689
  }
690
690
  }, [autoStart, getCurrentLesson]);
691
691
 
@@ -168,9 +168,9 @@ class TalkingHead {
168
168
  cameraPanEnable: false,
169
169
  cameraZoomEnable: false,
170
170
  lightAmbientColor: 0xffffff,
171
- lightAmbientIntensity: 2,
171
+ lightAmbientIntensity: 1.2,
172
172
  lightDirectColor: 0x8888aa,
173
- lightDirectIntensity: 30,
173
+ lightDirectIntensity: 18,
174
174
  lightDirectPhi: 1,
175
175
  lightDirectTheta: 2,
176
176
  lightSpotIntensity: 0,