Hi!
I tried to import in the Hello, WebVR! example a 3D model. I download one without textures here: https://sketchfab.com/models/dd46764dc2bc4007b43c16cfba65c62c
The downloaded model is composed by a .gltf file and a .bin file.
I uploaded both file in the assets section on Glitch code editor.
Here my code in the editor:
But I can’t see no 3D model.
If I try it off-line, writing a .html page without tag, the .gltf and .bin file in the same directory and the tag <a-entity gltf-model="scene.gltf" scale="0.09 0.09 0.09" position="0 3 0"></a-entity>
it works.
The same if I use a .obj model with a .mtl file.
Where is the problem on Glitch?
Does it work if you have the file locally in the Glitch project? So use wget https://cdn.glitch.com/661f83bf-728e-4b3b-943e-85750757f2dd%2Fscene.gltf?1549639510909 to import it into your project and then reference the file with a relative path.
Uploading them to assets isn’t the same as having them locally, which is why they have a URL. In order to import them so you have them locally, open the console from the Tools menu in the bottom-left then run the wget command I provided above (copy and paste it) into the console and hit enter. Then update the src path in your html to reference the asset locally.
You’ll want to rename the file - it’s currently called ‘661f83bf-728e-4b3b-943e-85750757f2dd%2Fscene.gltf?1549639510909’. You should see it listed in your project, so click on it and rename to scene.gltf. Then referencing as you did in your local version above should work.
Assets-lib won’t help here - that just makes it so you can reference an asset with a relative path, the file still isn’t stored locally.