From baf445bc4d5f53f7d933645e6e335aaacf8bba80 Mon Sep 17 00:00:00 2001 From: hybridherbst Date: Sat, 23 Dec 2023 22:34:38 +0100 Subject: [PATCH 1/4] GLTFLoaderPlugin: add constructor and required name getter --- types/three/examples/jsm/loaders/GLTFLoader.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/three/examples/jsm/loaders/GLTFLoader.d.ts b/types/three/examples/jsm/loaders/GLTFLoader.d.ts index bafdf1893..ad2b876fb 100644 --- a/types/three/examples/jsm/loaders/GLTFLoader.d.ts +++ b/types/three/examples/jsm/loaders/GLTFLoader.d.ts @@ -131,6 +131,8 @@ export class GLTFParser { } export interface GLTFLoaderPlugin { + constructor(parser: GLTFParser); + get name(): string; beforeRoot?: (() => Promise | null) | undefined; afterRoot?: ((result: GLTF) => Promise | null) | undefined; loadNode?: ((nodeIndex: number) => Promise | null) | undefined; From ddd04e9ec05f1e32338dfc1a9c8ee55aa8c75124 Mon Sep 17 00:00:00 2001 From: hybridherbst Date: Thu, 28 Dec 2023 00:25:59 +0100 Subject: [PATCH 2/4] remove constructor, change name to readonly prop --- types/three/examples/jsm/loaders/GLTFLoader.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/types/three/examples/jsm/loaders/GLTFLoader.d.ts b/types/three/examples/jsm/loaders/GLTFLoader.d.ts index ad2b876fb..352b155d1 100644 --- a/types/three/examples/jsm/loaders/GLTFLoader.d.ts +++ b/types/three/examples/jsm/loaders/GLTFLoader.d.ts @@ -131,8 +131,7 @@ export class GLTFParser { } export interface GLTFLoaderPlugin { - constructor(parser: GLTFParser); - get name(): string; + readonly name: string; beforeRoot?: (() => Promise | null) | undefined; afterRoot?: ((result: GLTF) => Promise | null) | undefined; loadNode?: ((nodeIndex: number) => Promise | null) | undefined; From a43727fc370f901e52d6a94e989db2cc1cfb7a04 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Tue, 9 Jan 2024 09:35:43 -0500 Subject: [PATCH 3/4] Format --- types/three/examples/jsm/loaders/GLTFLoader.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/three/examples/jsm/loaders/GLTFLoader.d.ts b/types/three/examples/jsm/loaders/GLTFLoader.d.ts index 352b155d1..c60f0a864 100644 --- a/types/three/examples/jsm/loaders/GLTFLoader.d.ts +++ b/types/three/examples/jsm/loaders/GLTFLoader.d.ts @@ -131,7 +131,7 @@ export class GLTFParser { } export interface GLTFLoaderPlugin { - readonly name: string; + readonly name: string; beforeRoot?: (() => Promise | null) | undefined; afterRoot?: ((result: GLTF) => Promise | null) | undefined; loadNode?: ((nodeIndex: number) => Promise | null) | undefined; From 71130caf321098def5ee66ca1ae6ebc2f88f413f Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Tue, 9 Jan 2024 09:37:01 -0500 Subject: [PATCH 4/4] Update test --- types/three/test/integration/loaders-gltfloader-plugin.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/three/test/integration/loaders-gltfloader-plugin.ts b/types/three/test/integration/loaders-gltfloader-plugin.ts index c3b725eac..c92788825 100644 --- a/types/three/test/integration/loaders-gltfloader-plugin.ts +++ b/types/three/test/integration/loaders-gltfloader-plugin.ts @@ -18,6 +18,8 @@ init().then(() => { }); class ExamplePlugin implements GLTFLoaderPlugin { + name: 'example-plugin'; + parser: GLTFParser; constructor(parser: GLTFParser) {