Since version 125, the use of THREE.Geometry
has been deprecated. As we update our code base, we are encountering errors that are proving difficult to resolve.
Our current task involves creating a sphere and applying a raycaster on it to determine the intersect point.
worldSphere = new THREE.SphereGeometry(
worldSize,
worldXSegments,
worldYSegments
);
...
const intersect = raycaster.intersectObjects([worldGlobe])[0];
...
if (intersect) {
let a = worldSphere.vertices[intersect.face.a];
let b = worldSphere.vertices[intersect.face.b];
let c = worldSphere.vertices[intersect.face.c];
}
In the past, variable a
would contain values for each axis - a.x, a.y, a.z
, and the same principle applied to variables 'b' and 'c'. However, this logic no longer works.
We acknowledge that worldSphere
is now a type of THREE.BufferGeometry
and that the vertices are stored within a position
attribute, but despite our efforts, we cannot seem to rectify the issue.
What is the most effective solution to address this problem?