l2a*_*lba 3 javascript mouse drag aframe
一个简单的问题。我用了4到6个小时来找到它,但没有找到。
例如,我正在构建全景查看器:<a-sky>
<script src="https://aframe.io/releases/0.3.0/aframe.min.js"></script>
<a-scene>
<a-sky src="https://aframe.io/aframe/examples/boilerplate/panorama/puydesancy.jpg" rotation="0 -130 0"></a-sky>
</a-scene>Run Code Online (Sandbox Code Playgroud)
如何通过鼠标反转旋转?(从左到右,从右到左-像这样)
A型车0.6.0
现在,使用look-controls="reverseMouseDrag: true"相机上的属性将反向拖动旋转方向的功能内置到框架中。
<script src="https://aframe.io/releases/0.6.0/aframe.min.js"></script>
<a-scene>
<a-entity camera look-controls="reverseMouseDrag: true"></a-entity>
<a-sky src="https://aframe.io/aframe/examples/boilerplate/panorama/puydesancy.jpg" rotation="0 -130 0"></a-sky>
</a-scene>Run Code Online (Sandbox Code Playgroud)
注意 - 根据此问题,这仍然仅适用于在台式机上拖动鼠标,而不适用于移动设备上的触摸拖动。