Mercurial > MadButterfly
comparison nodejs/examples/scribbo/testsvg.js @ 1380:76d2aad5da35
Implement runToScene method for the Flash-like animation.
author | wycc |
---|---|
date | Wed, 23 Mar 2011 00:33:51 +0800 |
parents | 37dc1ce76bba |
children | c297ceec37f2 |
comparison
equal
deleted
inserted
replaced
1379:f0a156705977 | 1380:76d2aad5da35 |
---|---|
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 |
9 function renderFrame() { | |
10 cur = cur + 1; | |
11 if (cur == 10) cur=1; | |
12 app.changeScene(cur); | |
13 setTimeout(renderFrame,30); | |
14 } | |
15 | |
16 app = new mbapp.app(); | 9 app = new mbapp.app(); |
17 app.loadSVG("test.svg"); | 10 app.loadSVG("test.svg"); |
18 cur = 1; | 11 app.runToScene(15); |
19 setTimeout(renderFrame,30); | |
20 app.loop(); | 12 app.loop(); |
21 | 13 |
22 | 14 |