codelab-webxr icon indicating copy to clipboard operation
codelab-webxr copied to clipboard

Changing the sunflower to another gltf

Open prp-e opened this issue 4 years ago • 3 comments

I had a gltf, and I changed the link here:

window.gltfLoader.load("https://immersive-web.github.io/webxr-samples/media/gltf/sunflower/sunflower.gltf", function(gltf) {
  const flower = gltf.scene.children.find(c => c.name === 'sunflower')
  flower.castShadow = true;
  window.sunflower = gltf.scene;
});

to something like http://mysite.com/mymodel.gltf and it is not working. I have no idea how I can change the sunflower properly. Now, I can successfully instantiate nothing on the screen 😂

prp-e avatar Sep 06 '21 10:09 prp-e

Same problem would like to change the sunflower model with a different model of mine

Mawkk avatar Sep 13 '21 10:09 Mawkk

I switched to Model Viewer and it's much more straight-forward than this one!

@Mawkk

prp-e avatar Sep 13 '21 10:09 prp-e

Hi, maybe its because of http. I think that https is required if working with non-localhost resources.

ghost avatar Jan 03 '22 09:01 ghost