diff --git a/webgpu/lessons/webgpu-vertex-buffers.md b/webgpu/lessons/webgpu-vertex-buffers.md index 1f8420bc..d06366f7 100644 --- a/webgpu/lessons/webgpu-vertex-buffers.md +++ b/webgpu/lessons/webgpu-vertex-buffers.md @@ -928,12 +928,12 @@ function createCircleVertices({ + let ndx = 0; + + // 1st tri 2nd tri 3rd tri 4th tri -+ // 0 1 2 2 1 3 4 5 6 6 5 7 ++ // 0 1 2 2 1 3 2 3 4 4 3 5 + // -+ // 0--2 2 4--6 6 ..... ++ // 0--2 2 2--4 4 ..... + // | / /| | / /| + // |/ / | |/ / | -+ // 1 1--3 5 5--7 ..... ++ // 1 1--3 3 3--5 ..... + for (let i = 0; i < numSubdivisions; ++i) { + const ndxOffset = i * 2; + diff --git a/webgpu/webgpu-vertex-buffers-index-buffer.html b/webgpu/webgpu-vertex-buffers-index-buffer.html index baf2384f..6928cfdf 100644 --- a/webgpu/webgpu-vertex-buffers-index-buffer.html +++ b/webgpu/webgpu-vertex-buffers-index-buffer.html @@ -83,12 +83,12 @@ let ndx = 0; // 1st tri 2nd tri 3rd tri 4th tri - // 0 1 2 2 1 3 4 5 6 6 5 7 + // 0 1 2 2 1 3 2 3 4 4 3 5 // - // 0--2 2 4--6 6 ..... + // 0--2 2 2--4 4 ..... // | / /| | / /| // |/ / | |/ / | - // 1 1--3 5 5--7 ..... + // 1 1--3 3 3--5 ..... for (let i = 0; i < numSubdivisions; ++i) { const ndxOffset = i * 2;