Hello everyone I am a beginner in Three js what I would like to do is that when we fly over the sphere a cube is added in my scene and when the sphere is in contact with the cube, that all the faces that are inside my cube change color however I have the following error someone have an idea why please image error
Here is my code on it https://codesandbox.io/s/change-face-color-sphere-forked-seq87e?file=%2Fsrc%2Findex.js
And here is the type of example I would like to have https://hofk.de/main/discourse.threejs/2019/SelectFacesWithinRadius/SelectFacesWithinRadius.html