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?