我一直在为一个简单的 WebGL 项目使用 sim.js
代码及其对象。当我需要使用 frustum
类(参见 this question )时,我必须更新我的 three.js
。一件事坏了:
TypeError: ray.intersectScene is not a function sim.js(line 357)
var intersects = ray.intersectScene( this.scene );
我在git上查看了源代码,ray.js
中没有那个函数。如何更新此代码?
最佳答案
请参阅有关迁移的 three.js Wiki:https://github.com/mrdoob/three.js/wiki/Migration
从 Ray
中移除了 intersectScene。请改用 Raycaster.intersectObjects( array )
。
three.js r.61
关于javascript - 错误 : ray. intersectScene 不是函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13129795/