@types/web 0.0.327 → 0.0.328

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,4 +47,4 @@ Prior to `@types/web` the web APIs were deployed with a version of TypeScript, a
47
47
 
48
48
  ## Deploy Metadata
49
49
 
50
- You can read what changed in version 0.0.327 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.327.
50
+ You can read what changed in version 0.0.328 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.328.
package/index.d.ts CHANGED
@@ -815,10 +815,38 @@ interface GPUColorDict {
815
815
  r: number;
816
816
  }
817
817
 
818
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
819
+ colorSpace?: PredefinedColorSpace;
820
+ premultipliedAlpha?: boolean;
821
+ }
822
+
823
+ interface GPUCopyExternalImageSourceInfo {
824
+ flipY?: boolean;
825
+ origin?: GPUOrigin2D;
826
+ source: GPUCopyExternalImageSource;
827
+ }
828
+
829
+ interface GPUExtent3DDict {
830
+ depthOrArrayLayers?: GPUIntegerCoordinate;
831
+ height?: GPUIntegerCoordinate;
832
+ width: GPUIntegerCoordinate;
833
+ }
834
+
818
835
  interface GPUObjectDescriptorBase {
819
836
  label?: string;
820
837
  }
821
838
 
839
+ interface GPUOrigin2DDict {
840
+ x?: GPUIntegerCoordinate;
841
+ y?: GPUIntegerCoordinate;
842
+ }
843
+
844
+ interface GPUOrigin3DDict {
845
+ x?: GPUIntegerCoordinate;
846
+ y?: GPUIntegerCoordinate;
847
+ z?: GPUIntegerCoordinate;
848
+ }
849
+
822
850
  interface GPUPipelineErrorInit {
823
851
  reason: GPUPipelineErrorReason;
824
852
  }
@@ -826,6 +854,19 @@ interface GPUPipelineErrorInit {
826
854
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
827
855
  }
828
856
 
857
+ interface GPUTexelCopyBufferLayout {
858
+ bytesPerRow?: GPUSize32;
859
+ offset?: GPUSize64;
860
+ rowsPerImage?: GPUSize32;
861
+ }
862
+
863
+ interface GPUTexelCopyTextureInfo {
864
+ aspect?: GPUTextureAspect;
865
+ mipLevel?: GPUIntegerCoordinate;
866
+ origin?: GPUOrigin3D;
867
+ texture: GPUTexture;
868
+ }
869
+
829
870
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
830
871
  arrayLayerCount?: GPUIntegerCoordinate;
831
872
  aspect?: GPUTextureAspect;
@@ -15222,6 +15263,50 @@ declare var GPUQuerySet: {
15222
15263
  new(): GPUQuerySet;
15223
15264
  };
15224
15265
 
15266
+ /**
15267
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
15268
+ * Available only in secure contexts.
15269
+ *
15270
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
15271
+ */
15272
+ interface GPUQueue extends GPUObjectBase {
15273
+ /**
15274
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
15275
+ *
15276
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
15277
+ */
15278
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
15279
+ /**
15280
+ * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed.
15281
+ *
15282
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
15283
+ */
15284
+ onSubmittedWorkDone(): Promise<void>;
15285
+ /**
15286
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
15287
+ *
15288
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
15289
+ */
15290
+ submit(commandBuffers: GPUCommandBuffer[]): void;
15291
+ /**
15292
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
15293
+ *
15294
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
15295
+ */
15296
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
15297
+ /**
15298
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
15299
+ *
15300
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
15301
+ */
15302
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
15303
+ }
15304
+
15305
+ declare var GPUQueue: {
15306
+ prototype: GPUQueue;
15307
+ new(): GPUQueue;
15308
+ };
15309
+
15225
15310
  /**
15226
15311
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
15227
15312
  * Available only in secure contexts.
@@ -43415,11 +43500,15 @@ type GLuint = number;
43415
43500
  type GLuint64 = number;
43416
43501
  type GPUBufferDynamicOffset = number;
43417
43502
  type GPUColor = number[] | GPUColorDict;
43503
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
43504
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
43418
43505
  type GPUFlagsConstant = number;
43419
43506
  type GPUIndex32 = number;
43420
43507
  type GPUIntegerCoordinate = number;
43421
43508
  type GPUIntegerCoordinateOut = number;
43422
43509
  type GPUMapModeFlags = number;
43510
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
43511
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
43423
43512
  type GPUSignedOffset32 = number;
43424
43513
  type GPUSize32 = number;
43425
43514
  type GPUSize32Out = number;
@@ -43832,6 +43921,27 @@ interface GPUBindingCommandsMixin {
43832
43921
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
43833
43922
  }
43834
43923
 
43924
+ interface GPUQueue {
43925
+ /**
43926
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
43927
+ *
43928
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
43929
+ */
43930
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
43931
+ /**
43932
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
43933
+ *
43934
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
43935
+ */
43936
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
43937
+ /**
43938
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
43939
+ *
43940
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
43941
+ */
43942
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
43943
+ }
43944
+
43835
43945
  interface GPURenderPassEncoder {
43836
43946
  /**
43837
43947
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.327",
3
+ "version": "0.0.328",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -812,10 +812,38 @@ interface GPUColorDict {
812
812
  r: number;
813
813
  }
814
814
 
815
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
816
+ colorSpace?: PredefinedColorSpace;
817
+ premultipliedAlpha?: boolean;
818
+ }
819
+
820
+ interface GPUCopyExternalImageSourceInfo {
821
+ flipY?: boolean;
822
+ origin?: GPUOrigin2D;
823
+ source: GPUCopyExternalImageSource;
824
+ }
825
+
826
+ interface GPUExtent3DDict {
827
+ depthOrArrayLayers?: GPUIntegerCoordinate;
828
+ height?: GPUIntegerCoordinate;
829
+ width: GPUIntegerCoordinate;
830
+ }
831
+
815
832
  interface GPUObjectDescriptorBase {
816
833
  label?: string;
817
834
  }
818
835
 
836
+ interface GPUOrigin2DDict {
837
+ x?: GPUIntegerCoordinate;
838
+ y?: GPUIntegerCoordinate;
839
+ }
840
+
841
+ interface GPUOrigin3DDict {
842
+ x?: GPUIntegerCoordinate;
843
+ y?: GPUIntegerCoordinate;
844
+ z?: GPUIntegerCoordinate;
845
+ }
846
+
819
847
  interface GPUPipelineErrorInit {
820
848
  reason: GPUPipelineErrorReason;
821
849
  }
@@ -823,6 +851,19 @@ interface GPUPipelineErrorInit {
823
851
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
824
852
  }
825
853
 
854
+ interface GPUTexelCopyBufferLayout {
855
+ bytesPerRow?: GPUSize32;
856
+ offset?: GPUSize64;
857
+ rowsPerImage?: GPUSize32;
858
+ }
859
+
860
+ interface GPUTexelCopyTextureInfo {
861
+ aspect?: GPUTextureAspect;
862
+ mipLevel?: GPUIntegerCoordinate;
863
+ origin?: GPUOrigin3D;
864
+ texture: GPUTexture;
865
+ }
866
+
826
867
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
827
868
  arrayLayerCount?: GPUIntegerCoordinate;
828
869
  aspect?: GPUTextureAspect;
@@ -15208,6 +15249,50 @@ declare var GPUQuerySet: {
15208
15249
  new(): GPUQuerySet;
15209
15250
  };
15210
15251
 
15252
+ /**
15253
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
15254
+ * Available only in secure contexts.
15255
+ *
15256
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
15257
+ */
15258
+ interface GPUQueue extends GPUObjectBase {
15259
+ /**
15260
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
15261
+ *
15262
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
15263
+ */
15264
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
15265
+ /**
15266
+ * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed.
15267
+ *
15268
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
15269
+ */
15270
+ onSubmittedWorkDone(): Promise<void>;
15271
+ /**
15272
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
15273
+ *
15274
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
15275
+ */
15276
+ submit(commandBuffers: GPUCommandBuffer[]): void;
15277
+ /**
15278
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
15279
+ *
15280
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
15281
+ */
15282
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
15283
+ /**
15284
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
15285
+ *
15286
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
15287
+ */
15288
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
15289
+ }
15290
+
15291
+ declare var GPUQueue: {
15292
+ prototype: GPUQueue;
15293
+ new(): GPUQueue;
15294
+ };
15295
+
15211
15296
  /**
15212
15297
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
15213
15298
  * Available only in secure contexts.
@@ -43389,11 +43474,15 @@ type GLuint = number;
43389
43474
  type GLuint64 = number;
43390
43475
  type GPUBufferDynamicOffset = number;
43391
43476
  type GPUColor = number[] | GPUColorDict;
43477
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
43478
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
43392
43479
  type GPUFlagsConstant = number;
43393
43480
  type GPUIndex32 = number;
43394
43481
  type GPUIntegerCoordinate = number;
43395
43482
  type GPUIntegerCoordinateOut = number;
43396
43483
  type GPUMapModeFlags = number;
43484
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
43485
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
43397
43486
  type GPUSignedOffset32 = number;
43398
43487
  type GPUSize32 = number;
43399
43488
  type GPUSize32Out = number;
@@ -143,6 +143,27 @@ interface GPUBindingCommandsMixin {
143
143
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
144
144
  }
145
145
 
146
+ interface GPUQueue {
147
+ /**
148
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
149
+ *
150
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
151
+ */
152
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
153
+ /**
154
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
155
+ *
156
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
157
+ */
158
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
159
+ /**
160
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
161
+ *
162
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
163
+ */
164
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
165
+ }
166
+
146
167
  interface GPURenderPassEncoder {
147
168
  /**
148
169
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
package/ts5.6/index.d.ts CHANGED
@@ -812,10 +812,38 @@ interface GPUColorDict {
812
812
  r: number;
813
813
  }
814
814
 
815
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
816
+ colorSpace?: PredefinedColorSpace;
817
+ premultipliedAlpha?: boolean;
818
+ }
819
+
820
+ interface GPUCopyExternalImageSourceInfo {
821
+ flipY?: boolean;
822
+ origin?: GPUOrigin2D;
823
+ source: GPUCopyExternalImageSource;
824
+ }
825
+
826
+ interface GPUExtent3DDict {
827
+ depthOrArrayLayers?: GPUIntegerCoordinate;
828
+ height?: GPUIntegerCoordinate;
829
+ width: GPUIntegerCoordinate;
830
+ }
831
+
815
832
  interface GPUObjectDescriptorBase {
816
833
  label?: string;
817
834
  }
818
835
 
836
+ interface GPUOrigin2DDict {
837
+ x?: GPUIntegerCoordinate;
838
+ y?: GPUIntegerCoordinate;
839
+ }
840
+
841
+ interface GPUOrigin3DDict {
842
+ x?: GPUIntegerCoordinate;
843
+ y?: GPUIntegerCoordinate;
844
+ z?: GPUIntegerCoordinate;
845
+ }
846
+
819
847
  interface GPUPipelineErrorInit {
820
848
  reason: GPUPipelineErrorReason;
821
849
  }
@@ -823,6 +851,19 @@ interface GPUPipelineErrorInit {
823
851
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
824
852
  }
825
853
 
854
+ interface GPUTexelCopyBufferLayout {
855
+ bytesPerRow?: GPUSize32;
856
+ offset?: GPUSize64;
857
+ rowsPerImage?: GPUSize32;
858
+ }
859
+
860
+ interface GPUTexelCopyTextureInfo {
861
+ aspect?: GPUTextureAspect;
862
+ mipLevel?: GPUIntegerCoordinate;
863
+ origin?: GPUOrigin3D;
864
+ texture: GPUTexture;
865
+ }
866
+
826
867
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
827
868
  arrayLayerCount?: GPUIntegerCoordinate;
828
869
  aspect?: GPUTextureAspect;
@@ -15219,6 +15260,50 @@ declare var GPUQuerySet: {
15219
15260
  new(): GPUQuerySet;
15220
15261
  };
15221
15262
 
15263
+ /**
15264
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
15265
+ * Available only in secure contexts.
15266
+ *
15267
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
15268
+ */
15269
+ interface GPUQueue extends GPUObjectBase {
15270
+ /**
15271
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
15272
+ *
15273
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
15274
+ */
15275
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
15276
+ /**
15277
+ * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed.
15278
+ *
15279
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
15280
+ */
15281
+ onSubmittedWorkDone(): Promise<void>;
15282
+ /**
15283
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
15284
+ *
15285
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
15286
+ */
15287
+ submit(commandBuffers: GPUCommandBuffer[]): void;
15288
+ /**
15289
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
15290
+ *
15291
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
15292
+ */
15293
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
15294
+ /**
15295
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
15296
+ *
15297
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
15298
+ */
15299
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
15300
+ }
15301
+
15302
+ declare var GPUQueue: {
15303
+ prototype: GPUQueue;
15304
+ new(): GPUQueue;
15305
+ };
15306
+
15222
15307
  /**
15223
15308
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
15224
15309
  * Available only in secure contexts.
@@ -43412,11 +43497,15 @@ type GLuint = number;
43412
43497
  type GLuint64 = number;
43413
43498
  type GPUBufferDynamicOffset = number;
43414
43499
  type GPUColor = number[] | GPUColorDict;
43500
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
43501
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
43415
43502
  type GPUFlagsConstant = number;
43416
43503
  type GPUIndex32 = number;
43417
43504
  type GPUIntegerCoordinate = number;
43418
43505
  type GPUIntegerCoordinateOut = number;
43419
43506
  type GPUMapModeFlags = number;
43507
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
43508
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
43420
43509
  type GPUSignedOffset32 = number;
43421
43510
  type GPUSize32 = number;
43422
43511
  type GPUSize32Out = number;
@@ -147,6 +147,27 @@ interface GPUBindingCommandsMixin {
147
147
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
148
148
  }
149
149
 
150
+ interface GPUQueue {
151
+ /**
152
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
153
+ *
154
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
155
+ */
156
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
157
+ /**
158
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
159
+ *
160
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
161
+ */
162
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
163
+ /**
164
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
165
+ *
166
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
167
+ */
168
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
169
+ }
170
+
150
171
  interface GPURenderPassEncoder {
151
172
  /**
152
173
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
package/ts5.9/index.d.ts CHANGED
@@ -812,10 +812,38 @@ interface GPUColorDict {
812
812
  r: number;
813
813
  }
814
814
 
815
+ interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
816
+ colorSpace?: PredefinedColorSpace;
817
+ premultipliedAlpha?: boolean;
818
+ }
819
+
820
+ interface GPUCopyExternalImageSourceInfo {
821
+ flipY?: boolean;
822
+ origin?: GPUOrigin2D;
823
+ source: GPUCopyExternalImageSource;
824
+ }
825
+
826
+ interface GPUExtent3DDict {
827
+ depthOrArrayLayers?: GPUIntegerCoordinate;
828
+ height?: GPUIntegerCoordinate;
829
+ width: GPUIntegerCoordinate;
830
+ }
831
+
815
832
  interface GPUObjectDescriptorBase {
816
833
  label?: string;
817
834
  }
818
835
 
836
+ interface GPUOrigin2DDict {
837
+ x?: GPUIntegerCoordinate;
838
+ y?: GPUIntegerCoordinate;
839
+ }
840
+
841
+ interface GPUOrigin3DDict {
842
+ x?: GPUIntegerCoordinate;
843
+ y?: GPUIntegerCoordinate;
844
+ z?: GPUIntegerCoordinate;
845
+ }
846
+
819
847
  interface GPUPipelineErrorInit {
820
848
  reason: GPUPipelineErrorReason;
821
849
  }
@@ -823,6 +851,19 @@ interface GPUPipelineErrorInit {
823
851
  interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
824
852
  }
825
853
 
854
+ interface GPUTexelCopyBufferLayout {
855
+ bytesPerRow?: GPUSize32;
856
+ offset?: GPUSize64;
857
+ rowsPerImage?: GPUSize32;
858
+ }
859
+
860
+ interface GPUTexelCopyTextureInfo {
861
+ aspect?: GPUTextureAspect;
862
+ mipLevel?: GPUIntegerCoordinate;
863
+ origin?: GPUOrigin3D;
864
+ texture: GPUTexture;
865
+ }
866
+
826
867
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
827
868
  arrayLayerCount?: GPUIntegerCoordinate;
828
869
  aspect?: GPUTextureAspect;
@@ -15219,6 +15260,50 @@ declare var GPUQuerySet: {
15219
15260
  new(): GPUQuerySet;
15220
15261
  };
15221
15262
 
15263
+ /**
15264
+ * The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
15265
+ * Available only in secure contexts.
15266
+ *
15267
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
15268
+ */
15269
+ interface GPUQueue extends GPUObjectBase {
15270
+ /**
15271
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
15272
+ *
15273
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
15274
+ */
15275
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
15276
+ /**
15277
+ * The **`onSubmittedWorkDone()`** method of the GPUQueue interface returns a Promise that resolves when all the work submitted to the GPU via this GPUQueue at the point the method is called has been processed.
15278
+ *
15279
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
15280
+ */
15281
+ onSubmittedWorkDone(): Promise<void>;
15282
+ /**
15283
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
15284
+ *
15285
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
15286
+ */
15287
+ submit(commandBuffers: GPUCommandBuffer[]): void;
15288
+ /**
15289
+ * The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
15290
+ *
15291
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
15292
+ */
15293
+ writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
15294
+ /**
15295
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
15296
+ *
15297
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
15298
+ */
15299
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
15300
+ }
15301
+
15302
+ declare var GPUQueue: {
15303
+ prototype: GPUQueue;
15304
+ new(): GPUQueue;
15305
+ };
15306
+
15222
15307
  /**
15223
15308
  * The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
15224
15309
  * Available only in secure contexts.
@@ -43412,11 +43497,15 @@ type GLuint = number;
43412
43497
  type GLuint64 = number;
43413
43498
  type GPUBufferDynamicOffset = number;
43414
43499
  type GPUColor = number[] | GPUColorDict;
43500
+ type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
43501
+ type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
43415
43502
  type GPUFlagsConstant = number;
43416
43503
  type GPUIndex32 = number;
43417
43504
  type GPUIntegerCoordinate = number;
43418
43505
  type GPUIntegerCoordinateOut = number;
43419
43506
  type GPUMapModeFlags = number;
43507
+ type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
43508
+ type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
43420
43509
  type GPUSignedOffset32 = number;
43421
43510
  type GPUSize32 = number;
43422
43511
  type GPUSize32Out = number;
@@ -147,6 +147,27 @@ interface GPUBindingCommandsMixin {
147
147
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
148
148
  }
149
149
 
150
+ interface GPUQueue {
151
+ /**
152
+ * The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
153
+ *
154
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
155
+ */
156
+ copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
157
+ /**
158
+ * The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
159
+ *
160
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
161
+ */
162
+ submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
163
+ /**
164
+ * The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
165
+ *
166
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
167
+ */
168
+ writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
169
+ }
170
+
150
171
  interface GPURenderPassEncoder {
151
172
  /**
152
173
  * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.