mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-26 06:05:54 +08:00
Correct @types/three TubeGeometry path argument (#13475)
Despite being called "path," `TubeGeometry` requires a Vector3 curve. I think this came from someone misreading the docs (https://threejs.org/docs/#Reference/Geometries/TubeGeometry), where it identifies the first argument like this: ``` path — Curve - A path that inherits from the Curve base class ``` The "Curve" in the description links to https://threejs.org/docs/#Reference/Extras.Core/Curve. A `Path`, meanwhile, comes from a list of Vector2s, which seems totally incompatible.
This commit is contained in:
4
three/index.d.ts
vendored
4
three/index.d.ts
vendored
@@ -6483,10 +6483,10 @@ declare namespace THREE {
|
||||
}
|
||||
|
||||
export class TubeGeometry extends Geometry {
|
||||
constructor(path: Path, segments?: number, radius?: number, radiusSegments?: number, closed?: boolean, taper?: (u: number) => number);
|
||||
constructor(path: Curve<Vector3>, segments?: number, radius?: number, radiusSegments?: number, closed?: boolean, taper?: (u: number) => number);
|
||||
|
||||
parameters: {
|
||||
path: Path;
|
||||
path: Curve<Vector3>;
|
||||
segments: number;
|
||||
radius: number;
|
||||
radialSegments: number;
|
||||
|
||||
Reference in New Issue
Block a user