jure / aframe-blink-controls

A teleport (blink with rotation) component for A-Frame
https://jure.github.io/aframe-blink-controls
MIT License
50 stars 17 forks source link

Add cancel event #18

Closed AdaRoseCannon closed 2 years ago

AdaRoseCannon commented 2 years ago

In my use case, using hand tracking to fire the blink events sometimes the user points for a few frames but not long enough to trigger the blink so in that situation I want to cancel it so that the line and hit entity disappear.

This allows it to listen for a cancel event which stops the blink.

jure commented 2 years ago

This looks very useful and I like the implementation!

Any chance you could add an example of how it can be used too?

AdaRoseCannon commented 2 years ago

Sure, where do you want the example?

jure commented 2 years ago

The examples live on this GitHub Pages site (https://jure.github.io/aframe-blink-controls/), and the source for them is in this repo's docs folder (https://github.com/jure/aframe-blink-controls/tree/main/docs). In order to not increase the number of examples for this, I think the terrain example would be a good place to demonstrate the cancel functionality, since the title of it is 'Example with curved terrain and events'.

What do you think?

AdaRoseCannon commented 2 years ago

Sure.

AdaRoseCannon commented 2 years ago

If it detects a squeeze or gripdown event it cancels the navigation

jure commented 2 years ago

Thank you so much, Ada! Apologies for the late response - to try and make it right I've now also released a new version of aframe-blink-controls.