This file contains hidden or 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
| var Ball = function(x, y) { | |
| this.x = x; | |
| this.y = y; | |
| this.diameter = 10; | |
| } | |
| var balls = []; | |
This file contains hidden or 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
| var Ball = function(x, y) { | |
| this.x = x; | |
| this.y = y; | |
| this.diameter = 10; | |
| } | |
| Ball.prototype.show = function() { | |
| ellipse(this.x, this.y, this.diameter, this.diameter); | |
| } |
This file contains hidden or 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
| var Ball = function() { | |
| this.x = random(width); | |
| this.y = random(height); | |
| this.speedX = random(-1,1); | |
| this.diameter = random(20,50); | |
| } | |
| var balls = []; | |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <script language="javascript" type="text/javascript" src="../p5.js"></script> | |
| <!-- uncomment lines below to include extra p5 libraries --> | |
| <script language="javascript" src="../addons/p5.dom.js"></script> <!--<script language="javascript" src="../addons/p5.sound.js"></script>--> | |
| <script language="javascript" type="text/javascript" src="sketch.js"></script> | |
| <!-- this line removes any default padding and style. you might only need one of these values set. --> | |
| <style> | |
| #left_panel { |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <script language="javascript" type="text/javascript" src="../p5.js"></script> | |
| <!-- uncomment lines below to include extra p5 libraries --> | |
| <script language="javascript" src="../addons/p5.dom.js"></script> <!--<script language="javascript" src="../addons/p5.sound.js"></script>--> | |
| <script language="javascript" type="text/javascript" src="sketch.js"></script> | |
| <!-- this line removes any default padding and style. you might only need one of these values set. --> | |
| <style> | |
| #left_panel { |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <script language="javascript" type="text/javascript" src="../p5.js"></script> | |
| <!-- uncomment lines below to include extra p5 libraries --> | |
| <script language="javascript" src="../addons/p5.dom.js"></script> <!--<script language="javascript" src="../addons/p5.sound.js"></script>--> | |
| <script language="javascript" type="text/javascript" src="sketch.js"></script> | |
| <!-- this line removes any default padding and style. you might only need one of these values set. --> | |
| <style> | |
| #left_panel { |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <script language="javascript" type="text/javascript" src="../p5.js"></script> | |
| <!-- uncomment lines below to include extra p5 libraries --> | |
| <script language="javascript" src="../addons/p5.dom.js"></script> <!--<script language="javascript" src="../addons/p5.sound.js"></script>--> | |
| <script language="javascript" type="text/javascript" src="sketch.js"></script> | |
| <!-- this line removes any default padding and style. you might only need one of these values set. --> | |
| <style> | |
| #left_panel { |
This file contains hidden or 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
| var canvas; | |
| var base_url = "http://api.openweathermap.org/data/2.5/forecast"; | |
| var city_url = "?q=Miami"; | |
| var app_id = "&appid=f2dbfb3d770d42cca8ee06ad03edef2a"; | |
| var units = "&units=imperial"; | |
| var temp; | |
| var temp_min; | |
| var temp_max; | |
| function setup() { |
This file contains hidden or 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
| var canvas; | |
| var base_url = "http://api.openweathermap.org/data/2.5/forecast"; | |
| var city_url = "?q=Miami"; | |
| var app_id = "&appid=bd82977b86bf27fb59a04b61b657fb6f"; | |
| var units = "&units=imperial"; | |
| var temp = []; | |
| var temp_min = []; | |
| var temp_max = []; | |
| var xCursor; | |
| var yCursor; |
This file contains hidden or 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
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <script language="javascript" type="text/javascript" src="../p5.js"></script> | |
| <!-- uncomment lines below to include extra p5 libraries --> | |
| <script language="javascript" src="../addons/p5.dom.js"></script> <!--<script language="javascript" src="../addons/p5.sound.js"></script>--> | |
| <script language="javascript" type="text/javascript" src="sketch.js"></script> | |
| <!-- this line removes any default padding and style. you might only need one of these values set. --> | |
| <style> | |
| #left_panel { |