Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Changing the sunflower to another gltf #31

Open
prp-e opened this issue Sep 6, 2021 · 3 comments
Open

Changing the sunflower to another gltf #31

prp-e opened this issue Sep 6, 2021 · 3 comments

Comments

@prp-e
Copy link

prp-e commented Sep 6, 2021

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 😂

@Mawkk
Copy link

Mawkk commented Sep 13, 2021

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

@prp-e
Copy link
Author

prp-e commented Sep 13, 2021

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

@Mawkk

@ghost
Copy link

ghost commented Jan 3, 2022

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants