Error of MMDLoader.js in Native

Hello Developers,

I am using MMDLoader to load the MIKI. When I am using the MMDloader.js (three.js-master\examples\jsm\loaders\MMDLoader.js) in ES6 is good, but there is an error when I using the MMDLoader.js in Native(three.js-master\examples\js\loaders\MMDLoader.js) 。

I’m not sure if I’m using it in the wrong way or if there’s something wrong with the js.
I hope I’m using it in the wrong way
var MLoader = new THREE.MMDLoader();
`
function loadPost( poseIndex ) {

MLoader.load( modelFile, function ( object ) {
	MMDmesh = object;
	MMDmesh.position.y = - 150;
	MMDmesh.scale.set( 12, 12, 12 );
	MMDmesh.name = 'miku';
	scene.add( MMDmesh );
	initMMDGui();
}, onProgress, null );

}
`


It seems you are not importing MMDParser which is a dependency of MMDLoader. In the line below, there is actually a description that tells you what to do:

throw new Error( ‘THREE.MMDLoader: Import MMDParser GitHub - takahirox/mmd-parser: NPM MMD parser package’ );

So download mmdparser.js and include it into your project.

BTW: Since r117 the global scripts from the examples/js directory are deprecated. It’s recommended to use ES6 modules (the files from examples/jsm) since MMDParser will automatically be imported when importing MMDLoader. Meaning you would not see this dependency at all.

Actually, I totally understood to use the ES6 modules. However, I have to run my project on IE as a requirement. Thanks!
Later, I will change to ES6 in my personal project.