Skip to content

Instantly share code, notes, and snippets.

@jasoncoon
Created August 3, 2025 22:16
Show Gist options
  • Save jasoncoon/9e2b63efb0c7c762fe2470ca6234b4f1 to your computer and use it in GitHub Desktop.
Save jasoncoon/9e2b63efb0c7c762fe2470ca6234b4f1 to your computer and use it in GitHub Desktop.
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);
}
resetTransform()
translate3D(-.5, -.5, -.5)
setPalette([
0.000, 0.0, 0.0, 0.0,
0.021, 0.0, 0.0, 0.0,
0.043, 0.0, 0.0, 0.0,
0.064, 1.0, 0.0, 0.0,
0.085, 0.0, 0.0, 0.0,
0.106, 0.0, 0.0, 0.0,
0.128, 1.0, 0.5, 0.0,
0.149, 0.0, 0.0, 0.0,
0.170, 0.0, 0.0, 0.0,
0.191, 0.0, 0.0, 0.0,
0.213, 1.0, 1.0, 0.0,
0.234, 0.0, 0.0, 0.0,
0.255, 0.0, 0.0, 0.0,
0.277, 0.0, 0.0, 0.0,
0.298, 0.5, 1.0, 0.0,
0.319, 0.0, 0.0, 0.0,
0.340, 0.0, 0.0, 0.0,
0.362, 0.0, 0.0, 0.0,
0.383, 0.0, 1.0, 0.0,
0.404, 0.0, 0.0, 0.0,
0.426, 0.0, 0.0, 0.0,
0.447, 0.0, 0.0, 0.0,
0.468, 0.0, 1.0, 0.5,
0.489, 0.0, 0.0, 0.0,
0.511, 0.0, 0.0, 0.0,
0.532, 0.0, 0.0, 0.0,
0.553, 0.0, 1.0, 1.0,
0.574, 0.0, 0.0, 0.0,
0.596, 0.0, 0.0, 0.0,
0.617, 0.0, 0.0, 0.0,
0.638, 0.0, 0.5, 1.0,
0.660, 0.0, 0.0, 0.0,
0.681, 0.0, 0.0, 0.0,
0.702, 0.0, 0.0, 0.0,
0.723, 0.0, 0.0, 1.0,
0.745, 0.0, 0.0, 0.0,
0.766, 0.0, 0.0, 0.0,
0.787, 0.0, 0.0, 0.0,
0.809, 0.5, 0.0, 1.0,
0.830, 0.0, 0.0, 0.0,
0.851, 0.0, 0.0, 0.0,
0.872, 0.0, 0.0, 0.0,
0.894, 1.0, 0.0, 1.0,
0.915, 0.0, 0.0, 0.0,
0.936, 0.0, 0.0, 0.0,
0.957, 0.0, 0.0, 0.0,
0.979, 1.0, 0.0, 0.5,
1.000, 0.0, 0.0, 0.0
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment