Flash based Movieclip class – acts like a virtual timeline
Basic example.
import Movieclip from '@merci-michel/mm-movieclip'
import Render from '@merci-michel/mm-render'
const mc = new Movieclip()
mc.totalFrames = 2;
mc.addFrameScript(1, () => {
mc.stop();
});
mc.play();
function render() {
mc.tick();
}
Render.init();
Render.add(render, mc.fps);Check docs for more advanced usage
To build the sources with babel in ./lib directory :
npm run buildTo generate the JSDoc :
npm run docsTo generate the documentation and deploy on gh-pages branch :
npm run docs:deployTo run the tests, first clone the repository and install its dependencies :
git clone https://github.com/MM56/mm-movieclip.git
cd mm-movieclip
npm installThen, run the tests :
npm testTo watch (test-driven development) :
npm run test:watchFor coverage :
npm run test:coverage