Created
August 30, 2017 17:24
-
-
Save jdguzman230/24d4ce53b5c2f9ad798c4abe7a410040 to your computer and use it in GitHub Desktop.
project 2 // source http://jsbin.com/kenire
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="project 2"> | |
<script data-require="p5.js@*" data-semver="0.5.7" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js"></script> | |
</head> | |
<body> | |
<script> | |
var a; | |
var b; | |
var x; | |
var y; | |
a = 240 | |
b = 120 | |
x = 0; | |
y = 60; | |
function setup() { | |
createCanvas(480, 120); | |
background(0, 0, 255); | |
} | |
function draw() { | |
//background(200); | |
point(x += 1,y); | |
//point(a -= 1,y); | |
//point(b,y); | |
strokeWeight(3); | |
if(x>=240)(x=0); | |
if(a<=0)(a=240); | |
} | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="project 2"> | |
<script data-require="p5.js@*" data-semver="0.5.7" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.7/p5.min.js"><\/script> | |
</head> | |
<body> | |
<script> | |
var a; | |
var b; | |
var x; | |
var y; | |
a = 240 | |
b = 120 | |
x = 0; | |
y = 60; | |
function setup() { | |
createCanvas(480, 120); | |
background(0, 0, 255); | |
} | |
function draw() { | |
//background(200); | |
point(x += 1,y); | |
//point(a -= 1,y); | |
//point(b,y); | |
strokeWeight(3); | |
if(x>=240)(x=0); | |
if(a<=0)(a=240); | |
} | |
<\/script> | |
</body> | |
</html> | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment