Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

281
Views
Parcel reference static file in js module

I'm using parcel to develop a three.js based app. But it seems that loading a 3d model is not working because of a non correct path.

I have a model in src/assets/models/mymodel.obj and want to use it inside the obj loader but this relative path is not working.

I tried to add a static folder in the build but referencing to it is also not working.

I tried also to create a specific url with : new URL('model.obj', import.meta.url)

But still not working..

Any tips ?

thanks in advance

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

found it !

juste use :

model = require(path/to/file)

loader.load(model)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!