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> | |
<script language="javascript" type="text/javascript" src="p5.svg.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> body {padding: 0; margin: 0;} </style> | |
</head> |
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
// +~+~+~+~+~ raw jQ/jS +~+~+~+~+~~+ | |
var timeout = null; | |
$(document).on('mousemove', function() { | |
clearInterval(timeout); | |
timeout = setInterval(function() { | |
console.log('Mouse idle...'); | |
//this is where you put the code to do things... | |
}, 200); //rate of interval | |
}); |
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
/* .field-content img{display:none}*/ | |
/*#zone-branding-wrapper{border-bottom: 1px solid black}*/ | |
h1{letter-spacing: 0} | |
#page-title{display:none} | |
#page-title{padding: 0px 0px 30px 10px} | |
#section-header, #section-content{background-color: white} | |
#zone-footer-wrapper{border-top: 1px solid black} | |
a:link, a, a:visited{color: blue; text-decoration:underline} |
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 pRandom = 1; | |
var total = 5; // top end of range | |
var rand = Math.floor( Math.random()*total ); //get a rand | |
while(rand == pRandom){ //are we the same, if so try again until we are not. | |
rand = Math.floor( Math.random()*total ); //get a new random if we are the same | |
console.log("try again"); | |
} | |
pRandom = rand; //store the current random number to check against next time. |
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(){ | |
console.log("jquery is good!") | |
// //+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+Datatypes_~+~+~+~+~+~+~+~+~+~+~+~+ | |
// //strings | |
// "string" | |
// 'string' | |
// | |
// 'the quick brown fox jumped over a log' |
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 sideA; | |
var depth = 500; //choose how deep to make the guillotine slit scan | |
function preload(){ | |
sideA = loadImage("usd.jpg"); | |
} | |
function setup() { | |
createCanvas(3300,2550) //300 pixels per inch 8.5x11 | |
pixelDensity(1); //turn off pixel density so calcualtions for page size are independent of screen pixel density |
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
/* | |
Create a new nonRepRand instance like this, you can have multiple, just use a diff variable name: | |
var numberGenerator = new nonRepRand(1,5); | |
use the .next() method to get the next number, see example below | |
.next() method, can take a callback which will fire when the nonRepRand generator loops around the set, ie. if nonRepRand(1,5), .next(callBack) will fire the callback after generating it's 5th value, the callback will be passed a value of true. | |
nonRepRand() will never give you end to end repeating numbers. for example if the 5th value of the set is a "3" and the first value of the next loop is a "3", nonRepRand will automatically get you a new value instead of a "3", so the values can never be next to one another. |
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
//if the mouse is not moving for x time then do something. | |
mouseIsMoving = false; | |
function setup(){ | |
createCanvas(windowWidth,windowHeight); | |
} | |
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
var posx,posy, size | |
var times = 0 | |
function setup() { | |
createCanvas(windowWidth,windowHeight); | |
posx = width/2 | |
posy = height/2 | |
size = 100; | |
meSize = 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
//init jQuery to do things once the DOM (page) is ready. | |
$(function(){ // fucntion aka. do something NOW //dont comment me out! | |
// alert("hi han solo") //a good way to check that everything is working properly at the start. | |
/* | |
//this is the first basic example, cool! | |
$("#juju").hide(); //hide juju at the beginning |