Use MMD on Three.js
npm i three @moeru/three-mmd npm i -D @types/threeThere may be significant changes in future versions, so this is unstable.
import { MMDLoader } from '@moeru/three-mmd' import { Scene } from 'three' const scene = new Scene() const loader = new MMDLoader() loader.load( // URL of the model you want to load '/models/miku_v2.pmd', // called when the resource is loaded mmd => scene.add(mmd.mesh), // called while loading is progressing progress => console.log('Loading model...', 100.0 * (progress.loaded / progress.total), '%'), // called when loading has errors error => console.error(error), )- PBR-based Material
- Rapier physics
- WebGPURenderer compatibility
This project is based on the code from babylon-mmd, three.js and three-ts-types r171.