WebGL Square Plane

Your browser doesn't support canvas.

This square's a mesh composed of two right triangles. The color's declared with a vec4 uniform, in the fragment shader. To change colors, with JavaScript upload a different value to the uniform.

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.