shader-program
shader-program copied to clipboard
Change the Color?
How do I change the color?
Thanks.
Background color is controlled via CSS. Then in the for-loop you push colors to the array:
for (let x = 0; x < width; x += distance) { for (let z = 0; z < depth; z += distance) { position.push(-width / 2 + x, -30, -depth / 2 + z) color.push(0, 0, 0, z / depth) } }
colors can be "dynamic" based for example on position, or you can set a fixed color as in the above example.
Thanks, man for this awesome script. The console has also debugged Message. Did you check it?
Performance warning: clear() called with no buffers in bitmask
particle.js:472 WebGL: too many errors, no more errors will be reported to the console for this context.
how do i change color of waves point through css?