Skip to content

Commit

Permalink
BufferGeometry: Check for existing attribute in setFromPoints().
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed Nov 10, 2024
1 parent 488575d commit d298a72
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions types/three/src/core/BufferGeometry.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,12 @@ export class BufferGeometry<
center(): this;

/**
* Sets the attributes for this BufferGeometry from an array of points.
* @param points
* Defines a geometry by creating a `position` attribute based on the given array of points. The array can hold
* instances of {@link Vector2} or {@link Vector3}. When using two-dimensional data, the `z` coordinate for all
* vertices is set to `0`.
*
* If the method is used with an existing `position` attribute, the vertex data are overwritten with the data from
* the array. The length of the array must match the vertex count.
*/
setFromPoints(points: Vector3[] | Vector2[]): this;

Expand Down

0 comments on commit d298a72

Please sign in to comment.