# HG changeset patch # User wycc # Date 1301840017 -28800 # Node ID c297ceec37f2cf152802c81a08c5336c1c15cdea # Parent 0efa20061d70f23565a1997cfac459b50cb1a82b Add exaple to illustrate the update bug diff -r 0efa20061d70 -r c297ceec37f2 nodejs/examples/scribbo/test.svg --- a/nodejs/examples/scribbo/test.svg Sun Apr 03 18:59:43 2011 +0800 +++ b/nodejs/examples/scribbo/test.svg Sun Apr 03 22:13:37 2011 +0800 @@ -2,6 +2,7 @@ + inkscape:version="0.48+devel r9798 custom" + sodipodi:docname="test1.svg" + style="display:inline"> + inkscape:window-width="1680" + inkscape:window-height="975" + inkscape:window-x="0" + inkscape:window-y="25" + inkscape:window-maximized="1" /> @@ -55,62 +56,115 @@ start="0" type="scale" ref="s29027" - end="8" /> + end="18" /> + ref="s72724" /> - + id="layer1" + style="display:inline"> - + style="display: none"> + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0efa20061d70 -r c297ceec37f2 nodejs/examples/scribbo/testsvg.js --- a/nodejs/examples/scribbo/testsvg.js Sun Apr 03 18:59:43 2011 +0800 +++ b/nodejs/examples/scribbo/testsvg.js Sun Apr 03 22:13:37 2011 +0800 @@ -5,10 +5,17 @@ var sys=require("sys"); var animate=require("animate"); var fs = require("fs"); - -app = new mbapp.app(); -app.loadSVG("test.svg"); -app.runToScene(15); +var s=0; +app = new mbapp.app(":0.0",1920,1080); +app.loadSVG("test1.svg"); +app.addKeyListener(mbapp.KEY_LEFT, function() { + s--; + app.runToScene(s); +}); +app.addKeyListener(mbapp.KEY_RIGHT, function() { + s++; + app.runToScene(s); +}); app.loop();