Skip to content

Commit

Permalink
Make getConfiguration().toneMapping optional
Browse files Browse the repository at this point in the history
Assuming we land gpuweb/gpuweb#4922,
`toneMapping` will be optional in practice until all browsers implement
it.
  • Loading branch information
kainino0x committed Oct 18, 2024
1 parent 97e05be commit c4205e0
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,20 @@ interface GPUCanvasConfiguration {
alphaMode?: GPUCanvasAlphaMode;
}

type GPUCanvasConfigurationOut =
Required<GPUCanvasConfiguration> & {
viewFormats: GPUTextureFormat[];
};
interface GPUCanvasConfigurationOut
extends Required<
Omit<
GPUCanvasConfiguration,
"toneMapping"
>
> {
/** {@inheritDoc GPUCanvasConfiguration.viewFormats} */
viewFormats: GPUTextureFormat[];
/**
* {@inheritDoc GPUCanvasConfiguration.toneMapping}
*/
toneMapping?: GPUCanvasToneMapping;
}

interface GPUCanvasToneMapping {
mode?: GPUCanvasToneMappingMode;
Expand Down

0 comments on commit c4205e0

Please sign in to comment.