c-frame/aframe-gltf-model-plus

Go to the waypoint specified in the url hash

vincentfretin opened this issue · 4 comments

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.

I can take this issue.

#47 implements it. Thanks @uhunkler!

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.

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.