Alexis-E

By Alexis Nelson

PImage star; void setup() { frameRate(10); background(17, 7, 76); size(400, 400); star= loadImage("Star.png"); } void draw() { float speed = dist(mouseX, mouseY, pmouseX, pmouseY); if (mousePressed == true) { if (mouseButton == LEFT) { image(star, mouseX, mouseY, 30, 30); } if (mouseButton == RIGHT) { image(star, mouseX, mouseY+10, 15, 15); image(star, mouseX+20, mouseY+17, 15, 15); image(star, mouseX+12, mouseY+25, 15, 15); } } if (mousePressed == false) { image(star, mouseX+10, mouseY+10, 5, 5); image(star, mouseX+25, mouseY+47, 5, 5); image(star, mouseX+45, mouseY+37, 5, 5); image(star, mouseX+20, mouseY+39, 5, 5); } }

2 Comments

  1. Posted October 16, 2008 at 10:17 am | Permalink

    In looking at the code, it doesn’t look like you’re using the “speed” variable. It would be better to comment it out in that case or delete it. Please think about have the star draw from the center of the cursor, rather offset to the right.

  2. Jessica
    Posted October 24, 2008 at 4:38 pm | Permalink

    it’s nice that you made the mouseClicked shape so interesting, i just used standard ovals

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*