THREE.BufferGeometry.setFromPoints accepts Vector2s as well

The documentation shows examples of this, e.g.:

https://threejs.org/docs/#api/extras/curves/EllipseCurve

The source code shows how it handles an array of either type:

https://github.com/mrdoob/three.js/blob/2f2e5f731/src/core/BufferGeometry.js#L352
This commit is contained in:
Ford Hurley
2018-05-20 09:50:27 -04:00
parent 7983861f3e
commit eb59409935

View File

@@ -873,7 +873,7 @@ export class BufferGeometry extends EventDispatcher {
center(): BufferGeometry;
setFromObject(object: Object3D): BufferGeometry;
setFromPoints(points: Vector3[]): BufferGeometry;
setFromPoints(points: Vector3[]|Vector2[]): BufferGeometry;
updateFromObject(object: Object3D): void;
fromGeometry(geometry: Geometry, settings?: any): BufferGeometry;