shader-program icon indicating copy to clipboard operation
shader-program copied to clipboard

Change the Color?

Open Uranbold opened this issue 6 years ago • 3 comments

How do I change the color?

Thanks.

Uranbold avatar Mar 22 '19 09:03 Uranbold

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.

tokant avatar Mar 28 '19 10:03 tokant

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.

Uranbold avatar Apr 01 '19 04:04 Uranbold

how do i change color of waves point through css?

sifulbd avatar Apr 02 '19 16:04 sifulbd