wasabia / three_dart

three.js rewrite by Dart, Dart 3D library. an easy to use, lightweight, cross-platform, general purpose 3D library.
MIT License
450 stars 80 forks source link

Reading assets from packages (using package name in file path) #142

Open Vera-Spoettl opened 1 year ago

Vera-Spoettl commented 1 year ago

Hi,

I'm trying to load an asset (obj file) from a package. Unfortunately this doesn't work because of file_loader.dart line 152. if (url.startsWith("assets")) {

Could you change this line into if (url.startsWith("assets") || url.startsWith("packages")) {

this would allow to read assets from packages.

Knightro63 commented 1 year ago

Hi @Vera-Spoettl,

Thank you for letting us know. I have added it to my forked version and will make sure it is in the next update.