Class enchant.gl.mmd.MAnimation
- Defined in: mmd.gl.enchant.js
- Extends enchant.EventTarget
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.gl.mmd.MAnimation(path, callback, onerror)
Animation class optimized to VMD file.
|
Method Summary
Method Attributes | Method Name and Description |
---|---|
loadVmd(path, callback, onerror)
Load VMD file.
|
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Class Detail
enchant.gl.mmd.MAnimation(path, callback, onerror)
Animation class optimized to VMD file.
Character data and morphing are loaded.
By preloading VMD file, it will be set in assets automatically.
If argument is delivered enchant.gl.mmd.MAnimation#loadVmd will be called up.
- Parameters:
- {String} path Optional
- File path.
- {Function} callback Optional
- onload callback.
- {Function} onerror Optional
- onerror callback.
Method Detail
-
loadVmd(path, callback, onerror)Load VMD file. Will be dispatched LOAD event when data has loaded.
// motion/dance.vmd is loaded. var dance = new MAnimation(); dance.loadVmd('motion/dance.vmd', function() { mk.pushAnimation(dance); });
- Parameters:
- {String} path
- File path
- {Function} callback
- Callback function
- onerror