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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Challenge: Classification</title> | |
| <style> | |
| .right-answer { | |
| background: rgb(0, 255, 9); | |
| } | |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Spin-off of "Challenge: Style guide"</title> | |
| <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poiret+One"> | |
| </head> | |
| <body> | |
| <h1>Style guide</h1> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Challenge: Avatar attributes</title> | |
| <style> | |
| img[alt*="avatar"] { | |
| width: 170px; | |
| } | |
| </style> |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Challenge: Query modernizer</title> | |
| <style> | |
| li .doth { | |
| } | |
| </style> |
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
| //original code based on my Creature comforts and critter jitters project | |
| //includes ladybugs that oscillate around a flower | |
| //has a system of water drops and winstons that inherit their properties from a particle | |
| //CLICK IN THE CLOUDS TO MAKE IT RAIN WINSTONS!!!! | |
| //setting angle mode to radians instead of degrees | |
| angleMode = "radians"; |
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
| //changing angle mode to radians instead of degrees | |
| angleMode = "radians"; | |
| //defining the repeller properties | |
| var Repeller = function(x, y) { | |
| this.power = 200; | |
| this.position = new PVector(x, y); | |
| }; | |
| //function to display the rocks |
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
| //setting angle to radians instead of degrees | |
| angleMode = "radians"; | |
| //defining properties of a particle | |
| var Particle = function(position) { | |
| this.acceleration = new PVector(0, -0.05); | |
| this.velocity = new PVector(random(-1, 1), random(0, -1)); | |
| this.position = position.get(); | |
| this.timeToLive = 255.0; | |
| }; |
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
| //setting angle mode to radians instead of degrees | |
| angleMode = "radians"; | |
| //defining the fire particles | |
| var Particle = function(position) { | |
| //negative acceleration so that fire goes up | |
| this.acceleration = new PVector(0, -0.05); | |
| this.velocity = new PVector(random(-1, 1), random(-1, 0)); | |
| this.position = position.get(); | |
| this.timeToLive = 100; |
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
| //defining bubbles | |
| var Particle = function(position) { | |
| this.acceleration = new PVector(0, -0.05); | |
| this.velocity = new PVector(random(-1, 1), random(-1, 0)); | |
| this.position = position.get(); | |
| this.timeToLive = 200; | |
| }; | |
| //run function to call both the update and display functions | |
| Particle.prototype.run = function() { |
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
| //setting angle mode to radians instead of degrees for rotations | |
| angleMode = "radians"; | |
| //defining properties of particle | |
| var Particle = function(position) { | |
| this.acceleration = new PVector(0, 0.05); | |
| this.velocity = new PVector(random(0, 1), random(0, 0)); | |
| this.position = position; | |
| this.angle = 1; | |
| this.aVelocity = 0; |