Editor: use more three/addons/* alias#27967
Merged
Mugen87 merged 2 commits intomrdoob:devfrom Mar 22, 2024
KalinZhang:dev
Merged
Editor: use more three/addons/* alias#27967Mugen87 merged 2 commits intomrdoob:devfrom KalinZhang:dev
three/addons/* alias#27967Mugen87 merged 2 commits intomrdoob:devfrom
KalinZhang:dev
Conversation
Follow #23406, use more alias in editor
Mugen87
reviewed
Mar 22, 2024
editor/js/Loader.js
Outdated
|
|
||
| const ktx2Loader = new KTX2Loader(); | ||
| ktx2Loader.setTranscoderPath( '../examples/jsm/libs/basis/' ); | ||
| ktx2Loader.setTranscoderPath( 'three/addons/libs/basis/' ); |
Collaborator
There was a problem hiding this comment.
This change does not work. If you now import a compressed glTF asset (like coffeemat.glb) or a 3DM file the import fails and you see 404 HTTP errors in the browser console.
You can only use the addons alias if your import via ES6 import syntax. If you load from a URL e.g. via fetch, you have to use the real directoy path meaning examples/jsm.
Contributor
Author
There was a problem hiding this comment.
Sorry, I again checked all the changes and fixed lines that do not work.
It's my bad that I only test a subset and I'll do more careful tests before my next prs. Thanks!
Mugen87
approved these changes
Mar 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related pr: #23406
Description
Follow #23406, use more alias in editor
Use
three/addons/*andthree/examples/*alias instead of../../*