Skip to content

Conversation

@vietnguyen2358
Copy link

@vietnguyen2358 vietnguyen2358 commented Nov 2, 2025

Resolves #7994
Addresses #7992

Changes:

  • Implemented normalization in p5.Shader.modify() to auto-return input objects when return is omitted
  • Skip normalization for void hooks or mismatched return types

Live: https://editor.p5js.org/viet.nguyen2358/sketches/J1H2c-kWN

PR Checklist

Contributors:
@phamjoshua6, @SaKaR22

@welcome
Copy link

welcome bot commented Nov 2, 2025

🎉 Thanks for opening this pull request! For guidance on contributing, check out our contributor guidelines and other resources for contributors!
🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure!
🌸 Once your PR is merged, be sure to add yourself to the list of contributors on the readme page !

Thank You!

Copy link
Collaborator

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, really thanks for working on this. For 1.x versions, your logic works well. Currently we are not adding any features to the 1.x versions (i.e. the main branch), I think you need to open up the PR targeting the dev-2.0 branch as well, and

For this PR if you would still like to continue adding this to main branch, you could probably add visual tests to it instead of unit tests. Do you think that would make sense to you and your team?

Really thanks for working on this.

@vietnguyen2358
Copy link
Author

Thanks so much for the clarification. We'll open a new PR targeting the dev-2.0 branch as suggested. Since dev-2.0 is the current active branch, should my team and I also update the current unit tests to visual tests?

For this current PR, I think we can close it and just focus on the other branch.

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.

[p5.strands] Auto-return input objects if omitted

2 participants