0

I would like to be able to build a shapeGeometry that is a 2D plane, but that has three dimensions. Essentially, I want to be able to draw a 2D shape that is in the XY plane, the YZ plane, or the XZ plane. Something like below:

var coordinatesList = [
  new THREE.Vector3(0, 0, 0),
  new THREE.Vector3(0, 10, 0),
  new THREE.Vector3(0, 10, 3),
  new THREE.Vector3(0, 0, 3),
  new THREE.Vector3(0, 0, 0)
];
new THREE.Shape(coordinatesList)

Or, is it possible to draw the shape across three dimensions? Like above but with variations in the x, y, and z planes. I have tried this and even though I am using vector3, the end result is 2D.

Joshua Foxworth
  • 1,236
  • 1
  • 22
  • 50
  • maybe this will help https://stackoverflow.com/questions/55302470/extrude-geometry-in-three-js – 2pha Mar 14 '21 at 23:03
  • If you want to build your own vertices, you can just use the [code example in the `BufferGeometry` documentation page](https://threejs.org/docs/#api/en/core/BufferGeometry). And yes, if you want it to be on the YZ plane, just set all of the X values to 0. – M - Mar 16 '21 at 01:00

0 Answers0