Error: ray.intersectScene is not a function

I used the sim.js code and its objects for a simple WebGL project. When I needed to use the frustum class (see this question ), I had to update three.js . One thing has broken:

 TypeError: ray.intersectScene is not a function sim.js(line 357) var intersects = ray.intersectScene( this.scene ); 

I checked the source code on git and this function does not exist in ray.js How can I update this code?

+4
source share
1 answer

See the wiki for th.js on migration: https://github.com/mrdoob/three.js/wiki/Migration

Removed intersectScene from Ray . Use Raycaster.intersectObjects( array ) instead.

three.js r.61

+4
source

Source: https://habr.com/ru/post/1442853/


All Articles