so I’m fairly new to coding, GitHub pages all of it. I am trying to serve my website over there which includes three 3d models (their files being larger than 100mb) which I have added to the git repository using git lfs. I was successfully able to set up my repository but my models won’t load and despite everything I’ve tried, I end up with this error message:
SyntaxError: Unexpected token 'v', "version ht"... is not valid JSON
at JSON.parse (<anonymous>)
at GLTFLoader.parse (GLTFLoader.js:350:17)
at Object.onLoad (GLTFLoader.js:245:11)
at three.module.js:44214:38
Everything worked while I was building the site and serving it on my local server, but trying to get this published has been a real pain. I would appreciate any help!
Here is my repository link
and here is a snippet of the code in question:
const loader = new GLTFLoader(loadingManager);
let model;
loader.load('https://mxmadu.github.io/pretty-hurts/models/PHUK_PHACE_A.glb', function(gltf) {
model = gltf.scene;
model.rotation.set(0, Math.PI, 0);
model.receiveShadow = true;
scene.add(model);
I tried hosting the files on other file hosting platforms (nothing fancy just dropbox and google drive to see if those would give different results because I found out that the pointer file GitHub had created in the process of storing this large file wasn’t the right format?)
So I think I just need to figure out what I can change in my code to fix this