comparison nodejs/examples/scribbo/testsvg.js @ 1403:c297ceec37f2

Add exaple to illustrate the update bug
author wycc
date Sun, 03 Apr 2011 22:13:37 +0800
parents 76d2aad5da35
children
comparison
equal deleted inserted replaced
1402:0efa20061d70 1403:c297ceec37f2
3 var svg = require("svg"); 3 var svg = require("svg");
4 var mbapp = require("mbapp"); 4 var mbapp = require("mbapp");
5 var sys=require("sys"); 5 var sys=require("sys");
6 var animate=require("animate"); 6 var animate=require("animate");
7 var fs = require("fs"); 7 var fs = require("fs");
8 8 var s=0;
9 app = new mbapp.app(); 9 app = new mbapp.app(":0.0",1920,1080);
10 app.loadSVG("test.svg"); 10 app.loadSVG("test1.svg");
11 app.runToScene(15); 11 app.addKeyListener(mbapp.KEY_LEFT, function() {
12 s--;
13 app.runToScene(s);
14 });
15 app.addKeyListener(mbapp.KEY_RIGHT, function() {
16 s++;
17 app.runToScene(s);
18 });
12 app.loop(); 19 app.loop();
13 20
14 21