Skip to content

Instantly share code, notes, and snippets.

View jasoncoon's full-sized avatar

Jason Coon jasoncoon

View GitHub Profile
@jasoncoon
jasoncoon / Rotating Ball 3D Pixelblaze.js
Created August 6, 2025 00:21
Rotating Ball 3D pattern for Pixelblaze
// Rotating Ball 3D pattern for Pixelblaze
// by Jason Coon
export var autoPalette = true;
export var secondsPerPalette = 10;
export var paletteIndex = 0;
export var transition = 0.2;
export var bri = 1;
export var speed = 1;
@jasoncoon
jasoncoon / Cube Edges 3D.js
Created August 5, 2025 01:03
Cube Edges pattern for Pixelblaze
// Cube Edges pattern for Pixelblaze
// by Jason Coon
export var autoPalette = true;
export var secondsPerPalette = 10;
export var paletteIndex = 0;
export var transition = 0.2;
export var bri = 1;
export function toggleAutoPalette(v) {
@jasoncoon
jasoncoon / slow pulse 3D.js
Created August 3, 2025 22:16
Slow pulse 3D pattern for Pixelblaze
export var t1;
export function beforeRender(delta) {
t1 = time(.25)
}
export function render3D(index, x, y, z) {
h = t1 - hypot3(x, y, z) * .0625;
paint(h, 1);
}
@jasoncoon
jasoncoon / Fibonacci-Wave-Sliders.js
Created July 22, 2025 22:53
Fibonacci Wave Sliders pattern for Fibonacci256 & Pixelblaze
export var hOffset = 0
export var vOffset = 1
export var hSpeed = 0.01
export var vSpeed = 0.01
export function sliderHSpeed(v) { hSpeed = v }
export function sliderVSpeed(v) { vSpeed = v }
export function beforeRender(delta) {
@jasoncoon
jasoncoon / ColorPaletteWaves.js
Created July 21, 2025 12:50
Color Palette Waves 2D Pixelblaze Pattern
// Color Palette Waves 2D pattern
// based on ColorWavesWithPalettes by Mark Kriegsman: https://gist.github.com/kriegsman/8281905786e8b2632aeb
// modified by Ben Hencke and Jason Coon to run on Pixelblaze
var speed = 0.125;
var s = (speed * 2) + 0.001;
export function sliderSpeed(v) {
speed = v;
s = (speed * 2) + 0.001;
@jasoncoon
jasoncoon / Fibonacci-Playground.js
Last active August 4, 2025 23:08
Fibonacci Playground pattern for Fibonacci256 & Pixelblaze
// Fibonacci Playground pattern for Fibonacci256 & Pixelblaze by Jason Coon
// Fibonacci256: https://www.evilgeniuslabs.org/fibonacci256-hdr-pixelblaze
// Pixelblaze: https://electromage.com
export var increment = 1;
export var autoIncrement = false;
export var speed = .165;
export var smooth = false;
export function inputNumberIncrement(v) {
@jasoncoon
jasoncoon / Heart Palettes.epe
Created June 18, 2024 15:09
Beating heart pattern with palettes for PixelBlaze
// Beating heart pattern with palettes. The heart shape is formed by a square turned 45 degees to form a "diamond" which is
// the base of the heart. Two semi-circles connect to the upper two sides of the "diamond" for the rounded heart
// portion. Depending on your resolution, you may want to play with the anti-aliasing distance to improve the
// definition and appearance of the heart's outline.
//
// Debra Ansell (GeekMomProjcts) 8/18/2022
// Modified by Jason Coon to include color palettes
// Ratio of the height of the heart to the length of one side of the diamond inside it
// length of one side of the diamond is also the diameter of the circle
@jasoncoon
jasoncoon / pixelblaze-triple-helix-hourglass.js
Created February 18, 2024 17:22
Pixelblaze Triple Helix Hourglass ⏳⌛️
// Pixelblaze Triple Helix Hourglass
// by Jason Coon, Evil Genius Labs: evilgeniuslabs.org
// This work is licensed under a Creative Commons (4.0 International License):
// Attribution—Noncommercial—Share Alike: https://creativecommons.org/licenses/by-nc-sa/4.0
var pixels = array(pixelCount)
export var maxLevel = 0.25
export var friction = 128
@jasoncoon
jasoncoon / Doom Fire Eye
Last active September 11, 2022 11:07
Doom Fire Eye pattern for Pixelblaze & Lux Lavalier
/* DOOM Fire Eye
Slightly modified to polar coords by Jason Coon
Video demo here: https://twitter.com/jasoncoon_/status/1567672583436247046
Updated 2D Fire effect, with "enhanced" dragon's breath mode.
Now with More, Better fire! Version 2 has more dramatic flame,
and an improved wind algorithm.
The method is inspired by the low-res fire in the prehistoric PSX port of DOOM!
@jasoncoon
jasoncoon / Evil Eye
Last active September 10, 2022 16:24
Evil Eye pattern for Lux Lavalier
/**
* Evil Eye 2D - 9/7/2022
* Jason Coon (Evil Genius Labs)
* Video demo: https://twitter.com/jasoncoon_/status/1567671615214731264
*
* Slight modification of Blinky Eyes 2D - 6/5/2022
* Debra Ansell (GeekMomProjects)
*
* Simple code to display 1 blinking eye on an LED matrix. Tested on a Lux Lavalier (40mm Fibonacci64 Micro).
* Fine tuning variable values for the best look will likely depend a lot