Skip to content

Instantly share code, notes, and snippets.

View claytical's full-sized avatar

Clay Ewing claytical

View GitHub Profile
@claytical
claytical / loopnlog.pde
Created March 15, 2022 17:16
Processing, Loop and Log
//LOOP & LOG
void setup() {
println("I run once");
}
void draw() {
println("Mouse X: " + mouseX + " Mouse Y: " + mouseY);
}
@claytical
claytical / linedraw.pde
Created March 15, 2022 17:15
Processing, Line Drawing Program, Simplest
//draw a contiuous line
void setup() {
size(500,500);
background(0,0,0);
}
void draw() {
stroke(255,255,255);
line(pmouseX, pmouseY, mouseX, mouseY);
@claytical
claytical / linedraw.pde
Created March 15, 2022 17:14
Processing, Line Drawing Program, Conditional Statements
//draw a contiuous line
void setup() {
size(500, 500);
background(0, 0, 0);
}
void draw() {
println("Mouse X: " + mouseX + " Mouse Y: " + mouseY);
}
@claytical
claytical / linedraw.pde
Created March 15, 2022 17:13
Processing, Line Drawing Program, Loop Function
//draw a contiuous line
void setup() {
size(500, 500);
background(0, 0, 0);
}
void draw() {
println("Mouse X: " + mouseX + " Mouse Y: " + mouseY);
}
@claytical
claytical / linedraw.pde
Created March 15, 2022 17:12
Processing, Line Drawing Program, Loop with Mapped Values
//draw a contiuous line
void setup() {
size(500, 500);
background(0, 0, 0);
}
void draw() {
@claytical
claytical / linedraw.pde
Created March 15, 2022 17:11
Processing, Line Drawing Program Looped Gradient Greens
//draw a contiuous line
void setup() {
size(500, 500);
background(0, 0, 0);
}
void draw() {
@claytical
claytical / linedraw.pde
Last active March 15, 2022 17:12
Processing, Line Drawing Program With Conditional Colors, Default Stroke Width
//draw a contiuous line
int r = 0;
int g = 0;
int b = 0;
void setup() {
size(500, 500);
background(0, 0, 0);
@claytical
claytical / linedraw.pde
Created March 15, 2022 17:09
Processing, Line Drawing Program with Colors Based on Conditions
//draw a contiuous line
int r = 0;
int g = 0;
int b = 0;
void setup() {
size(500, 500);
background(0, 0, 0);
@claytical
claytical / getjson.html
Created September 19, 2019 19:28
Get JSON Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>GetJSON Example</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
@claytical
claytical / sketch.js
Created March 28, 2016 01:09
Google Spreadsheet with P5JS Example
var url = "https://spreadsheets.google.com/feeds/list/1qwbpwuHScQcujaMEg434eWPmpChMGBzaRQ9n39tYBjE/od6/public/values?alt=json";
var dudes = [];
function setup() {
createCanvas(windowWidth, windowHeight);
// Request the data from openweathermap
loadJSON(url, gotSpreadsheet);
}
function draw() {
background(0);