samedi 31 janvier 2015

How to get a random color in my create.js shape?

I want to have a random color where "Crimson" is defined



var stage = new createjs.Stage("demoCanvas");

var circle = new createjs.Shape();
circle.graphics.beginFill("Crimson").drawCircle(0, 0, 50);
circle.x = 100;
circle.y = 100;
stage.addChild(circle);
stage.update();




Aucun commentaire:

Enregistrer un commentaire