A Pen by Shigeru Kobayashi on CodePen.
Last active
October 7, 2018 03:38
-
-
Save kotobuki/f0457ff34c029fb9481b281823a937d7 to your computer and use it in GitHub Desktop.
First p5.js Sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Called once when the program starts | |
function setup() { | |
// Creates a canvas that is 640 pixels wide and 480 pixels high | |
createCanvas(640, 480); | |
} | |
// Continuously executes the lines of code contained inside its block | |
function draw() { | |
// Draw an ellipse, with the center of the current position of the mouse, | |
// with a width and height of 50 pixels | |
ellipse(mouseX, mouseY, 50, 50); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/p5.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/addons/p5.dom.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.2/addons/p5.sound.min.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment