跟踪球控件在Three.js的新版本中不起作用 [英] Trackball controls doesn't work in new build of three.js

查看:153
本文介绍了跟踪球控件在Three.js的新版本中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试进行包含许多行的模拟.到目前为止,我拥有Three.js v45和Trackball Controls,并且运行良好.

I'm trying to make a simulation consisting of many lines. Up until now I had Three.js v45 and Trackball Controls and it worked fine.

然后,我尝试在缓冲区几何图形中实现我的线条(如本例所示:

I then tried to implement my lines in a buffer geometry (as in this example: http://fzwoch.project-sheol.org/three.js/examples/webgl_buffergeometry_lines.html)

但是为此,我需要更新到较新的Three.js构建.而且轨迹球控件不再起作用!我想念什么吗?我如何才能同时工作?

but for that I needed to update to the newer Three.js build. And Trackball Controls doesn't work anymore! Am I missing something? How can I get both to work?

谢谢你, 卡西亚

推荐答案

首先,您是否注意到控件已更改位置?现在,您必须添加html文件:

First have you noticed that the controls changed location? Now you have to add in your html file:

<script src="three.js/examples/js/controls/TrackballControls.js"></script>

您还应该检查迁移说明 https://github.com/mrdoob/three .js/wiki/Migration ,查看您的代码从r45版本到r55(当前)是否有其他更改.

You should also check the migration notes https://github.com/mrdoob/three.js/wiki/Migration to see if anything else changed for your code from the r45 release to r55 (current).

这篇关于跟踪球控件在Three.js的新版本中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆