Change Colors on a Square

Tap the Canvas or Change Colors Button.

Your browser doesn't support canvas.

Tap the canvas or Change Colors button to render the square with a different random color. JavaScript prepares a semi-random vec4, then uploads that value to a uniform in the fragment shader.

Basic WebGL Examples

  1. Display a triangle.
  2. Render a square plane.
  3. Interactively change colors on a square plane.
  4. Rotate a square.
  5. Animate two intersecting square planes.
  6. Animate, rotate, and dynamically change colors, on multiple square planes.
Learn 3D Programming Learn 3D Programming
Copyright © 2015 Seven Thunder Software. All Rights Reserved.