盆景中的盆景

时间:2013-02-25 22:26:34

标签: bonsaijs

我可以将我的形状添加到舞台上并让它们做淡化等等,但是我无法让它们变形 - 我是否需要以某种方式分离出线条和曲线?

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');

1 个答案:

答案 0 :(得分:0)

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

我想你可以通过删除这些命令来实现它。