Skip to content

Latest commit

 

History

History

EXAMPLES

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Week 1 Examples:

    triangle: First example. Renders a single red triangle. This example uses a Float32Array, which is similar to C, Java or Python array and its data can be sent directly to the GPU.
    triangle2: Similar to triangle but uses a JavaScript array, which is an object, and thus needs the flatten function to send its data to the GPU

Week 2 Examples:

    square: generates a white square on a black background using a JS Array
    square2: generates a white square on a black background using a Float32Array
    gasket2: Sierpinski gasket after 5 recursive subdivisions
    gasket4: Three-dimensional Sierpinski gasket
    gasket5: Two-dimensional Sierpinski gasket with slide bar to control number of subdvisions

Week 3 Examples:

    triangelec: triangle with color interpolation
    rotatingSquare2: rotating square with menu, keyboard and button input
    rotatingSquare3: adds a slider to rotatingSquare2

Weeks 4 and 5 Examples:

     cube:rotating cube with solid color faces
     cubef: similar to cube but by commenting and uncommenting a couple of lines you can use color interpolation
     cubev: rotating cube using render by elements

Week 6 Example:

      hat: "Sombrero" image drawn as a mesh using orthographic view. Mesh is drawn twice, once filled and once with lines.

Week 7 Example:

      shadedCube: Cube with Shading (single light source)
      textureCube4: Cube with checkerboard texture and a sinsusoidal texture applied using a second texture unit

Week 10 Example:

      particleDiffusion: two color particles moving randomly rendered as points diffusing their colors over time. Example shows render to texture and buffer ping ponging