Skip to content

Instantly share code, notes, and snippets.

View bogoreh's full-sized avatar
🎯
Focusing

bogoreh

🎯
Focusing
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Challenge: Classification</title>
<style>
.right-answer {
background: rgb(0, 255, 9);
}
<!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>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Challenge: Avatar attributes</title>
<style>
img[alt*="avatar"] {
width: 170px;
}
</style>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Challenge: Query modernizer</title>
<style>
li .doth {
}
</style>
//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";
//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
//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;
};
//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;
//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() {
//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;