Skip to content

Instantly share code, notes, and snippets.

@aurelianonava
Created September 29, 2017 15:14
Show Gist options
  • Select an option

  • Save aurelianonava/2141c54ac025e82174c6ab823d176ca0 to your computer and use it in GitHub Desktop.

Select an option

Save aurelianonava/2141c54ac025e82174c6ab823d176ca0 to your computer and use it in GitHub Desktop.
[add your bin description] // source http://jsbin.com/nefewiy
<head>
<meta name="description" content="[add your bin description]">
<Title> Project 2 - More on function point(); </Title>
<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>
<link rel="stylesheet" href="style.css" />
<script src="script.js"></script>
</head>
<body>
<h1>Ellipse Rotation Project Issue #</h1>
<h3>Working with conditional statements: <em>if() {}</em> </h3>
<h6>Snapshot #15</h6>
Note: You will be required to start producing explanations for all the main parts of your code.
I suggest doing this on a Google Doc that you can submmit.
together with the program code and/or url.
<script id="jsbin-javascript">
//variables
var x, y;
x = 25;
y = 25;
//setup function
function setup() {
canvas = createCanvas(480, 120);
background(0, 200, 250);
}
//draw function
function draw() {
background(0, 200, 250);
strokeWeight(3)
point(x+=1, y);
if(x > 240) {
x = 0;
}
}
</script>
<script id="jsbin-source-javascript" type="text/javascript">
//variables
var x, y;
x = 25;
y = 25;
//setup function
function setup() {
canvas = createCanvas(480, 120);
background(0, 200, 250);
}
//draw function
function draw() {
background(0, 200, 250);
strokeWeight(3)
point(x+=1, y);
if(x > 240) {
x = 0;
}
}</script></body>
</html>
//variables
var x, y;
x = 25;
y = 25;
//setup function
function setup() {
canvas = createCanvas(480, 120);
background(0, 200, 250);
}
//draw function
function draw() {
background(0, 200, 250);
strokeWeight(3)
point(x+=1, y);
if(x > 240) {
x = 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment