Skip to content

Fix loadModel normalize overload validation - #9286

Merged
davepagurek merged 2 commits into
processing:mainfrom
xsupremeyx:fix-loadmodel-normalize-overload
Oct 15, 2026
Merged

davepagurek merged 2 commits into
processing:mainfrom
xsupremeyx:fix-loadmodel-normalize-overload

Conversation

@xsupremeyx

@xsupremeyx xsupremeyx commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #9176

Changes

  • Document the loadModel(path, normalize, successCallback, failureCallback) overload in src/webgl/loading.js.
  • Update docs/parameterData.json to recognize the Boolean normalize argument and prevent a false-positive Friendly Errors warning.
  • Add a unit test in test/unit/core/param_errors.js to verify that loadModel(path, true) passes parameter validation.

Screenshots of the change

Not applicable. This change affects parameter validation, not canvas rendering.

PR Checklist

  • [Inline reference] is included / updated
  • npm run lint passes (targeted lint passed; full-project lint reported 44 warnings, including warnings in files unrelated to this change).
  • [Unit tests] are included / updated

@aashu2006 aashu2006 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks @xsupremeyx, LGTM !

I checked it in a sketch and loadModel(path, true) doesn't give the false error anymore, and the generated parameterData.json entry matches what npm run docs gives. loadModel(path, callback) still gets a similar false error btw, but that is separate from this issue so that could be a follow up

cc @davepagurek

@xsupremeyx

Copy link
Copy Markdown
Contributor Author

thanks @xsupremeyx, LGTM !

I checked it in a sketch and loadModel(path, true) doesn't give the false error anymore, and the generated parameterData.json entry matches what npm run docs gives. loadModel(path, callback) still gets a similar false error btw, but that is separate from this issue so that could be a follow up

cc @davepagurek

Thanks for testing it and confirming the fix works! I'll keep this PR focused on the normalize overload. Happy to look into the callback issue separately if needed!

@p5-bot

p5-bot Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Continuous Release

CDN link

Published Packages

Commit hash: 22d6df2

Previous deployments

2f31a0c


This is an automated message.

@davepagurek davepagurek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks! And thanks @aashu2006 for reviewing! Feel free to file a follow up issue for the other overloads you noticed working but reporting false positive FES messages.

@davepagurek
davepagurek merged commit 24a68d5 into processing:main Oct 15, 2026
4 of 5 checks passed
@davepagurek

Copy link
Copy Markdown
Contributor

@all-contributors please add @xsupremeyx for code

@allcontributors

Copy link
Copy Markdown
Contributor

@davepagurek

I've put up a pull request to add @xsupremeyx! 🎉

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.

A false positive FES error on function "loadModel"

3 participants