c-frame / aframe-gltf-model-plus

gltf-model-plus component to load glb file with hubs extensions
https://c-frame.github.io/aframe-gltf-model-plus/
Mozilla Public License 2.0
10 stars 4 forks source link

Go to the waypoint specified in the url hash #42

Closed vincentfretin closed 1 month ago

vincentfretin commented 1 month ago

Go to the waypoint specified in the url hash like #WPSit instead of the spawn point, changes to be done in move-to-spawn-point to check the hash in the url, look at the open-link for the relevant part of getting the waypoint.

uhunkler commented 1 month ago

I can take this issue.

vincentfretin commented 1 month ago

47 implements it. Thanks @uhunkler!

vincentfretin commented 1 month ago

I'm reopening, we implemented it partially. It works on the first load of the page only. That's already great and it answers my immediate need for it. But we should also handle dynamically setting the hash in the url and listen to the hashchange event Test case, go to http://localhost:8080/examples/playground/index.html then add the hash http://localhost:8080/examples/playground/index.html#WPTwo it should work, without refreshing the page.

vincentfretin commented 1 month ago

A side note, I believe hubs link component is working like this: it sets the hash in the url, go the waypoint and remove the hash in the url. I'm not sure we want this behavior for our open-link component, I think it's okay to keep the current implementation and keep the hash in url.