Is there a way to render a 2D shape of points in three.js? I have been struggling to find a working geometry for this task. I simply want to create a polygon of points that lie on the same plane.
The 'Shape' object doesn't seem to be suitable as it only supports 2D coordinates and I need to work with 3D points...
Currently, I am using the code below to create a shape in the X,Y plane:
var squareShape = new THREE.Shape();
squareShape.moveTo( 0, 0 );
squareShape.lineTo( 0, 50 );
squareShape.lineTo( 20, 80 );
squareShape.lineTo( 50, 50 );
squareShape.lineTo( 0, 0 );
How can I adapt this to work in a 3D world? Is there a solution like this:
squareShape.moveTo( 0, 0, 0 );
squareShape.lineTo( 0, 50, 50 );
Any suggestions or guidance would be greatly appreciated.