Mercurial > MadButterfly
annotate nodejs/examples/scribbo/testsvg.js @ 1395:a768d74e5f49
Fix the svg:use. For a svg:use, it is a group which include the content it reference. It means that we can not tween it to its origin object directly. Instead, we need to ungroup it and then use the result matrix to generate the tweened transformation matrix. Therefore, we need to concate its matrix to the referenced object.
Ad center object when the bbox-x is not available.
author | wycc |
---|---|
date | Sat, 02 Apr 2011 05:36:36 +0800 |
parents | 76d2aad5da35 |
children | c297ceec37f2 |
rev | line source |
---|---|
1375 | 1 // -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 4; -*- |
2 // vim: sw=4:ts=8:sts=4 | |
3 var svg = require("svg"); | |
4 var mbapp = require("mbapp"); | |
5 var sys=require("sys"); | |
6 var animate=require("animate"); | |
7 var fs = require("fs"); | |
8 | |
9 app = new mbapp.app(); | |
10 app.loadSVG("test.svg"); | |
1380
76d2aad5da35
Implement runToScene method for the Flash-like animation.
wycc
parents:
1375
diff
changeset
|
11 app.runToScene(15); |
1375 | 12 app.loop(); |
13 | |
14 |