Class enchant.gl.mmd.MSprite3D
- Defined in: mmd.gl.enchant.js
- Extends enchant.gl.Sprite3D
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.gl.mmd.MSprite3D(path, callback, onerror)
Sprite3D optimized for PMD files.
|
- Fields borrowed from class enchant.gl.Sprite3D:
- bounding, childNodes, globalX, globalY, globalZ, matrix, mesh, name, parentNode, rotation, scaleX, scaleY, scaleZ, scene, touchable, x, y, z
Method Summary
Method Attributes | Method Name and Description |
---|---|
clearAnimation(animation)
Delete added animation.
|
|
loadPmd(path, callback, onerror)
Load PMD files.
|
|
pushAnimation(animation)
Add animation.
|
- Methods borrowed from class enchant.gl.Sprite3D:
- addChild
- altitude
- clone
- forward
- intersect
- removeChild
- rotatePitch
- rotateRoll
- rotateYaw
- rotationApply
- rotationSet
- scale
- set
- sidestep
- translate
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Class Detail
enchant.gl.mmd.MSprite3D(path, callback, onerror)
Sprite3D optimized for PMD files.
By preloading PMD file, it will be set in assets automatically.
- Parameters:
- {String} path Optional
- file path.
- {Function} callback Optional
- on load callback.
- {Function} onerror Optional
- on error callback.
Method Detail
-
clearAnimation(animation)Delete added animation.
- Parameters:
- animation
-
loadPmd(path, callback, onerror)Load PMD files. Will be dispatched LOAD event when data has loaded.
// model/miku.pmd loading. var mk = new MSprite3D(); mk.loadPmd('model/miku.pmd', function() { scene.addChild(mk); });
- Parameters:
- {String} path
- File path
- {Function} callback Optional
- onload callback.
- {Function} onerror Optional
- onerror callback.
-
pushAnimation(animation)Add animation. Animation will be played in the order that it is added.
- Parameters:
- {enchant.gl.mmd.MAnimation} animation