0

我可以将我的形状添加到舞台上并让它们进行淡入淡出等,但我不能让它们变形——我是否需要以某种方式分离成线条和曲线?

var shape = new Path('M 321.051,510.078 c 0,0-10.126-23.854-19.438-45.792 c -7.927-18.675-15.265-35.961-15.265-35.961 s -17.977-41.111-19.036-77.643 c -1.05-36.243,14.817-67.908,14.817-67.908 s -36.176,73.71-49.086,137.219 c -9.327,45.879,3.426,87.39,3.426,87.39 L 321.051,510.078 z').attr({fillColor: 'red'});

stage.addChild(shape);

var targetPath = new Path('M 321.75,515.816 c 0,0,8.678-42.28,0.604-77.096 c -8.102-34.936-32.956-62.408-32.956-62.408 l -76.102-96.41c0,0-39.866-41.142-45.55-84.785 c -4.992-38.332,24.108-79.856,24.108-79.856 s -55.379,72.451-63.818,141.683 c -6.186,50.745,33.857,104.106,33.857,104.106 s 36.746,38.732,51.061,75.346 c 13.283,33.975,4.212,66.029,4.212,66.029L326.75,515.816 z').attr({fillColor: 'blue'});

shape.addTo(stage);

shape.morphTo(targetPath, '3s');
4

1 回答 1

0

Bonsai 0.4.1不支持平滑曲线 (s, S) SVG 命令。查看相关票证:https ://github.com/uxebu/bonsai/issues/191

我猜你可以通过删除这些命令来让它工作。

于 2013-02-26T14:03:24.670 回答