Search code examples
hrefaframewebvr

Add a delay to cursor-listener in a-frame


i would like to have an a-entity with a cursor listener that triggers a window.location.href but only gazing the object for more than 2 seconds? It's possible ... something like this

http://gasolin.idv.tw/aframe-href-component/basic/link.html

but without an external component in a-frame

Thanks Luca


Solution

  • The cursor has a property called fuseTimeout:

    cursor="fuse: true; fuseTimeout: 500"
    

    Just set it to any miliseconds value.
    You can find it in the docs.