Skip to content

Commit c8aaea5

Browse files
authored
fix typo (#431)
* fix typo * fix typo
1 parent d2c1526 commit c8aaea5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

webgl/lessons/webgl-3d-orthographic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ units as well. I'll pass in some value similar to `width` for the `depth`
346346
so our space will be 0 to `width` pixels wide, 0 to `height` pixels tall, but
347347
for `depth` it will be `-depth / 2` to `+depth / 2`.
348348

349-
Finally we need to to update the code that computes the matrix.
349+
Finally we need to update the code that computes the matrix.
350350

351351
```
352352
// Compute the matrix

webgl/lessons/webgl-qna-pure-webgl-dashed-line.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ I'm assuming it works like this. You have a buffer of positions. You make a corr
4141
lengthSoFar.push(lengthSoFar[ii - 1] + distance(positions, ii - 1, ii));
4242
}
4343

44-
Now you can make buffers for both `positions` and `lengthSoFar` and pass `lengthSoFar` as an attribute into your vertex shader and from there pass it as a varying to to your fragment shader.
44+
Now you can make buffers for both `positions` and `lengthSoFar` and pass `lengthSoFar` as an attribute into your vertex shader and from there pass it as a varying to your fragment shader.
4545

4646
Unfortunately it won't work with indexed geometry (the most common type?). In other words it won't work with `gl.drawElements`, only with `gl.drawArrays`. Also the dashed line would be dashed in 3D not 2D so a line going into the screen (away from the viewer) would look different than a line going across the screen. Of course if you're drawing 2D then there's no problem.
4747

0 commit comments

Comments
 (0)