Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖
👨‍🎨 👨‍💻

Jordan Shaw jshaw

🤖
👨‍🎨 👨‍💻
View GitHub Profile
@jshaw
jshaw / circlesofdots.pde
Created March 3, 2023 20:34 — forked from marcedwards/circlesofdots.pde
Circles of dots in Processing
View circlesofdots.pde
//
// Circles of dots.
// Created using Processing 3.5.3.
//
// Code by @marcedwards from @bjango.
//
// A GIF of this code can be seen here:
// https://twitter.com/marcedwards/status/1144236924095234053
//
@jshaw
jshaw / clock.pde
Created February 17, 2023 17:42 — forked from companje/clock.pde
Arc Clock in Processing
View clock.pde
float heleCirkel = TWO_PI; //tau
void setup() {
size(500,500);
background(0);
smooth();
}
void draw() {
background(0);
@jshaw
jshaw / Gradient.js
Created December 13, 2022 16:28 — forked from jordienr/Gradient.js
Stripe Mesh Gradient WebGL
View Gradient.js
/*
* Stripe WebGl Gradient Animation
* All Credits to Stripe.com
* ScrollObserver functionality to disable animation when not scrolled into view has been disabled and
* commented out for now.
* https://kevinhufnagl.com
*/
@jshaw
jshaw / greyscale.frag
Created June 22, 2022 16:21 — forked from Volcanoscar/greyscale.frag
A simple glsl color -> greyscale shader, using luminosity method
View greyscale.frag
// fragment shader
//
// RGBA color to RGBA greyscale
//
// smooth transition based on u_colorFactor: 0.0 = original, 1.0 = greyscale
//
// http://www.johndcook.com/blog/2009/08/24/algorithms-convert-color-grayscale/
// "The luminosity method is a more sophisticated version of the average method.
// It also averages the values, but it forms a weighted average to account for human perception.
// We’re more sensitive to green than other colors, so green is weighted most heavily. The formula
@jshaw
jshaw / angle-between-points.js
Created March 11, 2022 23:21 — forked from conorbuck/angle-between-points.js
JavaScript: Find the angle between two points
View angle-between-points.js
var p1 = {
x: 20,
y: 20
};
var p2 = {
x: 40,
y: 40
};
@jshaw
jshaw / tableSizeChart.html
Created February 4, 2022 03:22
Table Size Chart
View tableSizeChart.html
<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
overflow:hidden;padding:10px 5px;word-break:normal;}
.tg th{border-color:black;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;
font-weight:normal;overflow:hidden;padding:10px 5px;word-break:normal;}
.tg .tg-baqh{text-align:center;vertical-align:top}
</style>
<table class="tg">
<thead>
@jshaw
jshaw / p5js_video_snippet.js
Created December 12, 2021 22:56
snippet for interpreting, manipulating and displaying video
View p5js_video_snippet.js
if(label == "Start"){
flippedVideo.loadPixels();
noStroke();
for (let y = 0; y < flippedVideo.height; y += 8) {
for (let x = 0; x < flippedVideo.width; x += 8) {
let offset = ((y*flippedVideo.width)+x)*4;
fill(flippedVideo.pixels[offset],
flippedVideo.pixels[offset+1],
flippedVideo.pixels[offset+2]);
rect(x, y, 8, 8);
@jshaw
jshaw / snippetfile2.json
Created September 14, 2020 18:26
Example marketing payload, only email
View snippetfile2.json
{
email: "email@gmail.com"
}
@jshaw
jshaw / snippetfile1.json
Last active December 17, 2020 01:43
Example marketing payload Optional fields: * api_key * legal array
View snippetfile1.json
{
email: "email@gmail.com"
}
@jshaw
jshaw / GLSL-Noise.md
Created May 30, 2019 18:39 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms
View GLSL-Noise.md

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}