@types/sharedworker 0.0.212 → 0.0.214
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 +369 -1
- package/package.json +1 -1
- package/ts5.5/index.d.ts +327 -1
- package/ts5.5/iterable.d.ts +42 -0
- package/ts5.6/index.d.ts +327 -1
- package/ts5.6/iterable.d.ts +42 -0
- package/ts5.9/index.d.ts +327 -1
- package/ts5.9/iterable.d.ts +42 -0
package/ts5.6/index.d.ts
CHANGED
|
@@ -216,6 +216,20 @@ interface FontFaceSetLoadEventInit extends EventInit {
|
|
|
216
216
|
fontfaces?: FontFace[];
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
interface GPUCanvasConfiguration {
|
|
220
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
221
|
+
colorSpace?: PredefinedColorSpace;
|
|
222
|
+
device: GPUDevice;
|
|
223
|
+
format: GPUTextureFormat;
|
|
224
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
225
|
+
usage?: GPUTextureUsageFlags;
|
|
226
|
+
viewFormats?: GPUTextureFormat[];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
interface GPUCanvasToneMapping {
|
|
230
|
+
mode?: GPUCanvasToneMappingMode;
|
|
231
|
+
}
|
|
232
|
+
|
|
219
233
|
interface GPUColorDict {
|
|
220
234
|
a: number;
|
|
221
235
|
b: number;
|
|
@@ -223,10 +237,51 @@ interface GPUColorDict {
|
|
|
223
237
|
r: number;
|
|
224
238
|
}
|
|
225
239
|
|
|
240
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
244
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
interface GPUComputePassTimestampWrites {
|
|
248
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
249
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
250
|
+
querySet: GPUQuerySet;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
254
|
+
colorSpace?: PredefinedColorSpace;
|
|
255
|
+
premultipliedAlpha?: boolean;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
interface GPUCopyExternalImageSourceInfo {
|
|
259
|
+
flipY?: boolean;
|
|
260
|
+
origin?: GPUOrigin2D;
|
|
261
|
+
source: GPUCopyExternalImageSource;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
interface GPUExtent3DDict {
|
|
265
|
+
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
266
|
+
height?: GPUIntegerCoordinate;
|
|
267
|
+
width: GPUIntegerCoordinate;
|
|
268
|
+
}
|
|
269
|
+
|
|
226
270
|
interface GPUObjectDescriptorBase {
|
|
227
271
|
label?: string;
|
|
228
272
|
}
|
|
229
273
|
|
|
274
|
+
interface GPUOrigin2DDict {
|
|
275
|
+
x?: GPUIntegerCoordinate;
|
|
276
|
+
y?: GPUIntegerCoordinate;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
interface GPUOrigin3DDict {
|
|
280
|
+
x?: GPUIntegerCoordinate;
|
|
281
|
+
y?: GPUIntegerCoordinate;
|
|
282
|
+
z?: GPUIntegerCoordinate;
|
|
283
|
+
}
|
|
284
|
+
|
|
230
285
|
interface GPUPipelineErrorInit {
|
|
231
286
|
reason: GPUPipelineErrorReason;
|
|
232
287
|
}
|
|
@@ -234,6 +289,58 @@ interface GPUPipelineErrorInit {
|
|
|
234
289
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
235
290
|
}
|
|
236
291
|
|
|
292
|
+
interface GPURenderPassColorAttachment {
|
|
293
|
+
clearValue?: GPUColor;
|
|
294
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
295
|
+
loadOp: GPULoadOp;
|
|
296
|
+
resolveTarget?: GPUTexture | GPUTextureView;
|
|
297
|
+
storeOp: GPUStoreOp;
|
|
298
|
+
view: GPUTexture | GPUTextureView;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
302
|
+
depthClearValue?: number;
|
|
303
|
+
depthLoadOp?: GPULoadOp;
|
|
304
|
+
depthReadOnly?: boolean;
|
|
305
|
+
depthStoreOp?: GPUStoreOp;
|
|
306
|
+
stencilClearValue?: GPUStencilValue;
|
|
307
|
+
stencilLoadOp?: GPULoadOp;
|
|
308
|
+
stencilReadOnly?: boolean;
|
|
309
|
+
stencilStoreOp?: GPUStoreOp;
|
|
310
|
+
view: GPUTexture | GPUTextureView;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
314
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
315
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
316
|
+
maxDrawCount?: GPUSize64;
|
|
317
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
318
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
interface GPURenderPassTimestampWrites {
|
|
322
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
323
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
324
|
+
querySet: GPUQuerySet;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
328
|
+
buffer: GPUBuffer;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
interface GPUTexelCopyBufferLayout {
|
|
332
|
+
bytesPerRow?: GPUSize32;
|
|
333
|
+
offset?: GPUSize64;
|
|
334
|
+
rowsPerImage?: GPUSize32;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
interface GPUTexelCopyTextureInfo {
|
|
338
|
+
aspect?: GPUTextureAspect;
|
|
339
|
+
mipLevel?: GPUIntegerCoordinate;
|
|
340
|
+
origin?: GPUOrigin3D;
|
|
341
|
+
texture: GPUTexture;
|
|
342
|
+
}
|
|
343
|
+
|
|
237
344
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
238
345
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
239
346
|
aspect?: GPUTextureAspect;
|
|
@@ -4036,6 +4143,50 @@ declare var GPUBuffer: {
|
|
|
4036
4143
|
new(): GPUBuffer;
|
|
4037
4144
|
};
|
|
4038
4145
|
|
|
4146
|
+
/**
|
|
4147
|
+
* 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".
|
|
4148
|
+
* Available only in secure contexts.
|
|
4149
|
+
*
|
|
4150
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
4151
|
+
*/
|
|
4152
|
+
interface GPUCanvasContext {
|
|
4153
|
+
/**
|
|
4154
|
+
* The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
|
|
4155
|
+
*
|
|
4156
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
|
|
4157
|
+
*/
|
|
4158
|
+
readonly canvas: OffscreenCanvas;
|
|
4159
|
+
/**
|
|
4160
|
+
* 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.
|
|
4161
|
+
*
|
|
4162
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
|
|
4163
|
+
*/
|
|
4164
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
4165
|
+
/**
|
|
4166
|
+
* The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
|
|
4167
|
+
*
|
|
4168
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
|
|
4169
|
+
*/
|
|
4170
|
+
getConfiguration(): GPUCanvasConfiguration | null;
|
|
4171
|
+
/**
|
|
4172
|
+
* The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
|
|
4173
|
+
*
|
|
4174
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
|
|
4175
|
+
*/
|
|
4176
|
+
getCurrentTexture(): GPUTexture;
|
|
4177
|
+
/**
|
|
4178
|
+
* 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.
|
|
4179
|
+
*
|
|
4180
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
|
|
4181
|
+
*/
|
|
4182
|
+
unconfigure(): void;
|
|
4183
|
+
}
|
|
4184
|
+
|
|
4185
|
+
declare var GPUCanvasContext: {
|
|
4186
|
+
prototype: GPUCanvasContext;
|
|
4187
|
+
new(): GPUCanvasContext;
|
|
4188
|
+
};
|
|
4189
|
+
|
|
4039
4190
|
/**
|
|
4040
4191
|
* The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
|
|
4041
4192
|
* Available only in secure contexts.
|
|
@@ -4050,6 +4201,75 @@ declare var GPUCommandBuffer: {
|
|
|
4050
4201
|
new(): GPUCommandBuffer;
|
|
4051
4202
|
};
|
|
4052
4203
|
|
|
4204
|
+
/**
|
|
4205
|
+
* The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
|
|
4206
|
+
* Available only in secure contexts.
|
|
4207
|
+
*
|
|
4208
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
4209
|
+
*/
|
|
4210
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
4211
|
+
/**
|
|
4212
|
+
* The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
|
|
4213
|
+
*
|
|
4214
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
|
|
4215
|
+
*/
|
|
4216
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
4217
|
+
/**
|
|
4218
|
+
* The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
|
|
4219
|
+
*
|
|
4220
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
|
|
4221
|
+
*/
|
|
4222
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
4223
|
+
/**
|
|
4224
|
+
* The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
|
|
4225
|
+
*
|
|
4226
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
|
|
4227
|
+
*/
|
|
4228
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
4229
|
+
/**
|
|
4230
|
+
* The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
|
|
4231
|
+
*
|
|
4232
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
|
|
4233
|
+
*/
|
|
4234
|
+
copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
|
|
4235
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
|
|
4236
|
+
/**
|
|
4237
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
4238
|
+
*
|
|
4239
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
4240
|
+
*/
|
|
4241
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4242
|
+
/**
|
|
4243
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
4244
|
+
*
|
|
4245
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
4246
|
+
*/
|
|
4247
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
4248
|
+
/**
|
|
4249
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
4250
|
+
*
|
|
4251
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
4252
|
+
*/
|
|
4253
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4254
|
+
/**
|
|
4255
|
+
* The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
|
|
4256
|
+
*
|
|
4257
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
|
|
4258
|
+
*/
|
|
4259
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
4260
|
+
/**
|
|
4261
|
+
* The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
|
|
4262
|
+
*
|
|
4263
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
|
|
4264
|
+
*/
|
|
4265
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
4266
|
+
}
|
|
4267
|
+
|
|
4268
|
+
declare var GPUCommandEncoder: {
|
|
4269
|
+
prototype: GPUCommandEncoder;
|
|
4270
|
+
new(): GPUCommandEncoder;
|
|
4271
|
+
};
|
|
4272
|
+
|
|
4053
4273
|
/**
|
|
4054
4274
|
* 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.
|
|
4055
4275
|
* Available only in secure contexts.
|
|
@@ -4181,6 +4401,60 @@ interface GPUDebugCommandsMixin {
|
|
|
4181
4401
|
pushDebugGroup(groupLabel: string): void;
|
|
4182
4402
|
}
|
|
4183
4403
|
|
|
4404
|
+
interface GPUDeviceEventMap {
|
|
4405
|
+
"uncapturederror": GPUUncapturedErrorEvent;
|
|
4406
|
+
}
|
|
4407
|
+
|
|
4408
|
+
/**
|
|
4409
|
+
* 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.
|
|
4410
|
+
* Available only in secure contexts.
|
|
4411
|
+
*
|
|
4412
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
4413
|
+
*/
|
|
4414
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
4415
|
+
/**
|
|
4416
|
+
* The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
|
|
4417
|
+
*
|
|
4418
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
|
|
4419
|
+
*/
|
|
4420
|
+
readonly adapterInfo: GPUAdapterInfo;
|
|
4421
|
+
/**
|
|
4422
|
+
* 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.
|
|
4423
|
+
*
|
|
4424
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
|
|
4425
|
+
*/
|
|
4426
|
+
readonly features: GPUSupportedFeatures;
|
|
4427
|
+
/**
|
|
4428
|
+
* 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.
|
|
4429
|
+
*
|
|
4430
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
|
|
4431
|
+
*/
|
|
4432
|
+
readonly limits: GPUSupportedLimits;
|
|
4433
|
+
/**
|
|
4434
|
+
* 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.
|
|
4435
|
+
*
|
|
4436
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
|
|
4437
|
+
*/
|
|
4438
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
4439
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
|
|
4440
|
+
onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
|
|
4441
|
+
/**
|
|
4442
|
+
* The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
|
|
4443
|
+
*
|
|
4444
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
|
|
4445
|
+
*/
|
|
4446
|
+
readonly queue: GPUQueue;
|
|
4447
|
+
addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4448
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
4449
|
+
removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
4450
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
4451
|
+
}
|
|
4452
|
+
|
|
4453
|
+
declare var GPUDevice: {
|
|
4454
|
+
prototype: GPUDevice;
|
|
4455
|
+
new(): GPUDevice;
|
|
4456
|
+
};
|
|
4457
|
+
|
|
4184
4458
|
/**
|
|
4185
4459
|
* 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.
|
|
4186
4460
|
* Available only in secure contexts.
|
|
@@ -4345,6 +4619,50 @@ declare var GPUQuerySet: {
|
|
|
4345
4619
|
new(): GPUQuerySet;
|
|
4346
4620
|
};
|
|
4347
4621
|
|
|
4622
|
+
/**
|
|
4623
|
+
* The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
|
|
4624
|
+
* Available only in secure contexts.
|
|
4625
|
+
*
|
|
4626
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
|
|
4627
|
+
*/
|
|
4628
|
+
interface GPUQueue extends GPUObjectBase {
|
|
4629
|
+
/**
|
|
4630
|
+
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|
|
4631
|
+
*
|
|
4632
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
|
|
4633
|
+
*/
|
|
4634
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
|
|
4635
|
+
/**
|
|
4636
|
+
* 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.
|
|
4637
|
+
*
|
|
4638
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
|
|
4639
|
+
*/
|
|
4640
|
+
onSubmittedWorkDone(): Promise<void>;
|
|
4641
|
+
/**
|
|
4642
|
+
* The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
|
|
4643
|
+
*
|
|
4644
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
|
|
4645
|
+
*/
|
|
4646
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
4647
|
+
/**
|
|
4648
|
+
* The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
|
|
4649
|
+
*
|
|
4650
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
|
|
4651
|
+
*/
|
|
4652
|
+
writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
|
|
4653
|
+
/**
|
|
4654
|
+
* The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
|
|
4655
|
+
*
|
|
4656
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
|
|
4657
|
+
*/
|
|
4658
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
|
|
4659
|
+
}
|
|
4660
|
+
|
|
4661
|
+
declare var GPUQueue: {
|
|
4662
|
+
prototype: GPUQueue;
|
|
4663
|
+
new(): GPUQueue;
|
|
4664
|
+
};
|
|
4665
|
+
|
|
4348
4666
|
/**
|
|
4349
4667
|
* The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
|
|
4350
4668
|
* Available only in secure contexts.
|
|
@@ -12279,11 +12597,15 @@ type GLuint = number;
|
|
|
12279
12597
|
type GLuint64 = number;
|
|
12280
12598
|
type GPUBufferDynamicOffset = number;
|
|
12281
12599
|
type GPUColor = number[] | GPUColorDict;
|
|
12600
|
+
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12601
|
+
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
12282
12602
|
type GPUFlagsConstant = number;
|
|
12283
12603
|
type GPUIndex32 = number;
|
|
12284
12604
|
type GPUIntegerCoordinate = number;
|
|
12285
12605
|
type GPUIntegerCoordinateOut = number;
|
|
12286
12606
|
type GPUMapModeFlags = number;
|
|
12607
|
+
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12608
|
+
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
12287
12609
|
type GPUSignedOffset32 = number;
|
|
12288
12610
|
type GPUSize32 = number;
|
|
12289
12611
|
type GPUSize32Out = number;
|
|
@@ -12299,7 +12621,7 @@ type ImageDataArray = Uint8ClampedArray;
|
|
|
12299
12621
|
type Int32List = Int32Array | GLint[];
|
|
12300
12622
|
type MessageEventSource = MessagePort | ServiceWorker;
|
|
12301
12623
|
type NamedCurve = string;
|
|
12302
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
12624
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
12303
12625
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
12304
12626
|
type PerformanceEntryList = PerformanceEntry[];
|
|
12305
12627
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
|
@@ -12336,11 +12658,15 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
|
|
|
12336
12658
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
12337
12659
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12338
12660
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
12661
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
12662
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12339
12663
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12340
12664
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
12341
12665
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
12666
|
+
type GPULoadOp = "clear" | "load";
|
|
12342
12667
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12343
12668
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
12669
|
+
type GPUStoreOp = "discard" | "store";
|
|
12344
12670
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12345
12671
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12346
12672
|
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.6/iterable.d.ts
CHANGED
|
@@ -72,6 +72,48 @@ interface GPUBindingCommandsMixin {
|
|
|
72
72
|
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
interface GPUCommandEncoder {
|
|
76
|
+
/**
|
|
77
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
78
|
+
*
|
|
79
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
80
|
+
*/
|
|
81
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
82
|
+
/**
|
|
83
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
84
|
+
*
|
|
85
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
86
|
+
*/
|
|
87
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
88
|
+
/**
|
|
89
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
90
|
+
*
|
|
91
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
92
|
+
*/
|
|
93
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
interface GPUQueue {
|
|
97
|
+
/**
|
|
98
|
+
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|
|
99
|
+
*
|
|
100
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
|
|
101
|
+
*/
|
|
102
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
103
|
+
/**
|
|
104
|
+
* The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
|
|
105
|
+
*
|
|
106
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
|
|
107
|
+
*/
|
|
108
|
+
submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
|
|
109
|
+
/**
|
|
110
|
+
* The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
|
|
111
|
+
*
|
|
112
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
|
|
113
|
+
*/
|
|
114
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
|
|
115
|
+
}
|
|
116
|
+
|
|
75
117
|
interface GPURenderPassEncoder {
|
|
76
118
|
/**
|
|
77
119
|
* The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
|