Skip to content

aisyui/model

This branch is 1 commit ahead of, 16 commits behind syui/vrm-dance-viewer:deploy.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2666c2c · Mar 22, 2024

History

39 Commits
Mar 22, 2024
Mar 20, 2021
Mar 22, 2024
Mar 22, 2024
Mar 22, 2024
Mar 22, 2024
Jan 23, 2021
Mar 22, 2024
Mar 22, 2024
Feb 2, 2021
Mar 22, 2024
Mar 22, 2024
Feb 2, 2021
Mar 22, 2024

Repository files navigation

support three-vrm v0.6

When using three-vrm v1.0 or higher, the model does not display well.

  • npm : v16

  • vrm : v0.6

$ git clone https://github.com/aisyui/model
$ cd model
$ git checkout deploy
$ nvm use 16
$ yarn install
$ yarn dev

fix t-pose

Fixed setting to lower hands from T-pose. This affects the pose when loading the model.

src/worker/vrm-idle-helper.ts

function updateIdlePose(model: VRM, deltaTime: number) {
  if (!model.humanoid) return;
  const totalTime = (totalTimes.get(model) || 0) + deltaTime;
  totalTimes.set(model, totalTime);
  for (const [bone, rotation] of idlePose) {
    const node = model.humanoid.getBoneNode(bone);
    let finalRotation = rotation;
    const breathRotation = breathPose.get(bone);
    if (breathRotation)
      finalRotation = rotation2
      .copy(rotation)
      .slerp(breathRotation, MathUtils.pingpong(totalTime, BREATH_CYCLE));
    if (node) node.setRotationFromQuaternion(
      rotation3
      .setFromRotationMatrix(node.matrix)
      //.slerp(finalRotation, Math.min(deltaTime * LERP_SCALE, 1)),
    );
  }
}

remove blink

updateEyeBlink : If the position of the face changes, the entire face will be out of alignment.

// model.blendShapeProxy.setValue('blink', 1);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 95.3%
  • JavaScript 2.9%
  • CSS 1.1%
  • HTML 0.7%