var star = document.getElementById("star");
var color = "#ef6360";
bonsai.run(star, {
code: function() {
new Star(30, 30, 20, 5, 0.7).attr({
fillColor: color
}).addTo(stage);
}
});
it doesn't work, but it'll work if I remove the variable and directly use the string, like fillColor:"#ef6360"
. Why?