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> | |
<title></title> | |
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'> | |
<style> | |
#first{ |
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 randStorage = 0; //Store a random number here | |
var previous = 0; //Store the previous random number | |
var choice; //store our choice of higher or lower based on keystroke | |
var score = 0; // store the players high score | |
function setup() { | |
createCanvas(windowWidth, windowHeight); //create a canvas | |
} | |
function draw() { |
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
//how to store a previous value | |
var randStorage = 0; | |
var previousRandom = 0; | |
function setup() { | |
} | |
function draw() { |
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
//Vary the red based on the hour | |
var h; | |
function setup() { | |
createCanvas(600, 600); | |
} | |
function draw() { | |
h = hour(); |
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
import gifAnimation.*; | |
GifMaker gifExport; | |
static int FRAME_RATE = 30; | |
//Select a folder to process:, It must contain images with filename '1.jpg, 2.jpg,3.jpg,etc. | |
String PATH = "/Users/bmoren/Desktop/GifFrames/"; //make sure there is a "/" at the end of the filepath | |
//how many files to process? | |
int IMAGE_NB = 1; // first in sequence (or where to start?) | |
int TOTAL = 1644 ; //how many in forlder (or to go up to?) |
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
window.onload = function() { | |
var startPos; | |
var startPosLat; | |
var startPosLong; | |
var distance; | |
if (navigator.geolocation) { | |
startPosLat = 44.95716993150707; | |
startPosLong = -93.28439280496818; |
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
console.log('%c', 'padding: 100px 250px; background:url("http://media.giphy.com/media/IboGSjkXaOre0/giphy.gif") no-repeat 0 0; line-height:250px;') |
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
$(function(){ //jq do some work! - when ever the DOM is ready, do the stuff in here! | |
$(document).keypress(function(e) { // look at the keypressed | |
if(e.which == 97) { // use some logic to see what key was pressed | |
alert('You pressed "A"!'); //do something when that key was pressed | |
} | |
}); | |
///////USE BELOW TO FIGURE OUT KEY NUMBERS! | |
$(document).keypress(function(e) { |
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
String PATH = "/Users/bmoren/Desktop/Aspens_test/JPG/"; | |
int IMAGE_NB = 0001; // first in sequence | |
int imageAlpha = 100; | |
PImage composition; | |
PImage workingImage; | |
boolean firstImage = true; | |
void 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
//path to image files (list) filenames as the following: 0001.jpg, 0002.jpg, 0003.jpg etc. | |
String PATH = "/Users/bmoren/Desktop/Aspens_test/JPG/"; | |
int IMAGE_NB = 0001; // first in sequence | |
void setup() | |
{ | |
//change to what you want your output to be | |
size(5184,3456); | |
background(255); | |
tint(255,10); // this setting will stick | |
} |