简体   繁体   English

在A帧场景中隐藏鼠标指针(小手)

[英]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? 有一些方法可以在a场景中隐藏鼠标指针(小手)吗?

I have tried css cursor: none on body tag. 我已经尝试过CSS游标:body标签上没有。 But it doesn't. 但事实并非如此。

Thanks for any help. 谢谢你的帮助。

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

The styles load with the scene, try adding the css style after the scene is loaded. 样式随场景一起加载,请在场景加载后尝试添加css样式。

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

like i did here . 就像我在这里一样

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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