Hi, nice to see this polished!
I was following https://dgreenheck.github.io/tree-js/ when you initially released it :)
There's a small compatibility issue that could be resolved.
The current method of importing assets directly in the library doesn't work with all bundlers:
|
import birchAo from './assets/bark/birch_ao_1k.jpg'; |
Some bundlers prefer different syntax (e.g., new URL syntax) or have specific asset handling requirements.
Consider allowing users to import and pass assets themselves, rather than hardcoding imports within the library - This would improve compatibility across different build environments and give users more control over asset management.
Alternatively, using data URLs for the images could be a solution that would be supported by any bundler.
Happy to contribute with a PR if needed!
Hi, nice to see this polished!
I was following https://dgreenheck.github.io/tree-js/ when you initially released it :)
There's a small compatibility issue that could be resolved.
The current method of importing assets directly in the library doesn't work with all bundlers:
ez-tree/src/lib/textures.js
Line 3 in e4191a9
Some bundlers prefer different syntax (e.g., new URL syntax) or have specific asset handling requirements.
Consider allowing users to import and pass assets themselves, rather than hardcoding imports within the library - This would improve compatibility across different build environments and give users more control over asset management.
Alternatively, using data URLs for the images could be a solution that would be supported by any bundler.
Happy to contribute with a PR if needed!