Hello everyone,
I’ve created a tool that allows generating a flat ‘shape’ from an array of points that fills up with each user click, capturing their mouse coordinates. However, I’d like to calculate the surface area of the ‘shape’ I’ve created, but I don’t see any property that could help me. Do you have any idea how to proceed?
vous pouvez voir a quoi ressemblent les propriétés de la shape quand je log son ref :
An excerpt from my code here:
if (points.length <= 0) return;
const newShape = new Shape();
newShape.moveTo(points[0][0],points[0][1])
points.map((point, index )=>{
newShape.lineTo(point[0],point[1])
console.log(newShape);
})
setTheShape(newShape)