annotate nodejs/examples/scribbo/testsvg.js @ 1375:37dc1ce76bba

Add example files for the coord_hide issue
author wycc
date Fri, 11 Mar 2011 14:05:09 +0800
parents
children 76d2aad5da35
rev   line source
1375
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*-
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
2 // vim: sw=4:ts=8:sts=4
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
3 var svg = require("svg");
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
4 var mbapp = require("mbapp");
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
5 var sys=require("sys");
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
6 var animate=require("animate");
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
7 var fs = require("fs");
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
8
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
9 function renderFrame() {
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
10 cur = cur + 1;
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
11 if (cur == 10) cur=1;
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
12 app.changeScene(cur);
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
13 setTimeout(renderFrame,30);
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
14 }
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
15
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
16 app = new mbapp.app();
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
17 app.loadSVG("test.svg");
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
18 cur = 1;
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
19 setTimeout(renderFrame,30);
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
20 app.loop();
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
21
37dc1ce76bba Add example files for the coord_hide issue
wycc
parents:
diff changeset
22