Working with Basis Universal compressed textures using BasisTextureLoader #1607
-
G'day, just wondering if anybody has successfully managed to work with Three.js' BasisTextureLoader in a R3F project? I'm currently working on a project that requires many high resolution textures and am very keen to compress these as much as possible - Basis Universal texture compression seems to be a good way of doing this. However, I cannot get the BasisTextureLoader to work, either with normal js (not ideal for R3F but just doing it as a test):
or within R3F's useLoader hook like this:
I'm importing the BasisTextureLoader like so:
And receiving the following error message for both the standard three.js method & useLoader. The error points to the top of the HTML file for the webworkers used by the BasisTextureLoader: It's not the most helpful error message I've ever seen so I'm struggling to work out what's going on. The project is using webpack by the way. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Paul provided a sandbox here I was having the same issue, all came down to file paths essentially. Incorrect file paths were instead returning HTML files so your unexpected identifier was the first character of . Link to discourse thread where I found the answer |
Beta Was this translation helpful? Give feedback.
Paul provided a sandbox here
I was having the same issue, all came down to file paths essentially. Incorrect file paths were instead returning HTML files so your unexpected identifier was the first character of .
Link to discourse thread where I found the answer