model-viewer
model-viewer copied to clipboard
fix: Improve HDR texture loading for blob URLs by checking content type
model-viewer currently checks if the URL ends with .hdr using HDR_FILE_RE.test(url)
- If it does, it uses the hdrLoader (RGBELoader)
- If it doesn't, it uses the imageLoader (HDRJPGLoader)
The problem is that when we create a blob URL, it doesn't have the .hdr extension, so it's defaulting to the HDRJPGLoader. We can fix this by modifying the code to check the content type instead of the file extension.