@types/web 0.0.328 → 0.0.330
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 +320 -3
- package/package.json +1 -1
- package/ts5.5/index.d.ts +299 -3
- package/ts5.5/iterable.d.ts +21 -0
- package/ts5.6/index.d.ts +299 -3
- package/ts5.6/iterable.d.ts +21 -0
- package/ts5.9/index.d.ts +299 -3
- package/ts5.9/iterable.d.ts +21 -0
package/ts5.5/index.d.ts
CHANGED
|
@@ -805,6 +805,36 @@ interface FullscreenOptions {
|
|
|
805
805
|
navigationUI?: FullscreenNavigationUI;
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
+
interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
|
|
809
|
+
entries: GPUBindGroupEntry[];
|
|
810
|
+
layout: GPUBindGroupLayout;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
interface GPUBindGroupEntry {
|
|
814
|
+
binding: GPUIndex32;
|
|
815
|
+
resource: GPUBindingResource;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
interface GPUBufferBinding {
|
|
819
|
+
buffer: GPUBuffer;
|
|
820
|
+
offset?: GPUSize64;
|
|
821
|
+
size?: GPUSize64;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
interface GPUCanvasConfiguration {
|
|
825
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
826
|
+
colorSpace?: PredefinedColorSpace;
|
|
827
|
+
device: GPUDevice;
|
|
828
|
+
format: GPUTextureFormat;
|
|
829
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
830
|
+
usage?: GPUTextureUsageFlags;
|
|
831
|
+
viewFormats?: GPUTextureFormat[];
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
interface GPUCanvasToneMapping {
|
|
835
|
+
mode?: GPUCanvasToneMappingMode;
|
|
836
|
+
}
|
|
837
|
+
|
|
808
838
|
interface GPUColorDict {
|
|
809
839
|
a: number;
|
|
810
840
|
b: number;
|
|
@@ -812,6 +842,19 @@ interface GPUColorDict {
|
|
|
812
842
|
r: number;
|
|
813
843
|
}
|
|
814
844
|
|
|
845
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
849
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
interface GPUComputePassTimestampWrites {
|
|
853
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
854
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
855
|
+
querySet: GPUQuerySet;
|
|
856
|
+
}
|
|
857
|
+
|
|
815
858
|
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
816
859
|
colorSpace?: PredefinedColorSpace;
|
|
817
860
|
premultipliedAlpha?: boolean;
|
|
@@ -829,6 +872,11 @@ interface GPUExtent3DDict {
|
|
|
829
872
|
width: GPUIntegerCoordinate;
|
|
830
873
|
}
|
|
831
874
|
|
|
875
|
+
interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
876
|
+
colorSpace?: PredefinedColorSpace;
|
|
877
|
+
source: HTMLVideoElement | VideoFrame;
|
|
878
|
+
}
|
|
879
|
+
|
|
832
880
|
interface GPUObjectDescriptorBase {
|
|
833
881
|
label?: string;
|
|
834
882
|
}
|
|
@@ -851,6 +899,45 @@ interface GPUPipelineErrorInit {
|
|
|
851
899
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
852
900
|
}
|
|
853
901
|
|
|
902
|
+
interface GPURenderPassColorAttachment {
|
|
903
|
+
clearValue?: GPUColor;
|
|
904
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
905
|
+
loadOp: GPULoadOp;
|
|
906
|
+
resolveTarget?: GPUTexture | GPUTextureView;
|
|
907
|
+
storeOp: GPUStoreOp;
|
|
908
|
+
view: GPUTexture | GPUTextureView;
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
912
|
+
depthClearValue?: number;
|
|
913
|
+
depthLoadOp?: GPULoadOp;
|
|
914
|
+
depthReadOnly?: boolean;
|
|
915
|
+
depthStoreOp?: GPUStoreOp;
|
|
916
|
+
stencilClearValue?: GPUStencilValue;
|
|
917
|
+
stencilLoadOp?: GPULoadOp;
|
|
918
|
+
stencilReadOnly?: boolean;
|
|
919
|
+
stencilStoreOp?: GPUStoreOp;
|
|
920
|
+
view: GPUTexture | GPUTextureView;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
924
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
925
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
926
|
+
maxDrawCount?: GPUSize64;
|
|
927
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
928
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
interface GPURenderPassTimestampWrites {
|
|
932
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
933
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
934
|
+
querySet: GPUQuerySet;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
938
|
+
buffer: GPUBuffer;
|
|
939
|
+
}
|
|
940
|
+
|
|
854
941
|
interface GPUTexelCopyBufferLayout {
|
|
855
942
|
bytesPerRow?: GPUSize32;
|
|
856
943
|
offset?: GPUSize64;
|
|
@@ -14940,6 +15027,50 @@ declare var GPUBuffer: {
|
|
|
14940
15027
|
new(): GPUBuffer;
|
|
14941
15028
|
};
|
|
14942
15029
|
|
|
15030
|
+
/**
|
|
15031
|
+
* 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".
|
|
15032
|
+
* Available only in secure contexts.
|
|
15033
|
+
*
|
|
15034
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
15035
|
+
*/
|
|
15036
|
+
interface GPUCanvasContext {
|
|
15037
|
+
/**
|
|
15038
|
+
* The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
|
|
15039
|
+
*
|
|
15040
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
|
|
15041
|
+
*/
|
|
15042
|
+
readonly canvas: HTMLCanvasElement | OffscreenCanvas;
|
|
15043
|
+
/**
|
|
15044
|
+
* 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.
|
|
15045
|
+
*
|
|
15046
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
|
|
15047
|
+
*/
|
|
15048
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
15049
|
+
/**
|
|
15050
|
+
* The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
|
|
15051
|
+
*
|
|
15052
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
|
|
15053
|
+
*/
|
|
15054
|
+
getConfiguration(): GPUCanvasConfiguration | null;
|
|
15055
|
+
/**
|
|
15056
|
+
* The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
|
|
15057
|
+
*
|
|
15058
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
|
|
15059
|
+
*/
|
|
15060
|
+
getCurrentTexture(): GPUTexture;
|
|
15061
|
+
/**
|
|
15062
|
+
* 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.
|
|
15063
|
+
*
|
|
15064
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
|
|
15065
|
+
*/
|
|
15066
|
+
unconfigure(): void;
|
|
15067
|
+
}
|
|
15068
|
+
|
|
15069
|
+
declare var GPUCanvasContext: {
|
|
15070
|
+
prototype: GPUCanvasContext;
|
|
15071
|
+
new(): GPUCanvasContext;
|
|
15072
|
+
};
|
|
15073
|
+
|
|
14943
15074
|
/**
|
|
14944
15075
|
* The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
|
|
14945
15076
|
* Available only in secure contexts.
|
|
@@ -14954,6 +15085,75 @@ declare var GPUCommandBuffer: {
|
|
|
14954
15085
|
new(): GPUCommandBuffer;
|
|
14955
15086
|
};
|
|
14956
15087
|
|
|
15088
|
+
/**
|
|
15089
|
+
* The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
|
|
15090
|
+
* Available only in secure contexts.
|
|
15091
|
+
*
|
|
15092
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
15093
|
+
*/
|
|
15094
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
15095
|
+
/**
|
|
15096
|
+
* The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
|
|
15097
|
+
*
|
|
15098
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
|
|
15099
|
+
*/
|
|
15100
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
15101
|
+
/**
|
|
15102
|
+
* The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
|
|
15103
|
+
*
|
|
15104
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
|
|
15105
|
+
*/
|
|
15106
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
15107
|
+
/**
|
|
15108
|
+
* The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
|
|
15109
|
+
*
|
|
15110
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
|
|
15111
|
+
*/
|
|
15112
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
15113
|
+
/**
|
|
15114
|
+
* The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
|
|
15115
|
+
*
|
|
15116
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
|
|
15117
|
+
*/
|
|
15118
|
+
copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
|
|
15119
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
|
|
15120
|
+
/**
|
|
15121
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
15122
|
+
*
|
|
15123
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
15124
|
+
*/
|
|
15125
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
15126
|
+
/**
|
|
15127
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
15128
|
+
*
|
|
15129
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
15130
|
+
*/
|
|
15131
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
15132
|
+
/**
|
|
15133
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
15134
|
+
*
|
|
15135
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
15136
|
+
*/
|
|
15137
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
15138
|
+
/**
|
|
15139
|
+
* The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
|
|
15140
|
+
*
|
|
15141
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
|
|
15142
|
+
*/
|
|
15143
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
15144
|
+
/**
|
|
15145
|
+
* The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
|
|
15146
|
+
*
|
|
15147
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
|
|
15148
|
+
*/
|
|
15149
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
15150
|
+
}
|
|
15151
|
+
|
|
15152
|
+
declare var GPUCommandEncoder: {
|
|
15153
|
+
prototype: GPUCommandEncoder;
|
|
15154
|
+
new(): GPUCommandEncoder;
|
|
15155
|
+
};
|
|
15156
|
+
|
|
14957
15157
|
/**
|
|
14958
15158
|
* 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.
|
|
14959
15159
|
* Available only in secure contexts.
|
|
@@ -15085,6 +15285,90 @@ interface GPUDebugCommandsMixin {
|
|
|
15085
15285
|
pushDebugGroup(groupLabel: string): void;
|
|
15086
15286
|
}
|
|
15087
15287
|
|
|
15288
|
+
interface GPUDeviceEventMap {
|
|
15289
|
+
"uncapturederror": GPUUncapturedErrorEvent;
|
|
15290
|
+
}
|
|
15291
|
+
|
|
15292
|
+
/**
|
|
15293
|
+
* 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.
|
|
15294
|
+
* Available only in secure contexts.
|
|
15295
|
+
*
|
|
15296
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
15297
|
+
*/
|
|
15298
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
15299
|
+
/**
|
|
15300
|
+
* The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
|
|
15301
|
+
*
|
|
15302
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
|
|
15303
|
+
*/
|
|
15304
|
+
readonly adapterInfo: GPUAdapterInfo;
|
|
15305
|
+
/**
|
|
15306
|
+
* 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.
|
|
15307
|
+
*
|
|
15308
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
|
|
15309
|
+
*/
|
|
15310
|
+
readonly features: GPUSupportedFeatures;
|
|
15311
|
+
/**
|
|
15312
|
+
* 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.
|
|
15313
|
+
*
|
|
15314
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
|
|
15315
|
+
*/
|
|
15316
|
+
readonly limits: GPUSupportedLimits;
|
|
15317
|
+
/**
|
|
15318
|
+
* 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.
|
|
15319
|
+
*
|
|
15320
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
|
|
15321
|
+
*/
|
|
15322
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
15323
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
|
|
15324
|
+
onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
|
|
15325
|
+
/**
|
|
15326
|
+
* The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
|
|
15327
|
+
*
|
|
15328
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
|
|
15329
|
+
*/
|
|
15330
|
+
readonly queue: GPUQueue;
|
|
15331
|
+
/**
|
|
15332
|
+
* The **`createBindGroup()`** method of the GPUDevice interface creates a GPUBindGroup based on a GPUBindGroupLayout that defines a set of resources to be bound together in a group and how those resources are used in shader stages.
|
|
15333
|
+
*
|
|
15334
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
|
|
15335
|
+
*/
|
|
15336
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
15337
|
+
/**
|
|
15338
|
+
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
15339
|
+
*
|
|
15340
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy)
|
|
15341
|
+
*/
|
|
15342
|
+
destroy(): void;
|
|
15343
|
+
/**
|
|
15344
|
+
* The **`importExternalTexture()`** method of the GPUDevice interface takes an HTMLVideoElement or a VideoFrame object as an input and returns a GPUExternalTexture wrapper object containing a snapshot of the video that can be used as a frame in GPU rendering operations.
|
|
15345
|
+
*
|
|
15346
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture)
|
|
15347
|
+
*/
|
|
15348
|
+
importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture;
|
|
15349
|
+
/**
|
|
15350
|
+
* The **`popErrorScope()`** method of the GPUDevice interface pops an existing GPU error scope from the error scope stack (originally pushed using GPUDevice.pushErrorScope()) and returns a Promise that resolves to an object describing the first error captured in the scope, or null if no error occurred.
|
|
15351
|
+
*
|
|
15352
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope)
|
|
15353
|
+
*/
|
|
15354
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
15355
|
+
/**
|
|
15356
|
+
* The **`pushErrorScope()`** method of the GPUDevice interface pushes a new GPU error scope onto the device's error scope stack, allowing you to capture errors of a particular type.
|
|
15357
|
+
*
|
|
15358
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope)
|
|
15359
|
+
*/
|
|
15360
|
+
pushErrorScope(filter: GPUErrorFilter): void;
|
|
15361
|
+
addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
15362
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
15363
|
+
removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
15364
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
15365
|
+
}
|
|
15366
|
+
|
|
15367
|
+
declare var GPUDevice: {
|
|
15368
|
+
prototype: GPUDevice;
|
|
15369
|
+
new(): GPUDevice;
|
|
15370
|
+
};
|
|
15371
|
+
|
|
15088
15372
|
/**
|
|
15089
15373
|
* 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.
|
|
15090
15374
|
* Available only in secure contexts.
|
|
@@ -28066,6 +28350,12 @@ declare var PushManager: {
|
|
|
28066
28350
|
readonly supportedContentEncodings: ReadonlyArray<string>;
|
|
28067
28351
|
};
|
|
28068
28352
|
|
|
28353
|
+
/** Available only in secure contexts. */
|
|
28354
|
+
interface PushManagerAttribute {
|
|
28355
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
|
|
28356
|
+
readonly pushManager: PushManager;
|
|
28357
|
+
}
|
|
28358
|
+
|
|
28069
28359
|
/**
|
|
28070
28360
|
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
|
|
28071
28361
|
* Available only in secure contexts.
|
|
@@ -34483,7 +34773,7 @@ interface ServiceWorkerRegistrationEventMap {
|
|
|
34483
34773
|
*
|
|
34484
34774
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
|
|
34485
34775
|
*/
|
|
34486
|
-
interface ServiceWorkerRegistration extends EventTarget {
|
|
34776
|
+
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
|
|
34487
34777
|
/**
|
|
34488
34778
|
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
|
|
34489
34779
|
*
|
|
@@ -43472,6 +43762,7 @@ type GLsizei = number;
|
|
|
43472
43762
|
type GLsizeiptr = number;
|
|
43473
43763
|
type GLuint = number;
|
|
43474
43764
|
type GLuint64 = number;
|
|
43765
|
+
type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
|
|
43475
43766
|
type GPUBufferDynamicOffset = number;
|
|
43476
43767
|
type GPUColor = number[] | GPUColorDict;
|
|
43477
43768
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
|
|
@@ -43504,7 +43795,7 @@ type MediaProvider = MediaStream | MediaSource | Blob;
|
|
|
43504
43795
|
type MessageEventSource = WindowProxy | MessagePort | ServiceWorker;
|
|
43505
43796
|
type MutationRecordType = "attributes" | "characterData" | "childList";
|
|
43506
43797
|
type NamedCurve = string;
|
|
43507
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
43798
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
43508
43799
|
type OnBeforeUnloadEventHandler = OnBeforeUnloadEventHandlerNonNull | null;
|
|
43509
43800
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
43510
43801
|
type OptionalPostfixToken<T extends string> = ` ${T}` | "";
|
|
@@ -43516,7 +43807,7 @@ type RTCRtpSenderTransform = RTCRtpScriptTransform;
|
|
|
43516
43807
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
|
43517
43808
|
type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
|
|
43518
43809
|
type ReadableStreamReader<T> = ReadableStreamDefaultReader<T> | ReadableStreamBYOBReader;
|
|
43519
|
-
type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
43810
|
+
type RenderingContext = CanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
43520
43811
|
type ReportList = Report[];
|
|
43521
43812
|
type RequestInfo = Request | string;
|
|
43522
43813
|
type SanitizerAttribute = string | SanitizerAttributeNamespace;
|
|
@@ -43597,11 +43888,16 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
43597
43888
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
43598
43889
|
type FullscreenNavigationUI = "auto" | "hide" | "show";
|
|
43599
43890
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
43891
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
43892
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
43600
43893
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
43601
43894
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
43895
|
+
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
43602
43896
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
43897
|
+
type GPULoadOp = "clear" | "load";
|
|
43603
43898
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
43604
43899
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
43900
|
+
type GPUStoreOp = "discard" | "store";
|
|
43605
43901
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
43606
43902
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
43607
43903
|
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";
|
package/ts5.5/iterable.d.ts
CHANGED
|
@@ -143,6 +143,27 @@ interface GPUBindingCommandsMixin {
|
|
|
143
143
|
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
+
interface GPUCommandEncoder {
|
|
147
|
+
/**
|
|
148
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
149
|
+
*
|
|
150
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
151
|
+
*/
|
|
152
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
153
|
+
/**
|
|
154
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
155
|
+
*
|
|
156
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
157
|
+
*/
|
|
158
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
159
|
+
/**
|
|
160
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
161
|
+
*
|
|
162
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
163
|
+
*/
|
|
164
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
165
|
+
}
|
|
166
|
+
|
|
146
167
|
interface GPUQueue {
|
|
147
168
|
/**
|
|
148
169
|
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|