一个基于 h5 canvas 实现的简单图形引擎。
Draw2.js 以现实事物来抽象。可以极大的方便你编写 h5 canvas 代码。极大的方便了开发动画。
let app = new BApplication(); app.createWindow(0,0,800,600,'1px solid #000',document.body,60); app.init();
let director = new BDirector(); director.init(app);
let sceneLayer1 =new BScene(800,600);
director.addScene(sceneLayer1);
let rectSprite1 = new BSprite(100,100);
rectSprite1.setPosition([100,100]);
let box = new BBollMove(4,4,[800,600]); rectSprite1.runAction(box);
scene.addChild(rectSprite1)
director.run();