Skip to content
ν”„λ‘œμ νŠΈ

μ†Œκ°œ

πŸ₯¬πŸ’ƒ Use MMD on Three.js

μ°½μž‘ 및 λ―Έλ””μ–΄

이 수치λ₯Ό μΈ‘μ •ν•˜λŠ” 방법

μΈ‘μ •λœ μŠ€νƒ€ 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기둝 μˆ˜μ§‘ 쀑

μ„œλ‘œ κ²ΉμΉ˜λŠ” κΈ°κ°„μ˜ μˆœμ¦κ°€λŸ‰μ΄λ©° 일별 합계가 μ•„λ‹™λ‹ˆλ‹€. 츑정값이 μ—†μœΌλ©΄ λΉ„μ›Œ λ‘‘λ‹ˆλ‹€. μŠ€νƒ€λŠ” 관심도λ₯Ό λ‚˜νƒ€λ‚΄λ©° ν’ˆμ§ˆμ„ 보μž₯ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

README.md

Original

@moeru/three-mmd

Use MMD on Three.js

Packages

Install

pnpm add three @moeru/three-mmd
pnpm add -D @types/three

Basic usage

import { buildAnimation, MMDLoader, VMDLoader } from '@moeru/three-mmd'
import { AnimationMixer, Timer } from 'three'

const mmd = await new MMDLoader().loadAsync('/models/miku_v2.pmd')
const vmd = await new VMDLoader().loadAsync('/motions/wavefile_v2.vmd')
const mixer = new AnimationMixer(mmd.mesh)
const timer = new Timer()

mixer.clipAction(buildAnimation(vmd, mmd.mesh)).play()

// Call this once per render frame.
const update = () =>
  mmd.updateWithMixer(timer.getDelta(), mixer)

updateWithMixer() restores the previous animation pose, advances the mixer, then applies MMD IK, grants, and the optional physics service. Use update() directly when the mixer is managed elsewhere; do not call both methods for the same frame.

Physics

Physics is provided by separate packages. Register one plugin before loading the model:

import { MMDLoader } from '@moeru/three-mmd'
import { MMDAmmoPlugin } from '@moeru/three-mmd-physics-ammo'

const mmd = await new MMDLoader()
  .register(MMDAmmoPlugin)
  .loadAsync('/models/miku_v2.pmd')

The default material backend is the WebGL MMDToonMaterial.

See also

License

MIT

This project is based on the code from babylon-mmd, three.js and three-ts-types r171.

Sponsors

sponsors

κ΄€λ ¨ ν”„λ‘œμ νŠΈ μ‚΄νŽ΄λ³΄κΈ°

λΆˆλŸ¬μ˜€λŠ” 쀑…