Geometry vertices

I have upgraded to a newer version of three and vertices seem to not be in THREE.PlaneGeometry any more, I have worked around this with other geometries, but what can I do if i want to modify a plane geometry these days? Thanks in advance!

planeGeometry.attributes.position.array ? There is one gotcha, primitives use indexed vertices by default, so you may need to convert the geometry to non-indexed with const geometry = planeGeometry.toNonIndexed()

1 Like

Great, that was very helpful. I maybe wrong but I think its reccomended to use getAttibute e.g.

// Access the position attribute
const positionAttribute = planeGeometry.getAttribute("position");

Thanks!

Thanks for the non indexed info, I didn’t know that!

1 Like

These things PolyhedronGeometry or something similar, for constructing a mesh from the coordinates of points in space - #6 by hofk can be used as an aid to transfer in both directions I think. :thinking: