Skip to content

Instantly share code, notes, and snippets.

@zachwinter
zachwinter / about.json
Created October 16, 2021 04:47
Example Page Schema
{
"view": {
"name": "About",
"route": "/about",
"page-title": "About"
},
"content": [{
"title": "About",
"component": "Section",
"content": [{
@zachwinter
zachwinter / shader.glsl
Created July 24, 2019 01:12
blah blah blah
uniform vec2 u_resolution;
uniform float u_time;
const float PI = 3.1415926535897932384626433832795;
vec2 poly (in float sides, in float radius, in float cx, in float cy, in float rotation) {
float angle = 360. / sides;
vec2 vertices = vec2(0.);
for (float i = 0.; i < sides; i++) {
@zachwinter
zachwinter / example-sketch.js
Last active June 18, 2019 09:42
A simple `spotify-viz` sketch.
import Visualizer from './classes/visualizer'
import { interpolateRgb, interpolateBasis } from 'd3-interpolate'
import { getRandomElement } from './util/array'
import { sin, circle } from './util/canvas'
export default class Example extends Visualizer {
constructor () {
super({ volumeSmoothing: 10 })
this.theme = ['#18FF2A', '#7718FF', '#06C5FE', '#FF4242', '#18FF2A']
}