From 51cb07d2d07f9e51a7bcb4781353a35be704929e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Guimmara?= <5512096+sguimmara@users.noreply.github.com> Date: Wed, 8 Jan 2025 01:44:13 +0100 Subject: [PATCH] fix(GLTFExtensionsPlugin.d.ts): make all parameters optional (#908) * fix(GLTFExtensionsPlugin.d.ts): make all parameters optional * fix(TileCompressionPlugin.d.ts): make all parameters optional * fix(UnloadTilesPlugin.d.ts): make all parameters optional * fix(TilesFadePlugin.d.ts): make all parameters optional * fix(ReorientationPlugin.d.ts): make all parameters optional * fix(GoogleCloudAuthPlugin.d.ts): add missing parameters --- src/plugins/three/GLTFExtensionsPlugin.d.ts | 12 ++++++------ src/plugins/three/GoogleCloudAuthPlugin.d.ts | 7 ++++++- src/plugins/three/ReorientationPlugin.d.ts | 12 ++++++------ src/plugins/three/TileCompressionPlugin.d.ts | 20 ++++++++++---------- src/plugins/three/UnloadTilesPlugin.d.ts | 6 +++--- src/plugins/three/fade/TilesFadePlugin.d.ts | 8 ++++---- 6 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/plugins/three/GLTFExtensionsPlugin.d.ts b/src/plugins/three/GLTFExtensionsPlugin.d.ts index b7c64b50c..d2d56ad55 100644 --- a/src/plugins/three/GLTFExtensionsPlugin.d.ts +++ b/src/plugins/three/GLTFExtensionsPlugin.d.ts @@ -5,14 +5,14 @@ import { GLTFLoaderPlugin, GLTFParser } from 'three/examples/jsm/loaders/GLTFLoa export class GLTFExtensionsPlugin { constructor( options: { - metadata: boolean, - rtc: boolean, + metadata?: boolean, + rtc?: boolean, - plugins: Array<( parser: GLTFParser ) => GLTFLoaderPlugin>, + plugins?: Array<( parser: GLTFParser ) => GLTFLoaderPlugin>, - dracoLoader: DRACOLoader | null, - ktxLoader: KTX2Loader | null, - autoDispose: boolean, + dracoLoader?: DRACOLoader | null, + ktxLoader?: KTX2Loader | null, + autoDispose?: boolean, } ); } diff --git a/src/plugins/three/GoogleCloudAuthPlugin.d.ts b/src/plugins/three/GoogleCloudAuthPlugin.d.ts index b117e4a5d..e98ed4fff 100644 --- a/src/plugins/three/GoogleCloudAuthPlugin.d.ts +++ b/src/plugins/three/GoogleCloudAuthPlugin.d.ts @@ -1,5 +1,10 @@ export class GoogleCloudAuthPlugin { - constructor( options : { apiToken: string, autoRefreshToken?: boolean } ); + constructor( options: { + apiToken: string, + autoRefreshToken?: boolean, + logoUrl?: string, + useRecommendedSettings?: boolean; + } ); } diff --git a/src/plugins/three/ReorientationPlugin.d.ts b/src/plugins/three/ReorientationPlugin.d.ts index d495de557..295bdc197 100644 --- a/src/plugins/three/ReorientationPlugin.d.ts +++ b/src/plugins/three/ReorientationPlugin.d.ts @@ -1,12 +1,12 @@ export class ReorientationPlugin { - constructor( options: { - up: '+x' | '-x' | '+y' | '-y' | '+z' | '-z', - recenter: boolean, + constructor( options?: { + up?: '+x' | '-x' | '+y' | '-y' | '+z' | '-z', + recenter?: boolean, - lat: number | null, - lon: number | null, - height: number, + lat?: number | null, + lon?: number | null, + height?: number, } ); } diff --git a/src/plugins/three/TileCompressionPlugin.d.ts b/src/plugins/three/TileCompressionPlugin.d.ts index d565a5440..ee893188a 100644 --- a/src/plugins/three/TileCompressionPlugin.d.ts +++ b/src/plugins/three/TileCompressionPlugin.d.ts @@ -2,17 +2,17 @@ import { TypedArray } from 'three'; export class TileCompressionPlugin { - constructor( options: { - generateNormals: boolean, - disableMipmaps: boolean, - compressIndex: boolean, - compressNormals: boolean, - compressUvs: boolean, - compressPosition: boolean, + constructor( options?: { + generateNormals?: boolean, + disableMipmaps?: boolean, + compressIndex?: boolean, + compressNormals?: boolean, + compressUvs?: boolean, + compressPosition?: boolean, - uvType: TypedArray, - normalType: TypedArray, - positionType: TypedArray, + uvType?: TypedArray, + normalType?: TypedArray, + positionType?: TypedArray, } ); } diff --git a/src/plugins/three/UnloadTilesPlugin.d.ts b/src/plugins/three/UnloadTilesPlugin.d.ts index 5d4ec4524..0c871e02e 100644 --- a/src/plugins/three/UnloadTilesPlugin.d.ts +++ b/src/plugins/three/UnloadTilesPlugin.d.ts @@ -1,8 +1,8 @@ export class UnloadTilesPlugin { - constructor( options: { - delay: number, - bytesTarget: number, + constructor( options?: { + delay?: number, + bytesTarget?: number, } ); } diff --git a/src/plugins/three/fade/TilesFadePlugin.d.ts b/src/plugins/three/fade/TilesFadePlugin.d.ts index 34427d174..dcbd76add 100644 --- a/src/plugins/three/fade/TilesFadePlugin.d.ts +++ b/src/plugins/three/fade/TilesFadePlugin.d.ts @@ -1,9 +1,9 @@ export class TilesFadePlugin { - constructor( options: { - maximumFadeOutTiles: number, - fadeRootTiles: boolean, - fadeDuration: number, + constructor( options?: { + maximumFadeOutTiles?: number, + fadeRootTiles?: boolean, + fadeDuration?: number, } ); }