Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

326
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda