Rate this product
UV coordinates
The goal of the application contained in index.html, is to create 3 objects:
- An Egyptian pyramid
- A dice
- A soda can
Models are created in file models.js. In particular, the procedure addMesh()receives as parameters the vertex buffer (an array of eight elements with the coordinates of the vertices, the direction of the associated normal vectors, and the values of the UV coordinates), the index buffer (an array of indices in the vertex buffer), and an RGB color (a three-elements array, with the value of the red, green and blue components of the color, each one in the 0-1 range). Primitives are encoded as indexed triangle lists.
The cylinder for the soda can should be generated by an algorithm (which requires at least two nested loops are required). The pyramid and the cube for the dice might instead be manually defined. All models share the same texture: file TextureRef.pdf, enclosed in the folder, shows the texture on a grid that should help in finding the right UV coordinates for the primitives.
Reviews
There are no reviews yet.