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

325
Views
How to put binary file (or 3D model) hardcoded into script

I have a 3D model, GLB or GLTF (with a texture image and a bin file). I am currently building a project with THREEJS and using GLTFLoader to load the model from a given URL. However, I don't want to pull the file from a URL because I want my code to be decoupled and I want to put the model in my script file hardcoded, not in a separate file because the project shouldn't have files other than the three css, html and js files. GLTF Loader has a parse function defined as such:

.parse ( data : ArrayBuffer, path : String, onLoad : Function, onError : Function ) : undefined

Is there a way for me to generate this ArrayBuffer manually so that I can put it hardcoded in my JS file and pass it as a parameter, or some other method for me to solve this problem?

about 4 years ago · Santiago Gelvez
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!