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).
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 thehref
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: https://github.com/jonobr1/two.js/issues/668