p5.js icon indicating copy to clipboard operation
p5.js copied to clipboard

[p5.js 2.0+ Bug Report]:Typos in JSDoc comments: "widhts" in helpers.js and "coordiante" in p5.RendererGL.js

Open harshiltewari2004 opened this issue 7 months ago • 7 comments

Most appropriate sub-area of p5.js?

  • [ ] Accessibility
  • [ ] Color
  • [ ] Core/Environment/Rendering
  • [ ] Data
  • [ ] DOM
  • [ ] Events
  • [ ] Image
  • [ ] IO
  • [ ] Math
  • [x] Typography
  • [ ] Utilities
  • [ ] WebGL
  • [ ] WebGPU
  • [ ] p5.strands
  • [ ] Build process
  • [ ] Unit testing
  • [ ] Internationalization
  • [ ] Friendly errors
  • [ ] Other (specify if possible)

p5.js version

main branch (verified on https://github.com/processing/p5.js as of April 25, 2026)

Web browser and version

N/A — documentation/comment typos, not a runtime bug

Operating system

N/A — documentation/comment typos, not a runtime bug

Steps to reproduce this

This is a documentation/comment fix rather than a runtime bug, so the standard reproduction steps don't apply. Both typos were verified to exist on the current main branch.

Typo 1: widhts → widths

File: src/core/helpers.js (line 19)

// For negative widhts or heights, the absolute value is used.
//              ^^^^^^

Typo 2: coordiante → coordinate (appears twice)

File: src/webgl/p5.RendererGL.js (lines 323–324)

In the JSDoc for the pixel-read function:

 * @param {Number} x The x coordiante to read, premultiplied by pixel density
 * @param {Number} y The y coordiante to read, premultiplied by pixel density

Notes

  • Both occur in JSDoc/inline comments only; no runtime behavior is affected.
  • The coordiante typo will surface in the generated reference for anyone reading the JSDoc on the website.
  • I'd like to fix this myself if approved.

harshiltewari2004 avatar Apr 25 '26 16:04 harshiltewari2004

Hi @raclim ,I will be very happy to make this small changes!

harshiltewari2004 avatar Apr 25 '26 16:04 harshiltewari2004

Hi @harshiltewari2004, feel free to open a PR for this!

davepagurek avatar Apr 27 '26 22:04 davepagurek

Thank you so much @davepagurek for assigning this to me. I have created a PR for it!

harshiltewari2004 avatar Apr 28 '26 05:04 harshiltewari2004

Thanks @harshiltewari2004 ! Plese feel free to check if the same PR is needed for dev-2.0 branch

ksen0 avatar Apr 30 '26 11:04 ksen0

Thanks @ksen0 !Checking dev-2.0 now-will report back

harshiltewari2004 avatar Apr 30 '26 13:04 harshiltewari2004

Reporting back as promised — I just opened #8757 against dev-2.0.

A few notes on what I found while checking:

  • src/core/helpers.js still has the original widhts typo, plus an additional typo (coordniates) that didn't exist on main.
  • src/webgl/p5.RendererGL.js is already clean on dev-2.0 — the coordiante typo is gone there.
  • src/webgl/utils.js is a new file on dev-2.0 containing the same coordiante typo (×2), which I've also fixed.

Let me know if any adjustments are needed!

harshiltewari2004 avatar Apr 30 '26 14:04 harshiltewari2004

Hi @ksen0 I checked the dev-2.0 branch, made the necessary changes and have also created a PR it

harshiltewari2004 avatar May 01 '26 07:05 harshiltewari2004