Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var START_RADIUS = 1;
- var INCREMENT = 1;
- var CHANGE_COLORS_AT = 10;
- var circle = new Circle(START_RADIUS);
- circle.setRadius(START_RADIUS);
- function start(){
- setTimer(draw, 50);
- }
- function drawCircle(radius, color){
- var circle = new Circle(radius);
- circle.setColor(Randomizer.nextColor());
- circle.setPosition(getWidth()/2, getHeight()/2);
- add(circle);
- }
- function draw(){
- drawCircle(START_RADIUS, Color);
- START_RADIUS++;
- if(START_RADIUS == getHeight()/2){
- stopTimer(draw);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement