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

[Enhancement] Use URL API for Making Textures' Sources Absolute Paths #670

Open
jonobr1 opened this issue Nov 9, 2022 · 0 comments
Open

Comments

@jonobr1
Copy link
Owner

jonobr1 commented Nov 9, 2022

Is your feature request related to a problem? Please describe.
Two.js creates a texture registry so that multiple image elements aren't created for the same asset. To point to canonical versions of an image Two.js creates and stores a private <a /> tag and sets the href attribute to a given texture. The default browser behavior is to expand a resource's path from relative to absolute.

This works in the browser, but not in headless environments

Describe the solution you'd like
Use the URL API instead of <a /> tags and look to see if Two.js is loaded in a browser or headless environment to expand URLs (in the case of browser) or not (in the case of headless).

This issue is based on the conversation from this issue: #668

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

No branches or pull requests

1 participant