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

Spawnpoint from url hash #47

Closed uhunkler closed 1 month ago

uhunkler commented 1 month ago

I committed the changes for the issue »Go to the waypoint specified in the url hash #42« I ran the lint and the prettier NPM scripts, so I hope the formatting is right now.

In the »move« method of the "move-to-spawn-point" component I check for a hash in the URL and if there is a waypoint with the ID given in the hash the »click« event is emitted on that waypoint to move there.

I testet with all three waypoints set in the GLB and the move works as expected.

vincentfretin commented 1 month ago

I addressed my comment https://github.com/c-frame/aframe-gltf-model-plus/issues/42#issuecomment-2039605405 in https://github.com/c-frame/aframe-gltf-model-plus/commit/c4bffacd6ab727be6c5c3d59faceb0a814f30ac7 and also made a change https://github.com/c-frame/aframe-gltf-model-plus/commit/9490f4d9770e7b7ac23774b6840b7ad230be3281 for move-to-unoccupied-waypoint="on:connected;delay:3" to not do anything if a hash is present.