@@ -354,15 +354,15 @@ After all that we can finally ask WebGL to execute our GLSL program.
354
354
gl.drawArrays(primitiveType, offset, count);
355
355
356
356
Because the count is 3 this will execute our vertex shader 3 times. The first time ` a_position.x ` and ` a_position.y `
357
- in our vertex shader attribute will be set to the first 2 values from the positionBuffer.
357
+ in our vertex shader attribute will be set to the first 2 values from the ` positionBuffer ` .
358
358
The second time ` a_position.x ` and ` a_position.y ` will be set to the second 2 values. The last time they will be
359
359
set to the last 2 values.
360
360
361
361
Because we set ` primitiveType ` to ` gl.TRIANGLES ` , each time our vertex shader is run 3 times
362
362
WebGL will draw a triangle based on the 3 values we set ` gl_Position ` to. No matter what size
363
363
our canvas is those values are in clip space coordinates that go from -1 to 1 in each direction.
364
364
365
- Because our vertex shader is simply copying our positionBuffer values to ` gl_Position ` the
365
+ Because our vertex shader is simply copying our ` positionBuffer ` values to ` gl_Position ` the
366
366
triangle will be drawn at clip space coordinates
367
367
368
368
0, 0,
@@ -601,7 +601,7 @@ rotation and scale and eventually 3D then [start here](webgl-2d-translation.html
601
601
<code >< ; script> ; </code > tags default to having JavaScript in them.
602
602
You can put no type or you can put <code >type="javascript"</code > or
603
603
<code >type="text/javascript"</code > and the browser will interpret the
604
- contents as JavaScript. If you put anything for else for <code >type</code > the browser ignores the
604
+ contents as JavaScript. If you put anything else for <code >type</code > the browser ignores the
605
605
contents of the script tag. In other words <code >type="notjs"</code >
606
606
or <code >type="foobar"</code > have no meaning as far as the browser
607
607
is concerned.</p >
0 commit comments