Skip to content

Document the loadModel(path, normalize) overload - #9182

Open
devtejasx wants to merge 1 commit into
processing:mainfrom
devtejasx:docs/loadmodel-normalize-overload-9176
Open

devtejasx wants to merge 1 commit into
processing:mainfrom
devtejasx:docs/loadmodel-normalize-overload-9176

Conversation

@devtejasx

@devtejasx devtejasx commented Sep 16, 2026

Copy link
Copy Markdown

Resolves #9176

Changes:

  • loadModel() accepts a boolean normalize flag as its second argument, and the reference examples use it, but no documented overload listed it. The parameter validator reads the same overloads, so loadModel('model.obj', true) logged a false "Expected string at the second parameter" error.
  • Added the loadModel(path, [normalize], [successCallback], [failureCallback]) overload to the JSDoc in src/webgl/loading.js, and the matching entry to docs/parameterData.json (the same entry npm run docs generates for loadModel).
  • Added tests in test/unit/core/param_errors.js: loadModel(path, true) and loadModel(path, true, callback) now validate, loadModel(path, '.obj', true) still validates, and a number as the second argument is still rejected.

PR Checklist

AI disclosure

I have taken help of Claude (Anthropic's AI assistant) for this PR: it traced the false FES error to the missing overload and wrote the JSDoc, parameterData.json change and the tests. I reviewed all of the changes myself.

loadModel() accepts a boolean normalize flag as its second argument, and the reference examples use it, but no documented overload listed it. The parameter validator reads the same overloads, so loadModel('model.obj', true) logged a false "Expected string at the second parameter" error. Add the overload to the JSDoc and parameterData.json (matching what npm run docs generates for loadModel).

Fixes processing#9176
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"

1 participant