Skip to content

Conversation

@aashu2006
Copy link
Contributor

Fixes #1155

The “Optimizing WebGL Sketches” tutorial used height instead of width when converting 2D coordinates to the 1D pixels[] array.

This worked only because the example canvas was square. The code has been updated to use the correct pixel indexing formula, matching the p5.js reference documentation.

No other behavior or examples were changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect pixel array indexing formula in Optimizing WebGL Sketches tutorial

1 participant