From c4205e036f4946c9ca0ba636862c0495c2bc78c1 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Fri, 18 Oct 2024 09:27:14 -0400 Subject: [PATCH 1/2] Make `getConfiguration().toneMapping` optional Assuming we land https://github.com/gpuweb/gpuweb/pull/4922, `toneMapping` will be optional in practice until all browsers implement it. --- dist/index.d.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index fda2f19..feadba9 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -654,10 +654,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; From d25aa0ed159606bd5498848700db08f316f07744 Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Fri, 1 Nov 2024 21:20:54 -0700 Subject: [PATCH 2/2] format --- dist/index.d.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index fb88b97..049446a 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -3217,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;