var path = new Path.Rectangle(new Point(50, 50), new Size(100, 50));
path.style = {
fillColor: 'white',
strokeColor: 'black'
};
var copy = {};
//Create a copy of the path and set its stroke color to red:
for (var i = 0; i < 100; i++) {
var copy[i] = path.clone();
console.log(copy[i]);
copy[i].strokeColor = 'red';
//Rotate the copy by 45 degrees:
copy[i].rotate(45);
}
答案 0 :(得分:0)
您唯一需要做的就是将copy
初始化为数组;
var copy = [];