Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Update:Webgl - .lib files not supported #7454

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,8 @@
"hooks": {
"pre-commit": "lint-staged"
}
},
"dependencies": {
"p5": "file:"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need these changes just to change the documentation. You can reset them with git checkout main -- package-lock.json package.json and then commit the results.

}
}
5 changes: 5 additions & 0 deletions src/webgl/loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ import './p5.Geometry';
* `loadModel('assets/model.obj')`. URLs such as
* `'https://example.com/model.obj'` may be blocked due to browser security.
*
* Note: When loading a `.obj` file that references materials stored in
* `.mtl` files, p5.js will attempt to load and apply those materials.
* To ensure that the `.obj` file reads the `.mtl` file correctly include the
* `.mtl` file alongside it. Currently, other formats like `.lib` for materials are not supported.
*
* The first way to call `loadModel()` has three optional parameters after the
* file path. The first optional parameter, `successCallback`, is a function
* to call once the model loads. For example,
Expand Down