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

Add support for blob url scheme #3730

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SemiConscious
Copy link

Hi there

A small change that supports the use (in my case) of three.js's GLTFLoader class, which makes extensive use of blob-caching via URL.createObjectURL which generates a URL of the form blob:nodedata:<uuid>, which can then be decoded via the node.js api resolveObjectURL. https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL_static

I introduced a new case in resource-loader.js to handle the blob scheme. It requires const { resolveObjectURL } = require("node:buffer"); which I placed inside a try block. You may want to do this differently, if so let me know.

All the best
Jim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants