简体   繁体   中英

aframe embeded scene with cursor mouse ray-origin

There seems to be a bug with the embedded scene and the option of mouse cursor (cursor='rayOrigin: mouse'), i've put an mouseenter and mouseleave event on a box to change it's size. It works fine as long as the page is contained in the browser, but when the page is "scrollable" the events get messed up ( like showed in the gif, link bellow). I don't know if I messed up somewhere but it seems that it comes from Aframe. There's a link bellow for the github issue ( more details on it).

GIF : 截屏

Github Issue : https://github.com/aframevr/aframe/issues/3410

The mouse-cursor component uses the whole window to calculate the position, so You'd have to rewrite it, to utilize the <canvas> for raycasting.

There is a workaround, you can make a fullscreen scene and put it in an <i-frame> , where the window is the iframe's body.

Example here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM