716
|
1 var mbfly = require("mbfly");
|
|
2 var svg = require("./svg");
|
|
3 var mb_rt = new mbfly.mb_rt(":0.0", 720,480);
|
|
4 var ldr = mbfly.img_ldr_new(".");
|
|
5 var background = mb_rt.rect_new(0, 0, 720, 480, 0, 0);
|
|
6 var paint = mb_rt.paint_color_new(1, 1, 1, 1);
|
|
7 paint.fill(background);
|
|
8 mb_rt.root.add_shape(background);
|
|
9
|
|
10 app=function() {
|
|
11 this.mb_rt = mb_rt;
|
|
12
|
|
13 }
|
|
14 app.prototype.loadSVG=function(fname) {
|
|
15 svg.loadSVG(mb_rt,mb_rt.root,fname);
|
|
16 }
|
|
17
|
|
18 app.prototype.loop=function() {
|
|
19 mb_rt.redraw_all();
|
|
20 mb_rt.flush();
|
|
21 }
|
|
22
|
|
23 exports.app=app;
|