metamaker-for-three 0.1.17 → 0.1.19

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.
@@ -433,19 +433,22 @@ async function replaceIdol(opts: string | Uint8Array) {
433
433
  idol = await MMFT.core.parseGLTFModel(idolBuffer.buffer);
434
434
  } else {
435
435
  idol = await MMFT.core.parseGLTFModel(opts.buffer);
436
+ idol.scale.x = 5;
437
+ idol.scale.y = 5;
438
+ idol.scale.z = 5;
436
439
  }
437
440
  // MMFT.ClothPhysics.ClothPhysicManagerInstance.setClothPhysics(idol);
438
441
 
439
- idol.traverse((child) => {
440
- if (child.type == "Mesh" || child.type == "SkinnedMesh") {
441
- // child.material.envMap = envMap;
442
- const anyTing: any = child;
443
- anyTing.material.envMapIntensity = 0.3;
444
- anyTing.material.needsUpdate = true;
445
- child.castShadow = true;
446
- child.receiveShadow = true;
447
- }
448
- });
442
+ // idol.traverse((child) => {
443
+ // if (child.type == "Mesh" || child.type == "SkinnedMesh") {
444
+
445
+ // const anyTing: any = child;
446
+ // anyTing.material.envMapIntensity = 0.3;
447
+ // anyTing.material.needsUpdate = true;
448
+ // child.castShadow = true;
449
+ // child.receiveShadow = true;
450
+ // }
451
+ // });
449
452
  MMFT.core.resetPolygonOffset(idol, camera);
450
453
  mixer = new THREE.AnimationMixer(idol);
451
454
  scene.add(idol);
@@ -522,9 +525,10 @@ async function handleTTS(audio, teeth, emo) {
522
525
  */
523
526
  async function fetchTTSToAnim(text: string) {
524
527
  const tts = {
525
- voice_name: "zh-CN-XiaoxiaoNeural",
526
- speed: 42,
527
- volume: 100,
528
+ speed: 50,
529
+ volume: 50,
530
+ anim_agent: "mms",
531
+ voice_name: "zh-CN-YunyangNeural",
528
532
  };
529
533
  let response: any = await fetch("//open.metamaker.cn/api/openmm/v1/text_to_anim", {
530
534
  method: "post",
@@ -711,3 +715,5 @@ makeSignCode();
711
715
  setInterval(() => {
712
716
  makeSignCode();
713
717
  }, 60 * 1000 * 10);
718
+
719
+ MMFT.Env.TTSAnimationRatio = 1.5;