Open swiftyone opened 11 years ago
You can use Paper.customAttributes and pass an object as parameter:
paper.customAttributes.hue = function (object) { console.log(object); return {fill: "hsb(" + (object.hue%1) + ", 0.75, 1)"}; }; var c = paper.circle(10, 10, 10).attr({hue: [{hue: .45}]});
But any animation of the custom attribute fails, as the attribute function is invoked without the object. (Logs either NaN or undefined).
Same problem here: i try to pass string as a parameter of customAttributes function, but it's NaN while animation runs, Any ideas?
You can use Paper.customAttributes and pass an object as parameter:
But any animation of the custom attribute fails, as the attribute function is invoked without the object. (Logs either NaN or undefined).