@types/web 0.0.327 → 0.0.329
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 +1 -1
- package/index.d.ts +370 -2
- package/package.json +1 -1
- package/ts5.5/index.d.ts +328 -2
- package/ts5.5/iterable.d.ts +42 -0
- package/ts5.6/index.d.ts +328 -2
- package/ts5.6/iterable.d.ts +42 -0
- package/ts5.9/index.d.ts +328 -2
- package/ts5.9/iterable.d.ts +42 -0
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.
|
|
50
|
+
You can read what changed in version 0.0.329 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.329.
|
package/index.d.ts
CHANGED
|
@@ -808,6 +808,20 @@ interface FullscreenOptions {
|
|
|
808
808
|
navigationUI?: FullscreenNavigationUI;
|
|
809
809
|
}
|
|
810
810
|
|
|
811
|
+
interface GPUCanvasConfiguration {
|
|
812
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
813
|
+
colorSpace?: PredefinedColorSpace;
|
|
814
|
+
device: GPUDevice;
|
|
815
|
+
format: GPUTextureFormat;
|
|
816
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
817
|
+
usage?: GPUTextureUsageFlags;
|
|
818
|
+
viewFormats?: GPUTextureFormat[];
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
interface GPUCanvasToneMapping {
|
|
822
|
+
mode?: GPUCanvasToneMappingMode;
|
|
823
|
+
}
|
|
824
|
+
|
|
811
825
|
interface GPUColorDict {
|
|
812
826
|
a: number;
|
|
813
827
|
b: number;
|
|
@@ -815,10 +829,51 @@ interface GPUColorDict {
|
|
|
815
829
|
r: number;
|
|
816
830
|
}
|
|
817
831
|
|
|
832
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
836
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
interface GPUComputePassTimestampWrites {
|
|
840
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
841
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
842
|
+
querySet: GPUQuerySet;
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
846
|
+
colorSpace?: PredefinedColorSpace;
|
|
847
|
+
premultipliedAlpha?: boolean;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
interface GPUCopyExternalImageSourceInfo {
|
|
851
|
+
flipY?: boolean;
|
|
852
|
+
origin?: GPUOrigin2D;
|
|
853
|
+
source: GPUCopyExternalImageSource;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
interface GPUExtent3DDict {
|
|
857
|
+
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
858
|
+
height?: GPUIntegerCoordinate;
|
|
859
|
+
width: GPUIntegerCoordinate;
|
|
860
|
+
}
|
|
861
|
+
|
|
818
862
|
interface GPUObjectDescriptorBase {
|
|
819
863
|
label?: string;
|
|
820
864
|
}
|
|
821
865
|
|
|
866
|
+
interface GPUOrigin2DDict {
|
|
867
|
+
x?: GPUIntegerCoordinate;
|
|
868
|
+
y?: GPUIntegerCoordinate;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
interface GPUOrigin3DDict {
|
|
872
|
+
x?: GPUIntegerCoordinate;
|
|
873
|
+
y?: GPUIntegerCoordinate;
|
|
874
|
+
z?: GPUIntegerCoordinate;
|
|
875
|
+
}
|
|
876
|
+
|
|
822
877
|
interface GPUPipelineErrorInit {
|
|
823
878
|
reason: GPUPipelineErrorReason;
|
|
824
879
|
}
|
|
@@ -826,6 +881,58 @@ interface GPUPipelineErrorInit {
|
|
|
826
881
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
827
882
|
}
|
|
828
883
|
|
|
884
|
+
interface GPURenderPassColorAttachment {
|
|
885
|
+
clearValue?: GPUColor;
|
|
886
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
887
|
+
loadOp: GPULoadOp;
|
|
888
|
+
resolveTarget?: GPUTexture | GPUTextureView;
|
|
889
|
+
storeOp: GPUStoreOp;
|
|
890
|
+
view: GPUTexture | GPUTextureView;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
894
|
+
depthClearValue?: number;
|
|
895
|
+
depthLoadOp?: GPULoadOp;
|
|
896
|
+
depthReadOnly?: boolean;
|
|
897
|
+
depthStoreOp?: GPUStoreOp;
|
|
898
|
+
stencilClearValue?: GPUStencilValue;
|
|
899
|
+
stencilLoadOp?: GPULoadOp;
|
|
900
|
+
stencilReadOnly?: boolean;
|
|
901
|
+
stencilStoreOp?: GPUStoreOp;
|
|
902
|
+
view: GPUTexture | GPUTextureView;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
906
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
907
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
908
|
+
maxDrawCount?: GPUSize64;
|
|
909
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
910
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
interface GPURenderPassTimestampWrites {
|
|
914
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
915
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
916
|
+
querySet: GPUQuerySet;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
920
|
+
buffer: GPUBuffer;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
interface GPUTexelCopyBufferLayout {
|
|
924
|
+
bytesPerRow?: GPUSize32;
|
|
925
|
+
offset?: GPUSize64;
|
|
926
|
+
rowsPerImage?: GPUSize32;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
interface GPUTexelCopyTextureInfo {
|
|
930
|
+
aspect?: GPUTextureAspect;
|
|
931
|
+
mipLevel?: GPUIntegerCoordinate;
|
|
932
|
+
origin?: GPUOrigin3D;
|
|
933
|
+
texture: GPUTexture;
|
|
934
|
+
}
|
|
935
|
+
|
|
829
936
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
830
937
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
831
938
|
aspect?: GPUTextureAspect;
|
|
@@ -14913,6 +15020,50 @@ declare var GPUBuffer: {
|
|
|
14913
15020
|
new(): GPUBuffer;
|
|
14914
15021
|
};
|
|
14915
15022
|
|
|
15023
|
+
/**
|
|
15024
|
+
* The **`GPUCanvasContext`** interface of the WebGPU API represents the WebGPU rendering context of a <canvas> element, returned via an HTMLCanvasElement.getContext() call with a contextType of "webgpu".
|
|
15025
|
+
* Available only in secure contexts.
|
|
15026
|
+
*
|
|
15027
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
15028
|
+
*/
|
|
15029
|
+
interface GPUCanvasContext {
|
|
15030
|
+
/**
|
|
15031
|
+
* The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
|
|
15032
|
+
*
|
|
15033
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
|
|
15034
|
+
*/
|
|
15035
|
+
readonly canvas: HTMLCanvasElement | OffscreenCanvas;
|
|
15036
|
+
/**
|
|
15037
|
+
* The **`configure()`** method of the GPUCanvasContext interface configures the context to use for rendering with a given GPUDevice. When called the canvas will initially be cleared to transparent black.
|
|
15038
|
+
*
|
|
15039
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
|
|
15040
|
+
*/
|
|
15041
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
15042
|
+
/**
|
|
15043
|
+
* The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
|
|
15044
|
+
*
|
|
15045
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
|
|
15046
|
+
*/
|
|
15047
|
+
getConfiguration(): GPUCanvasConfiguration | null;
|
|
15048
|
+
/**
|
|
15049
|
+
* The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
|
|
15050
|
+
*
|
|
15051
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
|
|
15052
|
+
*/
|
|
15053
|
+
getCurrentTexture(): GPUTexture;
|
|
15054
|
+
/**
|
|
15055
|
+
* The **`unconfigure()`** method of the GPUCanvasContext interface removes any previously-set context configuration, and destroys any textures returned via getCurrentTexture() while the canvas context was configured.
|
|
15056
|
+
*
|
|
15057
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
|
|
15058
|
+
*/
|
|
15059
|
+
unconfigure(): void;
|
|
15060
|
+
}
|
|
15061
|
+
|
|
15062
|
+
declare var GPUCanvasContext: {
|
|
15063
|
+
prototype: GPUCanvasContext;
|
|
15064
|
+
new(): GPUCanvasContext;
|
|
15065
|
+
};
|
|
15066
|
+
|
|
14916
15067
|
/**
|
|
14917
15068
|
* The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
|
|
14918
15069
|
* Available only in secure contexts.
|
|
@@ -14927,6 +15078,75 @@ declare var GPUCommandBuffer: {
|
|
|
14927
15078
|
new(): GPUCommandBuffer;
|
|
14928
15079
|
};
|
|
14929
15080
|
|
|
15081
|
+
/**
|
|
15082
|
+
* The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
|
|
15083
|
+
* Available only in secure contexts.
|
|
15084
|
+
*
|
|
15085
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
15086
|
+
*/
|
|
15087
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
15088
|
+
/**
|
|
15089
|
+
* The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
|
|
15090
|
+
*
|
|
15091
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
|
|
15092
|
+
*/
|
|
15093
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
15094
|
+
/**
|
|
15095
|
+
* The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
|
|
15096
|
+
*
|
|
15097
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
|
|
15098
|
+
*/
|
|
15099
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
15100
|
+
/**
|
|
15101
|
+
* The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
|
|
15102
|
+
*
|
|
15103
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
|
|
15104
|
+
*/
|
|
15105
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
15106
|
+
/**
|
|
15107
|
+
* The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
|
|
15108
|
+
*
|
|
15109
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
|
|
15110
|
+
*/
|
|
15111
|
+
copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
|
|
15112
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
|
|
15113
|
+
/**
|
|
15114
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
15115
|
+
*
|
|
15116
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
15117
|
+
*/
|
|
15118
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
15119
|
+
/**
|
|
15120
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
15121
|
+
*
|
|
15122
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
15123
|
+
*/
|
|
15124
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
15125
|
+
/**
|
|
15126
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
15127
|
+
*
|
|
15128
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
15129
|
+
*/
|
|
15130
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
15131
|
+
/**
|
|
15132
|
+
* The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
|
|
15133
|
+
*
|
|
15134
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
|
|
15135
|
+
*/
|
|
15136
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
15137
|
+
/**
|
|
15138
|
+
* The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
|
|
15139
|
+
*
|
|
15140
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
|
|
15141
|
+
*/
|
|
15142
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
15143
|
+
}
|
|
15144
|
+
|
|
15145
|
+
declare var GPUCommandEncoder: {
|
|
15146
|
+
prototype: GPUCommandEncoder;
|
|
15147
|
+
new(): GPUCommandEncoder;
|
|
15148
|
+
};
|
|
15149
|
+
|
|
14930
15150
|
/**
|
|
14931
15151
|
* The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
|
|
14932
15152
|
* Available only in secure contexts.
|
|
@@ -15058,6 +15278,60 @@ interface GPUDebugCommandsMixin {
|
|
|
15058
15278
|
pushDebugGroup(groupLabel: string): void;
|
|
15059
15279
|
}
|
|
15060
15280
|
|
|
15281
|
+
interface GPUDeviceEventMap {
|
|
15282
|
+
"uncapturederror": GPUUncapturedErrorEvent;
|
|
15283
|
+
}
|
|
15284
|
+
|
|
15285
|
+
/**
|
|
15286
|
+
* The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed.
|
|
15287
|
+
* Available only in secure contexts.
|
|
15288
|
+
*
|
|
15289
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
15290
|
+
*/
|
|
15291
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
15292
|
+
/**
|
|
15293
|
+
* The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
|
|
15294
|
+
*
|
|
15295
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
|
|
15296
|
+
*/
|
|
15297
|
+
readonly adapterInfo: GPUAdapterInfo;
|
|
15298
|
+
/**
|
|
15299
|
+
* The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included.
|
|
15300
|
+
*
|
|
15301
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
|
|
15302
|
+
*/
|
|
15303
|
+
readonly features: GPUSupportedFeatures;
|
|
15304
|
+
/**
|
|
15305
|
+
* The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values.
|
|
15306
|
+
*
|
|
15307
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
|
|
15308
|
+
*/
|
|
15309
|
+
readonly limits: GPUSupportedLimits;
|
|
15310
|
+
/**
|
|
15311
|
+
* The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost.
|
|
15312
|
+
*
|
|
15313
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
|
|
15314
|
+
*/
|
|
15315
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
15316
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
|
|
15317
|
+
onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
|
|
15318
|
+
/**
|
|
15319
|
+
* The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
|
|
15320
|
+
*
|
|
15321
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
|
|
15322
|
+
*/
|
|
15323
|
+
readonly queue: GPUQueue;
|
|
15324
|
+
addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
15325
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
15326
|
+
removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
15327
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
15328
|
+
}
|
|
15329
|
+
|
|
15330
|
+
declare var GPUDevice: {
|
|
15331
|
+
prototype: GPUDevice;
|
|
15332
|
+
new(): GPUDevice;
|
|
15333
|
+
};
|
|
15334
|
+
|
|
15061
15335
|
/**
|
|
15062
15336
|
* The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost.
|
|
15063
15337
|
* Available only in secure contexts.
|
|
@@ -15222,6 +15496,50 @@ declare var GPUQuerySet: {
|
|
|
15222
15496
|
new(): GPUQuerySet;
|
|
15223
15497
|
};
|
|
15224
15498
|
|
|
15499
|
+
/**
|
|
15500
|
+
* The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
|
|
15501
|
+
* Available only in secure contexts.
|
|
15502
|
+
*
|
|
15503
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
|
|
15504
|
+
*/
|
|
15505
|
+
interface GPUQueue extends GPUObjectBase {
|
|
15506
|
+
/**
|
|
15507
|
+
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|
|
15508
|
+
*
|
|
15509
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
|
|
15510
|
+
*/
|
|
15511
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
|
|
15512
|
+
/**
|
|
15513
|
+
* 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.
|
|
15514
|
+
*
|
|
15515
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
|
|
15516
|
+
*/
|
|
15517
|
+
onSubmittedWorkDone(): Promise<void>;
|
|
15518
|
+
/**
|
|
15519
|
+
* The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
|
|
15520
|
+
*
|
|
15521
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
|
|
15522
|
+
*/
|
|
15523
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
15524
|
+
/**
|
|
15525
|
+
* The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
|
|
15526
|
+
*
|
|
15527
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
|
|
15528
|
+
*/
|
|
15529
|
+
writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
|
|
15530
|
+
/**
|
|
15531
|
+
* The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
|
|
15532
|
+
*
|
|
15533
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
|
|
15534
|
+
*/
|
|
15535
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
|
|
15536
|
+
}
|
|
15537
|
+
|
|
15538
|
+
declare var GPUQueue: {
|
|
15539
|
+
prototype: GPUQueue;
|
|
15540
|
+
new(): GPUQueue;
|
|
15541
|
+
};
|
|
15542
|
+
|
|
15225
15543
|
/**
|
|
15226
15544
|
* The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
|
|
15227
15545
|
* Available only in secure contexts.
|
|
@@ -43415,11 +43733,15 @@ type GLuint = number;
|
|
|
43415
43733
|
type GLuint64 = number;
|
|
43416
43734
|
type GPUBufferDynamicOffset = number;
|
|
43417
43735
|
type GPUColor = number[] | GPUColorDict;
|
|
43736
|
+
type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
|
|
43737
|
+
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
43418
43738
|
type GPUFlagsConstant = number;
|
|
43419
43739
|
type GPUIndex32 = number;
|
|
43420
43740
|
type GPUIntegerCoordinate = number;
|
|
43421
43741
|
type GPUIntegerCoordinateOut = number;
|
|
43422
43742
|
type GPUMapModeFlags = number;
|
|
43743
|
+
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
43744
|
+
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
43423
43745
|
type GPUSignedOffset32 = number;
|
|
43424
43746
|
type GPUSize32 = number;
|
|
43425
43747
|
type GPUSize32Out = number;
|
|
@@ -43441,7 +43763,7 @@ type MediaProvider = MediaStream | MediaSource | Blob;
|
|
|
43441
43763
|
type MessageEventSource = WindowProxy | MessagePort | ServiceWorker;
|
|
43442
43764
|
type MutationRecordType = "attributes" | "characterData" | "childList";
|
|
43443
43765
|
type NamedCurve = string;
|
|
43444
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
43766
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
43445
43767
|
type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null;
|
|
43446
43768
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
43447
43769
|
type OptionalPostfixToken<T extends string> = ` ${T}` | "";
|
|
@@ -43453,7 +43775,7 @@ type RTCRtpSenderTransform = RTCRtpScriptTransform;
|
|
|
43453
43775
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
|
43454
43776
|
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
|
|
43455
43777
|
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
|
43456
|
-
type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
43778
|
+
type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
43457
43779
|
type ReportList = Report[];
|
|
43458
43780
|
type RequestInfo = Request | string;
|
|
43459
43781
|
type SanitizerAttribute = string | SanitizerAttributeNamespace;
|
|
@@ -43534,11 +43856,15 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
43534
43856
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
43535
43857
|
type FullscreenNavigationUI = "auto" | "hide" | "show";
|
|
43536
43858
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
43859
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
43860
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
43537
43861
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
43538
43862
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
43539
43863
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
43864
|
+
type GPULoadOp = "clear" | "load";
|
|
43540
43865
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
43541
43866
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
43867
|
+
type GPUStoreOp = "discard" | "store";
|
|
43542
43868
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
43543
43869
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
43544
43870
|
type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";
|
|
@@ -43832,6 +44158,48 @@ interface GPUBindingCommandsMixin {
|
|
|
43832
44158
|
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
|
|
43833
44159
|
}
|
|
43834
44160
|
|
|
44161
|
+
interface GPUCommandEncoder {
|
|
44162
|
+
/**
|
|
44163
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
44164
|
+
*
|
|
44165
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
44166
|
+
*/
|
|
44167
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
44168
|
+
/**
|
|
44169
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
44170
|
+
*
|
|
44171
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
44172
|
+
*/
|
|
44173
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
44174
|
+
/**
|
|
44175
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
44176
|
+
*
|
|
44177
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
44178
|
+
*/
|
|
44179
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
44180
|
+
}
|
|
44181
|
+
|
|
44182
|
+
interface GPUQueue {
|
|
44183
|
+
/**
|
|
44184
|
+
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|
|
44185
|
+
*
|
|
44186
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
|
|
44187
|
+
*/
|
|
44188
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
44189
|
+
/**
|
|
44190
|
+
* The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
|
|
44191
|
+
*
|
|
44192
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
|
|
44193
|
+
*/
|
|
44194
|
+
submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
|
|
44195
|
+
/**
|
|
44196
|
+
* The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
|
|
44197
|
+
*
|
|
44198
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
|
|
44199
|
+
*/
|
|
44200
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
|
|
44201
|
+
}
|
|
44202
|
+
|
|
43835
44203
|
interface GPURenderPassEncoder {
|
|
43836
44204
|
/**
|
|
43837
44205
|
* The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
|