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

Add WebGL visual regression tests for core transform functions

Open aashu2006 opened this issue 10 months ago • 2 comments

Topic

Description

WebGL transform functions (translate, rotate, and scale) currently do not have dedicated visual regression coverage in the dev-2.0 branch.

While these transforms are used throughout existing tests, there are no focused visual tests whose primary purpose is to validate their behavior in WebGL mode.

Proposal

Add a small, low-risk set of visual regression tests that verify basic transform behavior in WebGL:

  • translate() moves shapes correctly along the x and y axes
  • rotate() applies z-axis rotation correctly
  • scale() uniformly scales geometry

Scope

  • Visual tests only
  • No rendering, engine, or API changes
  • No refactoring of existing tests

Goal

Provide baseline visual regression protection for fundamental WebGL transform operations and reduce the risk of future regressions during p5.js 2.0 development.

Initial Tests Planned

  • translate() moves shapes in x and y axes
  • rotate() rotates shapes around z-axis
  • scale() uniformly scales shapes

aashu2006 avatar Jan 28 '26 16:01 aashu2006

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms.

For guidance on contributing, check out our contributing guidelines and other resources for contributors. 💬 If you have questions or need support, feel free to join the Processing Foundation Forum or visit our Community page. 📜 Please also review our Code of Conduct to understand our community standards. Thank You!

welcome[bot] avatar Jan 28 '26 16:01 welcome[bot]

I have opened a PR adding the proposed WebGL transform visual regression tests here: https://github.com/processing/p5.js/pull/8465

The PR adds three low-risk visual tests for translate(), rotate(), and scale() in WebGL mode, scoped to tests only.

aashu2006 avatar Jan 28 '26 17:01 aashu2006