@types/serviceworker 0.0.183 → 0.0.185
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/README.md
CHANGED
|
@@ -28,4 +28,4 @@ This project does not respect semantic versioning as almost every change could p
|
|
|
28
28
|
|
|
29
29
|
## Deploy Metadata
|
|
30
30
|
|
|
31
|
-
You can read what changed in version 0.0.
|
|
31
|
+
You can read what changed in version 0.0.185 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.185.
|
package/index.d.ts
CHANGED
|
@@ -275,6 +275,20 @@ interface FontFaceSetLoadEventInit extends EventInit {
|
|
|
275
275
|
fontfaces?: FontFace[];
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
interface GPUCanvasConfiguration {
|
|
279
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
280
|
+
colorSpace?: PredefinedColorSpace;
|
|
281
|
+
device: GPUDevice;
|
|
282
|
+
format: GPUTextureFormat;
|
|
283
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
284
|
+
usage?: GPUTextureUsageFlags;
|
|
285
|
+
viewFormats?: GPUTextureFormat[];
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
interface GPUCanvasToneMapping {
|
|
289
|
+
mode?: GPUCanvasToneMappingMode;
|
|
290
|
+
}
|
|
291
|
+
|
|
278
292
|
interface GPUColorDict {
|
|
279
293
|
a: number;
|
|
280
294
|
b: number;
|
|
@@ -282,10 +296,51 @@ interface GPUColorDict {
|
|
|
282
296
|
r: number;
|
|
283
297
|
}
|
|
284
298
|
|
|
299
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
303
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
interface GPUComputePassTimestampWrites {
|
|
307
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
308
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
309
|
+
querySet: GPUQuerySet;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
313
|
+
colorSpace?: PredefinedColorSpace;
|
|
314
|
+
premultipliedAlpha?: boolean;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
interface GPUCopyExternalImageSourceInfo {
|
|
318
|
+
flipY?: boolean;
|
|
319
|
+
origin?: GPUOrigin2D;
|
|
320
|
+
source: GPUCopyExternalImageSource;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
interface GPUExtent3DDict {
|
|
324
|
+
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
325
|
+
height?: GPUIntegerCoordinate;
|
|
326
|
+
width: GPUIntegerCoordinate;
|
|
327
|
+
}
|
|
328
|
+
|
|
285
329
|
interface GPUObjectDescriptorBase {
|
|
286
330
|
label?: string;
|
|
287
331
|
}
|
|
288
332
|
|
|
333
|
+
interface GPUOrigin2DDict {
|
|
334
|
+
x?: GPUIntegerCoordinate;
|
|
335
|
+
y?: GPUIntegerCoordinate;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
interface GPUOrigin3DDict {
|
|
339
|
+
x?: GPUIntegerCoordinate;
|
|
340
|
+
y?: GPUIntegerCoordinate;
|
|
341
|
+
z?: GPUIntegerCoordinate;
|
|
342
|
+
}
|
|
343
|
+
|
|
289
344
|
interface GPUPipelineErrorInit {
|
|
290
345
|
reason: GPUPipelineErrorReason;
|
|
291
346
|
}
|
|
@@ -293,6 +348,58 @@ interface GPUPipelineErrorInit {
|
|
|
293
348
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
294
349
|
}
|
|
295
350
|
|
|
351
|
+
interface GPURenderPassColorAttachment {
|
|
352
|
+
clearValue?: GPUColor;
|
|
353
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
354
|
+
loadOp: GPULoadOp;
|
|
355
|
+
resolveTarget?: GPUTexture | GPUTextureView;
|
|
356
|
+
storeOp: GPUStoreOp;
|
|
357
|
+
view: GPUTexture | GPUTextureView;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
361
|
+
depthClearValue?: number;
|
|
362
|
+
depthLoadOp?: GPULoadOp;
|
|
363
|
+
depthReadOnly?: boolean;
|
|
364
|
+
depthStoreOp?: GPUStoreOp;
|
|
365
|
+
stencilClearValue?: GPUStencilValue;
|
|
366
|
+
stencilLoadOp?: GPULoadOp;
|
|
367
|
+
stencilReadOnly?: boolean;
|
|
368
|
+
stencilStoreOp?: GPUStoreOp;
|
|
369
|
+
view: GPUTexture | GPUTextureView;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
373
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
374
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
375
|
+
maxDrawCount?: GPUSize64;
|
|
376
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
377
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
interface GPURenderPassTimestampWrites {
|
|
381
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
382
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
383
|
+
querySet: GPUQuerySet;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
387
|
+
buffer: GPUBuffer;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
interface GPUTexelCopyBufferLayout {
|
|
391
|
+
bytesPerRow?: GPUSize32;
|
|
392
|
+
offset?: GPUSize64;
|
|
393
|
+
rowsPerImage?: GPUSize32;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
interface GPUTexelCopyTextureInfo {
|
|
397
|
+
aspect?: GPUTextureAspect;
|
|
398
|
+
mipLevel?: GPUIntegerCoordinate;
|
|
399
|
+
origin?: GPUOrigin3D;
|
|
400
|
+
texture: GPUTexture;
|
|
401
|
+
}
|
|
402
|
+
|
|
296
403
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
297
404
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
298
405
|
aspect?: GPUTextureAspect;
|
|
@@ -4356,6 +4463,50 @@ declare var GPUBuffer: {
|
|
|
4356
4463
|
new(): GPUBuffer;
|
|
4357
4464
|
};
|
|
4358
4465
|
|
|
4466
|
+
/**
|
|
4467
|
+
* 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".
|
|
4468
|
+
* Available only in secure contexts.
|
|
4469
|
+
*
|
|
4470
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
4471
|
+
*/
|
|
4472
|
+
interface GPUCanvasContext {
|
|
4473
|
+
/**
|
|
4474
|
+
* The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
|
|
4475
|
+
*
|
|
4476
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
|
|
4477
|
+
*/
|
|
4478
|
+
readonly canvas: OffscreenCanvas;
|
|
4479
|
+
/**
|
|
4480
|
+
* 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.
|
|
4481
|
+
*
|
|
4482
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
|
|
4483
|
+
*/
|
|
4484
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
4485
|
+
/**
|
|
4486
|
+
* The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
|
|
4487
|
+
*
|
|
4488
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
|
|
4489
|
+
*/
|
|
4490
|
+
getConfiguration(): GPUCanvasConfiguration | null;
|
|
4491
|
+
/**
|
|
4492
|
+
* The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
|
|
4493
|
+
*
|
|
4494
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
|
|
4495
|
+
*/
|
|
4496
|
+
getCurrentTexture(): GPUTexture;
|
|
4497
|
+
/**
|
|
4498
|
+
* 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.
|
|
4499
|
+
*
|
|
4500
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
|
|
4501
|
+
*/
|
|
4502
|
+
unconfigure(): void;
|
|
4503
|
+
}
|
|
4504
|
+
|
|
4505
|
+
declare var GPUCanvasContext: {
|
|
4506
|
+
prototype: GPUCanvasContext;
|
|
4507
|
+
new(): GPUCanvasContext;
|
|
4508
|
+
};
|
|
4509
|
+
|
|
4359
4510
|
/**
|
|
4360
4511
|
* The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
|
|
4361
4512
|
* Available only in secure contexts.
|
|
@@ -4370,6 +4521,75 @@ declare var GPUCommandBuffer: {
|
|
|
4370
4521
|
new(): GPUCommandBuffer;
|
|
4371
4522
|
};
|
|
4372
4523
|
|
|
4524
|
+
/**
|
|
4525
|
+
* The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
|
|
4526
|
+
* Available only in secure contexts.
|
|
4527
|
+
*
|
|
4528
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
4529
|
+
*/
|
|
4530
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
4531
|
+
/**
|
|
4532
|
+
* The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
|
|
4533
|
+
*
|
|
4534
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
|
|
4535
|
+
*/
|
|
4536
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
4537
|
+
/**
|
|
4538
|
+
* The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
|
|
4539
|
+
*
|
|
4540
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
|
|
4541
|
+
*/
|
|
4542
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
4543
|
+
/**
|
|
4544
|
+
* The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
|
|
4545
|
+
*
|
|
4546
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
|
|
4547
|
+
*/
|
|
4548
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
4549
|
+
/**
|
|
4550
|
+
* The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
|
|
4551
|
+
*
|
|
4552
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
|
|
4553
|
+
*/
|
|
4554
|
+
copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
|
|
4555
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
|
|
4556
|
+
/**
|
|
4557
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
4558
|
+
*
|
|
4559
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
4560
|
+
*/
|
|
4561
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4562
|
+
/**
|
|
4563
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
4564
|
+
*
|
|
4565
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
4566
|
+
*/
|
|
4567
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
4568
|
+
/**
|
|
4569
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
4570
|
+
*
|
|
4571
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
4572
|
+
*/
|
|
4573
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4574
|
+
/**
|
|
4575
|
+
* The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
|
|
4576
|
+
*
|
|
4577
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
|
|
4578
|
+
*/
|
|
4579
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
4580
|
+
/**
|
|
4581
|
+
* The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
|
|
4582
|
+
*
|
|
4583
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
|
|
4584
|
+
*/
|
|
4585
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
4586
|
+
}
|
|
4587
|
+
|
|
4588
|
+
declare var GPUCommandEncoder: {
|
|
4589
|
+
prototype: GPUCommandEncoder;
|
|
4590
|
+
new(): GPUCommandEncoder;
|
|
4591
|
+
};
|
|
4592
|
+
|
|
4373
4593
|
/**
|
|
4374
4594
|
* 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.
|
|
4375
4595
|
* Available only in secure contexts.
|
|
@@ -4501,6 +4721,60 @@ interface GPUDebugCommandsMixin {
|
|
|
4501
4721
|
pushDebugGroup(groupLabel: string): void;
|
|
4502
4722
|
}
|
|
4503
4723
|
|
|
4724
|
+
interface GPUDeviceEventMap {
|
|
4725
|
+
"uncapturederror": GPUUncapturedErrorEvent;
|
|
4726
|
+
}
|
|
4727
|
+
|
|
4728
|
+
/**
|
|
4729
|
+
* 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.
|
|
4730
|
+
* Available only in secure contexts.
|
|
4731
|
+
*
|
|
4732
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
4733
|
+
*/
|
|
4734
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
4735
|
+
/**
|
|
4736
|
+
* The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
|
|
4737
|
+
*
|
|
4738
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
|
|
4739
|
+
*/
|
|
4740
|
+
readonly adapterInfo: GPUAdapterInfo;
|
|
4741
|
+
/**
|
|
4742
|
+
* 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.
|
|
4743
|
+
*
|
|
4744
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
|
|
4745
|
+
*/
|
|
4746
|
+
readonly features: GPUSupportedFeatures;
|
|
4747
|
+
/**
|
|
4748
|
+
* 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.
|
|
4749
|
+
*
|
|
4750
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
|
|
4751
|
+
*/
|
|
4752
|
+
readonly limits: GPUSupportedLimits;
|
|
4753
|
+
/**
|
|
4754
|
+
* 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.
|
|
4755
|
+
*
|
|
4756
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
|
|
4757
|
+
*/
|
|
4758
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
4759
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
|
|
4760
|
+
onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
|
|
4761
|
+
/**
|
|
4762
|
+
* The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
|
|
4763
|
+
*
|
|
4764
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
|
|
4765
|
+
*/
|
|
4766
|
+
readonly queue: GPUQueue;
|
|
4767
|
+
addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4768
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
4769
|
+
removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
4770
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
4771
|
+
}
|
|
4772
|
+
|
|
4773
|
+
declare var GPUDevice: {
|
|
4774
|
+
prototype: GPUDevice;
|
|
4775
|
+
new(): GPUDevice;
|
|
4776
|
+
};
|
|
4777
|
+
|
|
4504
4778
|
/**
|
|
4505
4779
|
* 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.
|
|
4506
4780
|
* Available only in secure contexts.
|
|
@@ -4665,6 +4939,50 @@ declare var GPUQuerySet: {
|
|
|
4665
4939
|
new(): GPUQuerySet;
|
|
4666
4940
|
};
|
|
4667
4941
|
|
|
4942
|
+
/**
|
|
4943
|
+
* The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
|
|
4944
|
+
* Available only in secure contexts.
|
|
4945
|
+
*
|
|
4946
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
|
|
4947
|
+
*/
|
|
4948
|
+
interface GPUQueue extends GPUObjectBase {
|
|
4949
|
+
/**
|
|
4950
|
+
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|
|
4951
|
+
*
|
|
4952
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
|
|
4953
|
+
*/
|
|
4954
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
|
|
4955
|
+
/**
|
|
4956
|
+
* 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.
|
|
4957
|
+
*
|
|
4958
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
|
|
4959
|
+
*/
|
|
4960
|
+
onSubmittedWorkDone(): Promise<void>;
|
|
4961
|
+
/**
|
|
4962
|
+
* The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
|
|
4963
|
+
*
|
|
4964
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
|
|
4965
|
+
*/
|
|
4966
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
4967
|
+
/**
|
|
4968
|
+
* The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
|
|
4969
|
+
*
|
|
4970
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
|
|
4971
|
+
*/
|
|
4972
|
+
writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
|
|
4973
|
+
/**
|
|
4974
|
+
* The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
|
|
4975
|
+
*
|
|
4976
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
|
|
4977
|
+
*/
|
|
4978
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
|
|
4979
|
+
}
|
|
4980
|
+
|
|
4981
|
+
declare var GPUQueue: {
|
|
4982
|
+
prototype: GPUQueue;
|
|
4983
|
+
new(): GPUQueue;
|
|
4984
|
+
};
|
|
4985
|
+
|
|
4668
4986
|
/**
|
|
4669
4987
|
* The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
|
|
4670
4988
|
* Available only in secure contexts.
|
|
@@ -12612,11 +12930,15 @@ type GLuint = number;
|
|
|
12612
12930
|
type GLuint64 = number;
|
|
12613
12931
|
type GPUBufferDynamicOffset = number;
|
|
12614
12932
|
type GPUColor = number[] | GPUColorDict;
|
|
12933
|
+
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12934
|
+
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
12615
12935
|
type GPUFlagsConstant = number;
|
|
12616
12936
|
type GPUIndex32 = number;
|
|
12617
12937
|
type GPUIntegerCoordinate = number;
|
|
12618
12938
|
type GPUIntegerCoordinateOut = number;
|
|
12619
12939
|
type GPUMapModeFlags = number;
|
|
12940
|
+
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12941
|
+
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
12620
12942
|
type GPUSignedOffset32 = number;
|
|
12621
12943
|
type GPUSize32 = number;
|
|
12622
12944
|
type GPUSize32Out = number;
|
|
@@ -12632,7 +12954,7 @@ type ImageDataArray = Uint8ClampedArray<ArrayBuffer>;
|
|
|
12632
12954
|
type Int32List = Int32Array<ArrayBufferLike> | GLint[];
|
|
12633
12955
|
type MessageEventSource = MessagePort | ServiceWorker;
|
|
12634
12956
|
type NamedCurve = string;
|
|
12635
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
12957
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
12636
12958
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
12637
12959
|
type PerformanceEntryList = PerformanceEntry[];
|
|
12638
12960
|
type PushMessageDataInit = BufferSource | string;
|
|
@@ -12673,11 +12995,15 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
12673
12995
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12674
12996
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
12675
12997
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
12998
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
12999
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12676
13000
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12677
13001
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
12678
13002
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
13003
|
+
type GPULoadOp = "clear" | "load";
|
|
12679
13004
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12680
13005
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
13006
|
+
type GPUStoreOp = "discard" | "store";
|
|
12681
13007
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12682
13008
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12683
13009
|
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";
|
|
@@ -12818,6 +13144,48 @@ interface GPUBindingCommandsMixin {
|
|
|
12818
13144
|
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
|
|
12819
13145
|
}
|
|
12820
13146
|
|
|
13147
|
+
interface GPUCommandEncoder {
|
|
13148
|
+
/**
|
|
13149
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
13150
|
+
*
|
|
13151
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
13152
|
+
*/
|
|
13153
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
13154
|
+
/**
|
|
13155
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
13156
|
+
*
|
|
13157
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
13158
|
+
*/
|
|
13159
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
13160
|
+
/**
|
|
13161
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
13162
|
+
*
|
|
13163
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
13164
|
+
*/
|
|
13165
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
13166
|
+
}
|
|
13167
|
+
|
|
13168
|
+
interface GPUQueue {
|
|
13169
|
+
/**
|
|
13170
|
+
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|
|
13171
|
+
*
|
|
13172
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
|
|
13173
|
+
*/
|
|
13174
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
13175
|
+
/**
|
|
13176
|
+
* The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
|
|
13177
|
+
*
|
|
13178
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
|
|
13179
|
+
*/
|
|
13180
|
+
submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
|
|
13181
|
+
/**
|
|
13182
|
+
* The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
|
|
13183
|
+
*
|
|
13184
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
|
|
13185
|
+
*/
|
|
13186
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
|
|
13187
|
+
}
|
|
13188
|
+
|
|
12821
13189
|
interface GPURenderPassEncoder {
|
|
12822
13190
|
/**
|
|
12823
13191
|
* The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
|