Importing 3d models at runtime (OBJ with MTL)

Hi! I’m trying to build a PlayCanvas application that loads and displays meshes from a website. I’m not dead set on the .obj file format at all, this is just the only thread that I could find that does anything similar to what I need.

A couple of questions:

  • did you manage to solve the issues with the importer that supports MTL?
  • how did you reference that script in PC? I tried making a copy and saving it as a script asset, however it seems to access other libraries using the “require” keyword and I have no idea how that works in PC.

Sorry if these are stupid questions. I am not familiar with PC and have never used JavaScript before, so this is proving a bit tricky for me.