简体   繁体   English

three.js OrbitControls跟随鼠标指针

[英]three.js OrbitControls follow mouse pointer

I made some website that implemented with three.js for a 3d graphical project. 我制作了一些网站,该网站使用three.js实现了3D图形项目。

I have to use OrbitControls for zoom in/out with mouse wheel. 我必须使用OrbitControls进行鼠标滚轮的放大/缩小。 (And now I'm using it) (现在我正在使用它)

But I wonder that OrbitControls has some properties that can make the camera follow mouse pointer? 但是我不知道OrbitControls是否具有一些可以使相机跟随鼠标指针的属性?

Reference site is here: https://50-jahre-hitparade.ch/ 参考站点在这里: https://50-jahre-hitparade.ch/ : https://50-jahre-hitparade.ch/

Access that site and move the mouse pointer, camera follows the mouse pointer. 访问该站点并移动鼠标指针,相机跟随鼠标指针。

I want to implement 100% same with the above site's camera move. 我想与上述站点的摄像机移动实现100%相同。

Is there any solution for this? 有什么解决办法吗?

Thanks. 谢谢。

我认为在该示例中,他们可能只是将camera.rotation.x和.y设置为标准化的光标屏幕坐标。

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

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