Trackball controls doesn't work in new build of three.js

£可爱£侵袭症+ 提交于 2019-12-12 06:34:07

问题


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)

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?

Thank you, Kasia


回答1:


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>

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).



来源:https://stackoverflow.com/questions/14726534/trackball-controls-doesnt-work-in-new-build-of-three-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!