Skip to content

Instantly share code, notes, and snippets.

View lmccart's full-sized avatar
🍊

Lauren Lee McCarthy lmccart

🍊
View GitHub Profile
var y = 0;
var isEllipse = true;
function setup() {
createCanvas(600, 400);
rectMode(CENTER);
}
function draw() {
background(0);
var d;
var dots = [];
var increment2 = 0.001;
function setup() {
createCanvas(windowWidth, windowHeight);
// LM: use double for loops to create a grid to determine x and y positions
for (var i=0; i<10; i++) {
for (var j=0; j<10; j++) {
int ledPin = 13; // LED connected to digital pin 13
int inPin = 7; // pushbutton connected to digital pin 7
int val = 0; // variable to store the read value
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT); // sets the digital pin 13 as output
pinMode(inPin, INPUT); // sets the digital pin 7 as input
}
var bobAudio;
var annAudio;
function preload() {
bobAudio = loadSound('beatbox.mp3');
annAudio = loadSound('beatbox.mp3');
}
function setup() {
@lmccart
lmccart / example.js
Created September 15, 2015 19:38
example.js
var x = 0;
var y = 0;
var easing = 0.05; // smaller means slower follow, bigger means faster follow
function setup() {
createCanvas(600, 400);
x = mouseX;
y = mouseY;
noFill();
}
var y = 259;
function setup() {
createCanvas(600, 400);
angleMode(DEGREES);
}
function draw() {
background(255);
@lmccart
lmccart / 02_animation.js
Last active September 10, 2015 14:55
ITP ICM F15 | Week 2 Animation
//// PART ONE: VARIABLES
// COMMENTS
function setup() {
createCanvas(300, 200);
}
function draw() {
@lmccart
lmccart / 01_drawing.js
Last active September 10, 2015 14:37
ITP ICM F15 | Week 1 Drawing
// Example 1-1: stroke and fill
function setup() {
createCanvas(480, 270);
stroke(0);
fill(150);
}
function draw() {
background(255);
/////////////////////////////////////////////////////////////////
// basic button
var button;
function setup() {
createCanvas(640, 480);
noLoop();
colorMode(HSB);
///////////////////////////////////////////////////////
//// 02_variables_loops
// 1. Map out grid, logic of laying bricks on whiteboard.
// 2. Create variables.
var brickWidth = 40;
var brickHeight = 15;
var columnOffset = 60;
var rowOffset = 30;