Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 12-shading.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand All @@ -155,7 +155,7 @@ <h3>
<div id="title"> code09.html COMMENTS</div>
</h3>
<h5>
A simple 3D rendering of cube using gl elemenntary array
A simple 3D rendering of cube using gl element array
</h5>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 12-shading.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function initSQBuffers() {
gl.vertexAttribPointer(shaderProgram.vertexColorAttribute,cylinderVertexColorBuffer.itemSize, gl.FLOAT, false, 0, 0);


// draw elementary arrays - triangle indices
// draw element arrays - triangle indices
// gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, squareVertexIndexBuffer);

gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, cylinderVertexIndexBuffer);
Expand Down
4 changes: 2 additions & 2 deletions 3Dcube.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand All @@ -74,7 +74,7 @@ <h3>
<div id="title"> 3Dcube.html COMMENTS</div>
</h3>
<h5>
A simple 3D rendering of cube using gl elemenntary array. Left click mouse button and drag to rotate.
A simple 3D rendering of cube using gl element array. Left click mouse button and drag to rotate.
</h5>
</div>

Expand Down
2 changes: 1 addition & 1 deletion 3Dcube.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ var draw_type=2;
gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexColorBuffer);
gl.vertexAttribPointer(shaderProgram.vertexColorAttribute,squareVertexColorBuffer.itemSize, gl.FLOAT, false, 0, 0);

// draw elementary arrays - triangle indices
// draw element arrays - triangle indices
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, squareVertexIndexBuffer);

setMatrixUniforms(); // pass the modelview mattrix and projection matrix to the shader
Expand Down
2 changes: 1 addition & 1 deletion 8-transform-ortho2D.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion Mtransforms.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h4> Background: </h4>


<h4>
- Click on the left mouse button and move the coursor to rotate; select the squre and apply 'X', 'x', 'Y','y'
- Click on the left mouse button and move the cursor to rotate; select the squre and apply 'X', 'x', 'Y','y'
</h4>

</h4>
Expand Down
2 changes: 1 addition & 1 deletion color-triangles.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, squareVertexPositionBuffer.itemSize, gl.FLOAT, false, stride, offset);

gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexColorBuffer);
gl.vertexAttribPointer(shaderProgram.vertexColorAttribute, squareVertexColorBuffer.itemSize, gl.FLOAT, false, offset, stride);
gl.vertexAttribPointer(shaderProgram.vertexColorAttribute, squareVertexColorBuffer.itemSize, gl.FLOAT, false, stride, offset);

gl.drawArrays(gl.TRIANGLE_STRIP, offset, squareVertexPositionBuffer.numItems);

Expand Down
4 changes: 2 additions & 2 deletions cubeMappedTeapot.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand All @@ -193,7 +193,7 @@ <h3>
<div id="title"> cubeMappedTeapot.html </div>
</h3>
<h5>
An exmple of rendering Utah teapot using Environment Cube Map
An example of rendering Utah teapot using Environment Cube Map
</h5>
</div>

Expand Down
2 changes: 1 addition & 1 deletion element-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
gl.vertexAttribPointer(shaderProgram.vertexColorAttribute, squareVertexBuffer.numFloats, gl.FLOAT, false,stride, offset); // 6*4 is the stride size, 3*4 is the offset
offset = 0;

// draw elementary arrays - triangle indices
// draw element arrays - triangle indices
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, squareVertexIndexBuffer);
gl.drawElements(gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0);

Expand Down
2 changes: 1 addition & 1 deletion hierarchicalXform.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h4> Background: </h4>


<h4>
- Click on the left mouse button and move the coursor to rotate. select square 1, 2, 3 and apply 'X, 'x', 'Y', 'y'
- Click on the left mouse button and move the cursor to rotate. select square 1, 2, 3 and apply 'X, 'x', 'Y', 'y'
</h4>

</h4>
Expand Down
2 changes: 1 addition & 1 deletion shading.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion shading.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ function initSQBuffers() {
gl.vertexAttribPointer(shaderProgram.vertexColorAttribute,cylinderVertexColorBuffer.itemSize, gl.FLOAT, false, 0, 0);


// draw elementary arrays - triangle indices
// draw element arrays - triangle indices
// gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, squareVertexIndexBuffer);

gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, cylinderVertexIndexBuffer);
Expand Down
2 changes: 1 addition & 1 deletion simple-transform.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion teapot.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions teapotFBO.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand All @@ -185,7 +185,7 @@ <h3>
<div id="title"> teapotFBO.html</div>
</h3>
<h5>
An exmple of using Frame Buffer Object (FBO)
An example of using Frame Buffer Object (FBO)
</h5>
</div>

Expand Down
4 changes: 2 additions & 2 deletions texture.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand All @@ -178,7 +178,7 @@ <h3>
<div id="title"> code10.html COMMENTS</div>
</h3>
<h5>
A simple 3D rendering of cube using gl elemenntary array
A simple 3D rendering of cube using gl element array
</h5>
</div>

Expand Down
2 changes: 1 addition & 1 deletion texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function initSQBuffers() {
gl.bindBuffer(gl.ARRAY_BUFFER, squareVertexColorBuffer);
gl.vertexAttribPointer(shaderProgram.vertexColorAttribute,squareVertexColorBuffer.itemSize, gl.FLOAT, false, 0, 0);

// draw elementary arrays - triangle indices
// draw element arrays - triangle indices
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, squareVertexIndexBuffer);

setMatrixUniforms(); // pass the modelview mattrix and projection matrix to the shader
Expand Down
2 changes: 1 addition & 1 deletion textureTeapot.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion uniform-color-xform.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion xform.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion xform.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ function BG(red, green, blue) {
}

function redraw() {
Z_angle = 0;
Z_angle = 0;
z_angle = 0;
drawScene();
}

Expand Down
2 changes: 1 addition & 1 deletion xform2.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
3 changes: 3 additions & 0 deletions xform2.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ function BG(red, green, blue) {
}

function redraw() {
mat4.identity(mvMatrix);
mvMatrix = mat4.translate(mvMatrix, [-0.5, 0, 0]);
mvMatrix = mat4.scale(mvMatrix, [0.2, 0.2, 0.2]);
drawScene();
}

Expand Down
2 changes: 1 addition & 1 deletion xform3.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
5 changes: 5 additions & 0 deletions xform3.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ function BG(red, green, blue) {
}

function redraw() {
degree2 = 0;
degree3 = 0;
mat4.identity(mvMatrix);
mvMatrix = mat4.translate(mvMatrix, [-0.5, 0, 0]);
mvMatrix = mat4.scale(mvMatrix, [0.2, 0.2, 0.2]);
drawScene();
}

Expand Down
2 changes: 1 addition & 1 deletion xform4.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
5 changes: 5 additions & 0 deletions xform4.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,11 @@ function BG(red, green, blue) {
}

function redraw() {
degree2 = 0;
degree3 = 0;
mat4.identity(mvMatrix);
mvMatrix = mat4.translate(mvMatrix, [-0.5, 0, 0]);
mvMatrix = mat4.scale(mvMatrix, [0.2, 0.2, 0.2]);
drawScene();
}

Expand Down
2 changes: 1 addition & 1 deletion xform5.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h4> Background: </h4>

<div>
<h4>
Click on the left mouse button and move the coursor to rotate
Click on the left mouse button and move the cursor to rotate
</h4>
<button onclick="redraw()"> Go Back! </button>
</div>
Expand Down
5 changes: 5 additions & 0 deletions xform5.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ function BG(red, green, blue) {
}

function redraw() {
mat4.identity(mvMatrix);
mvMatrix = mat4.translate(mvMatrix, [-0.5, 0, 0]);
mvMatrix = mat4.scale(mvMatrix, [0.2, 0.2, 0.2]);
degree2 = 0;
degree3 = 0;
drawScene();
}

Expand Down