I started with the code from Edgeburst, and with some help, I got the exact pattern I was looking for. Now I just need help with color. I am using “hue” for the colors of pattern, but I need White where I currently have blue (hue =.66;). I am assuming that I will need to call it by RGB instead of hue, but I’m so new to Pixelblaze that I’m not sure how to get the color white. If I can be nudged in the right direction I would definitely appreciate it!
To be clear, I want the color White to replace my hue = .66; in my if statement below.
Also, if someone can tell me how to properly put code into the post I’d appreciate it
Thanks!
export function beforeRender(delta) {
t1 = triangle(time(.045)) // Mirror time (bounce)
}
export function render(index) {
pct = index / pixelCount
edge = clamp(triangle(pct) + t1 * 4 - 2, 0, 1) // Mirror space
// h = edge * edge - .2 // Expand violets
v = triangle(edge) // Doubles the frequency
if (pct > .45 && pct < .55){
hue = .66;
}
if
(pct > 0.55) {
hue = 0.33;
}
if(pct < .45 ){
hue = 0.0;
}
hsv(hue,1,v);
}