Advertisement
Guest User

p5js2

a guest
Jul 16th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. function setup() {
  2. createCanvas(600,600);
  3. }
  4. function draw() {
  5. stroke(0,0,0);
  6. strokeWeight(1);
  7. fill(0,0,0);
  8. rect(550,50,40,40);
  9. if (mouseIsPressed) {
  10. stroke(255,0,0);
  11. strokeWeight(20);
  12. line(pmouseX, pmouseY, mouseX, mouseY);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement