Skip to content

Commit 4204272

Browse files
authored
Merge branch 'main' into es-translation-donate
2 parents 56f96bd + 1f79e87 commit 4204272

File tree

3 files changed

+529
-2
lines changed

3 files changed

+529
-2
lines changed

src/content/tutorials/en/optimizing-webgl-sketches.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ function draw() {
457457
  loadPixels();
458458
  for (let x = 0; x < width; x += 1) {
459459
    for (let y = 0; y < height; y += 1) {
460-
      let idx = (y * height + x) * 4;
460+
      let idx = (y * width + x) * 4;
461461
      let newValue;
462462
      if (pixels[idx] + noise(x, y)*50 >= 220) {
463463
        newValue = 255;

src/content/tutorials/en/variables-and-change.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ Add a tree (or another object) to the landscape that moves vertically (up or dow
650650
triangle(25, 270, 45, 240, 70, 270);
651651
```
652652

653-
- Subtract the top angle of a triangle that draws leaves (240) by `frameCount % 290` – the value stored in `cloudOneX`:
653+
- Subtract the top angle of a triangle that draws leaves (240) by `frameCount % 290`:
654654
- Modify the value for y<sub>2</sub> in the triangle above by subtracting it by `frameCount % 290`:
655655

656656
```js

0 commit comments

Comments
 (0)