generate a circle by points
let arc = new THREE.ArcCurve(0, 0, 200, 0, 2 * Math.PI, true);
let points = arc.getPoints(50);
let geometry = new THREE.BufferGeometry().setFromPoints(points);
geometry.attributes.position.needsUpdate = true;
let material = new THREE.LineBasicMaterial({ color: 0x00ff00 });
let circle = new THREE.Line(geometry, material);
do some translate
circle.translateX(100);
circle.translateY(100);
circle.translateZ(100);
circle.rotation.y = Math.PI / 2;
scene.add(circle);
and now, i want to get points from Mesh circle
1.i can't find function from mesh to get points
2.i have tried to see circle.geometry.getAttribute('position').array and i write i float32ArrayToVector3Array like this
const float32ArrayToVector3Array = (arr: any) => {
let _arr: THREE.Vector3[] = [];
for (let i = 0; i < arr.length; i += 3) {
_arr.push(new THREE.Vector3(arr[i], arr[i + 1], arr[i + 2]));
}
return _arr;
};
but circle.geometry.getAttribute('position').array seem like is not newest points
so i want to know how to get points from Mesh