Drawing a plane from line

im planning to implement the following; where you draw a line using mouse using two points,
unproject it back to 3d world and create a plane mesh from it.

unfortunately, i can only see that to create a plane in threejs, we need width, height, and segmentation count,

any idea on how to do this?

There may be a better way to do this, maybe updating the position attributes manually. I created a THREE.Shape to make a line. Then I extrude the line n length.

  const shape = new THREE.Shape();
  shape.moveTo(0, 0);
  shape.lineTo(0, 5);

How is that?

It’s not clear to me exactly what you want to do. A sketch would be helpful.

You can create planes and other geometry from lines.

See the Collection of examples from discourse.threejs.org .

MouseRectangle2D
WallBuilding
Create3D

From points
ExtrudeFromPoints
PlanePoints

From curve points
interactiveShape


Frames
Construction of frames with contour/profile

1 Like

the Create3D sample you provided is the one I am looking for, thanks!