简体   繁体   中英

Hide mouse pointer (small hand) in A-Frame scene

I would ask a simple question.

Is there some methods to hide the mouse pointer(small hand) in a-scene?

I have tried css cursor: none on body tag. But it doesn't.

Thanks for any help.

demo: https://glitch.com/edit/#!/animated-gltf-opacity

The styles load with the scene, try adding the css style after the scene is loaded.

 scene.addEventListener("loaded", (e)=> { (.a-canvasReference).style.cursor = "none")})

like i did here .

由于很难在没有可见的鼠标光标的情况下进行导航(您仍然需要单击并拖动以查看,而不知道光标在哪里),因此最好在摄像机上启用指针锁定,这将自动隐藏光标和无需单击和拖动:

<a-camera look-controls="pointerLockEnabled: true;"></a-camera>

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