From 99824774c09eb8684bcaf5f6586a054212f0e623 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Fri, 1 Nov 2024 21:23:43 -0700 Subject: [PATCH] Make `getConfiguration().toneMapping` optional (#159) --- dist/index.d.ts | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index 93598d0..049446a 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -664,10 +664,20 @@ interface GPUCanvasConfiguration { alphaMode?: GPUCanvasAlphaMode; } -type GPUCanvasConfigurationOut = - Required & { - viewFormats: GPUTextureFormat[]; - }; +interface GPUCanvasConfigurationOut + extends Required< + Omit< + GPUCanvasConfiguration, + "toneMapping" + > + > { + /** {@inheritDoc GPUCanvasConfiguration.viewFormats} */ + viewFormats: GPUTextureFormat[]; + /** + * {@inheritDoc GPUCanvasConfiguration.toneMapping} + */ + toneMapping?: GPUCanvasToneMapping; +} interface GPUCanvasToneMapping { mode?: GPUCanvasToneMappingMode; @@ -3207,14 +3217,20 @@ declare var GPUTextureUsage: { }; /** @deprecated Use {@link GPUTexelCopyBufferLayout} */ -type GPUImageDataLayout = GPUTexelCopyBufferLayout; +type GPUImageDataLayout = + GPUTexelCopyBufferLayout; /** @deprecated Use {@link GPUTexelCopyBufferInfo} */ -type GPUImageCopyBuffer = GPUTexelCopyBufferInfo; +type GPUImageCopyBuffer = + GPUTexelCopyBufferInfo; /** @deprecated Use {@link GPUTexelCopyTextureInfo} */ -type GPUImageCopyTexture = GPUTexelCopyTextureInfo; +type GPUImageCopyTexture = + GPUTexelCopyTextureInfo; /** @deprecated Use {@link GPUCopyExternalImageDestInfo} */ -type GPUImageCopyTextureTagged = GPUCopyExternalImageDestInfo; +type GPUImageCopyTextureTagged = + GPUCopyExternalImageDestInfo; /** @deprecated Use {@link GPUCopyExternalImageSourceInfo} */ -type GPUImageCopyExternalImage = GPUCopyExternalImageSourceInfo; +type GPUImageCopyExternalImage = + GPUCopyExternalImageSourceInfo; /** @deprecated Use {@link GPUCopyExternalImageSource} */ -type GPUImageCopyExternalImageSource = GPUCopyExternalImageSource; +type GPUImageCopyExternalImageSource = + GPUCopyExternalImageSource;