From 0a3f9e7dc8121bb5aa0f42521b1823e713b7249a Mon Sep 17 00:00:00 2001 From: Philippe Suter Date: Sun, 10 Feb 2019 21:50:13 -0500 Subject: [PATCH 1/2] Add definition for LineLoop in three Fixes #25294 --- types/three/index.d.ts | 1 + types/three/three-core.d.ts | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/types/three/index.d.ts b/types/three/index.d.ts index 08b64250c8..420d48fe67 100644 --- a/types/three/index.d.ts +++ b/types/three/index.d.ts @@ -25,6 +25,7 @@ // Zhang Hao // Konstantin Lukaschenko // Daniel Yim +// Philippe Suter // Definitions: https://github.com//DefinitelyTyped // TypeScript Version: 2.8 diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts index 4866cbfd54..34ac8cc1c5 100755 --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -5273,13 +5273,23 @@ export class Line extends Object3D { geometry: Geometry | BufferGeometry; material: Material | Material[]; - type: "Line"; + type: "Line" | "LineLoop"; isLine: true; computeLineDistances(): this; raycast(raycaster: Raycaster, intersects: Intersection[]): void; } +export class LineLoop extends Line { + constructor( + geometry?: Geometry | BufferGeometry, + material?: Material | Material[] + ); + + type: "LineLoop"; + isLineLoop: true; +} + /** * @deprecated */ From 7413c61ef88abd5ac80280e1909d1dcd0a5f6725 Mon Sep 17 00:00:00 2001 From: Jessica Franco Date: Sun, 17 Feb 2019 02:17:42 +0900 Subject: [PATCH 2/2] Also add equivalent declaration to LineSegments --- types/three/three-core.d.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types/three/three-core.d.ts b/types/three/three-core.d.ts index 34ac8cc1c5..a2bcd4e60a 100755 --- a/types/three/three-core.d.ts +++ b/types/three/three-core.d.ts @@ -5273,7 +5273,7 @@ export class Line extends Object3D { geometry: Geometry | BufferGeometry; material: Material | Material[]; - type: "Line" | "LineLoop"; + type: "Line" | "LineLoop" | "LineSegments"; isLine: true; computeLineDistances(): this; @@ -5305,6 +5305,9 @@ export class LineSegments extends Line { material?: Material | Material[], mode?: number ); + + type: "LineSegments"; + isLineSegments: true; } export class Mesh extends Object3D {