From 846b37c99fe84b3699bf4442b9c0973d6b8ffff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Guimmara?= <5512096+sguimmara@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:50:13 +0100 Subject: [PATCH] fix: implements GLTFLoaderPlugin for all GLTF extensions (#871) This typing is necessary to register this extension on the three.js GLTFLoader. --- src/plugins/three/gltf/GLTFCesiumRTCExtension.d.ts | 4 +++- src/plugins/three/gltf/GLTFMeshFeaturesExtension.d.ts | 3 ++- src/plugins/three/gltf/GLTFStructuralMetadataExtension.d.ts | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins/three/gltf/GLTFCesiumRTCExtension.d.ts b/src/plugins/three/gltf/GLTFCesiumRTCExtension.d.ts index ec4b1b363..e54b40420 100644 --- a/src/plugins/three/gltf/GLTFCesiumRTCExtension.d.ts +++ b/src/plugins/three/gltf/GLTFCesiumRTCExtension.d.ts @@ -1,4 +1,6 @@ -export class GLTFCesiumRTCExtension { +import { GLTFLoaderPlugin } from 'three/examples/jsm/loaders/GLTFLoader.js'; + +export class GLTFCesiumRTCExtension implements GLTFLoaderPlugin { name: 'CESIUM_RTC'; diff --git a/src/plugins/three/gltf/GLTFMeshFeaturesExtension.d.ts b/src/plugins/three/gltf/GLTFMeshFeaturesExtension.d.ts index b97f72959..86135e866 100644 --- a/src/plugins/three/gltf/GLTFMeshFeaturesExtension.d.ts +++ b/src/plugins/three/gltf/GLTFMeshFeaturesExtension.d.ts @@ -1,6 +1,7 @@ import { Vector3 } from 'three'; +import { GLTFLoaderPlugin } from 'three/examples/jsm/loaders/GLTFLoader.js'; -export class GLTFMeshFeaturesExtension { +export class GLTFMeshFeaturesExtension implements GLTFLoaderPlugin { name: 'EXT_mesh_features'; diff --git a/src/plugins/three/gltf/GLTFStructuralMetadataExtension.d.ts b/src/plugins/three/gltf/GLTFStructuralMetadataExtension.d.ts index 9ff2de45e..1fcfd9816 100644 --- a/src/plugins/three/gltf/GLTFStructuralMetadataExtension.d.ts +++ b/src/plugins/three/gltf/GLTFStructuralMetadataExtension.d.ts @@ -1,6 +1,7 @@ import { Vector3, Texture } from 'three'; +import { GLTFLoaderPlugin } from 'three/examples/jsm/loaders/GLTFLoader.js'; -export class GLTFStructuralMetadataExtension { +export class GLTFStructuralMetadataExtension implements GLTFLoaderPlugin { name: 'EXT_structural_metadata';