@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/ts5.6/index.d.ts
CHANGED
|
@@ -272,6 +272,20 @@ interface FontFaceSetLoadEventInit extends EventInit {
|
|
|
272
272
|
fontfaces?: FontFace[];
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
interface GPUCanvasConfiguration {
|
|
276
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
277
|
+
colorSpace?: PredefinedColorSpace;
|
|
278
|
+
device: GPUDevice;
|
|
279
|
+
format: GPUTextureFormat;
|
|
280
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
281
|
+
usage?: GPUTextureUsageFlags;
|
|
282
|
+
viewFormats?: GPUTextureFormat[];
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
interface GPUCanvasToneMapping {
|
|
286
|
+
mode?: GPUCanvasToneMappingMode;
|
|
287
|
+
}
|
|
288
|
+
|
|
275
289
|
interface GPUColorDict {
|
|
276
290
|
a: number;
|
|
277
291
|
b: number;
|
|
@@ -279,10 +293,51 @@ interface GPUColorDict {
|
|
|
279
293
|
r: number;
|
|
280
294
|
}
|
|
281
295
|
|
|
296
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
300
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
interface GPUComputePassTimestampWrites {
|
|
304
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
305
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
306
|
+
querySet: GPUQuerySet;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
310
|
+
colorSpace?: PredefinedColorSpace;
|
|
311
|
+
premultipliedAlpha?: boolean;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
interface GPUCopyExternalImageSourceInfo {
|
|
315
|
+
flipY?: boolean;
|
|
316
|
+
origin?: GPUOrigin2D;
|
|
317
|
+
source: GPUCopyExternalImageSource;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
interface GPUExtent3DDict {
|
|
321
|
+
depthOrArrayLayers?: GPUIntegerCoordinate;
|
|
322
|
+
height?: GPUIntegerCoordinate;
|
|
323
|
+
width: GPUIntegerCoordinate;
|
|
324
|
+
}
|
|
325
|
+
|
|
282
326
|
interface GPUObjectDescriptorBase {
|
|
283
327
|
label?: string;
|
|
284
328
|
}
|
|
285
329
|
|
|
330
|
+
interface GPUOrigin2DDict {
|
|
331
|
+
x?: GPUIntegerCoordinate;
|
|
332
|
+
y?: GPUIntegerCoordinate;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
interface GPUOrigin3DDict {
|
|
336
|
+
x?: GPUIntegerCoordinate;
|
|
337
|
+
y?: GPUIntegerCoordinate;
|
|
338
|
+
z?: GPUIntegerCoordinate;
|
|
339
|
+
}
|
|
340
|
+
|
|
286
341
|
interface GPUPipelineErrorInit {
|
|
287
342
|
reason: GPUPipelineErrorReason;
|
|
288
343
|
}
|
|
@@ -290,6 +345,58 @@ interface GPUPipelineErrorInit {
|
|
|
290
345
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
291
346
|
}
|
|
292
347
|
|
|
348
|
+
interface GPURenderPassColorAttachment {
|
|
349
|
+
clearValue?: GPUColor;
|
|
350
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
351
|
+
loadOp: GPULoadOp;
|
|
352
|
+
resolveTarget?: GPUTexture | GPUTextureView;
|
|
353
|
+
storeOp: GPUStoreOp;
|
|
354
|
+
view: GPUTexture | GPUTextureView;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
358
|
+
depthClearValue?: number;
|
|
359
|
+
depthLoadOp?: GPULoadOp;
|
|
360
|
+
depthReadOnly?: boolean;
|
|
361
|
+
depthStoreOp?: GPUStoreOp;
|
|
362
|
+
stencilClearValue?: GPUStencilValue;
|
|
363
|
+
stencilLoadOp?: GPULoadOp;
|
|
364
|
+
stencilReadOnly?: boolean;
|
|
365
|
+
stencilStoreOp?: GPUStoreOp;
|
|
366
|
+
view: GPUTexture | GPUTextureView;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
370
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
371
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
372
|
+
maxDrawCount?: GPUSize64;
|
|
373
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
374
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
interface GPURenderPassTimestampWrites {
|
|
378
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
379
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
380
|
+
querySet: GPUQuerySet;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
384
|
+
buffer: GPUBuffer;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
interface GPUTexelCopyBufferLayout {
|
|
388
|
+
bytesPerRow?: GPUSize32;
|
|
389
|
+
offset?: GPUSize64;
|
|
390
|
+
rowsPerImage?: GPUSize32;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
interface GPUTexelCopyTextureInfo {
|
|
394
|
+
aspect?: GPUTextureAspect;
|
|
395
|
+
mipLevel?: GPUIntegerCoordinate;
|
|
396
|
+
origin?: GPUOrigin3D;
|
|
397
|
+
texture: GPUTexture;
|
|
398
|
+
}
|
|
399
|
+
|
|
293
400
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
294
401
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
295
402
|
aspect?: GPUTextureAspect;
|
|
@@ -4353,6 +4460,50 @@ declare var GPUBuffer: {
|
|
|
4353
4460
|
new(): GPUBuffer;
|
|
4354
4461
|
};
|
|
4355
4462
|
|
|
4463
|
+
/**
|
|
4464
|
+
* 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".
|
|
4465
|
+
* Available only in secure contexts.
|
|
4466
|
+
*
|
|
4467
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
4468
|
+
*/
|
|
4469
|
+
interface GPUCanvasContext {
|
|
4470
|
+
/**
|
|
4471
|
+
* The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
|
|
4472
|
+
*
|
|
4473
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
|
|
4474
|
+
*/
|
|
4475
|
+
readonly canvas: OffscreenCanvas;
|
|
4476
|
+
/**
|
|
4477
|
+
* 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.
|
|
4478
|
+
*
|
|
4479
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
|
|
4480
|
+
*/
|
|
4481
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
4482
|
+
/**
|
|
4483
|
+
* The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
|
|
4484
|
+
*
|
|
4485
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
|
|
4486
|
+
*/
|
|
4487
|
+
getConfiguration(): GPUCanvasConfiguration | null;
|
|
4488
|
+
/**
|
|
4489
|
+
* The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
|
|
4490
|
+
*
|
|
4491
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
|
|
4492
|
+
*/
|
|
4493
|
+
getCurrentTexture(): GPUTexture;
|
|
4494
|
+
/**
|
|
4495
|
+
* 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.
|
|
4496
|
+
*
|
|
4497
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
|
|
4498
|
+
*/
|
|
4499
|
+
unconfigure(): void;
|
|
4500
|
+
}
|
|
4501
|
+
|
|
4502
|
+
declare var GPUCanvasContext: {
|
|
4503
|
+
prototype: GPUCanvasContext;
|
|
4504
|
+
new(): GPUCanvasContext;
|
|
4505
|
+
};
|
|
4506
|
+
|
|
4356
4507
|
/**
|
|
4357
4508
|
* The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
|
|
4358
4509
|
* Available only in secure contexts.
|
|
@@ -4367,6 +4518,75 @@ declare var GPUCommandBuffer: {
|
|
|
4367
4518
|
new(): GPUCommandBuffer;
|
|
4368
4519
|
};
|
|
4369
4520
|
|
|
4521
|
+
/**
|
|
4522
|
+
* The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
|
|
4523
|
+
* Available only in secure contexts.
|
|
4524
|
+
*
|
|
4525
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
4526
|
+
*/
|
|
4527
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
4528
|
+
/**
|
|
4529
|
+
* The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
|
|
4530
|
+
*
|
|
4531
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
|
|
4532
|
+
*/
|
|
4533
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
4534
|
+
/**
|
|
4535
|
+
* The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
|
|
4536
|
+
*
|
|
4537
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
|
|
4538
|
+
*/
|
|
4539
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
4540
|
+
/**
|
|
4541
|
+
* The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
|
|
4542
|
+
*
|
|
4543
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
|
|
4544
|
+
*/
|
|
4545
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
4546
|
+
/**
|
|
4547
|
+
* The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
|
|
4548
|
+
*
|
|
4549
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
|
|
4550
|
+
*/
|
|
4551
|
+
copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
|
|
4552
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
|
|
4553
|
+
/**
|
|
4554
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
4555
|
+
*
|
|
4556
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
4557
|
+
*/
|
|
4558
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4559
|
+
/**
|
|
4560
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
4561
|
+
*
|
|
4562
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
4563
|
+
*/
|
|
4564
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
4565
|
+
/**
|
|
4566
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
4567
|
+
*
|
|
4568
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
4569
|
+
*/
|
|
4570
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4571
|
+
/**
|
|
4572
|
+
* The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
|
|
4573
|
+
*
|
|
4574
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
|
|
4575
|
+
*/
|
|
4576
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
4577
|
+
/**
|
|
4578
|
+
* The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
|
|
4579
|
+
*
|
|
4580
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
|
|
4581
|
+
*/
|
|
4582
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
4583
|
+
}
|
|
4584
|
+
|
|
4585
|
+
declare var GPUCommandEncoder: {
|
|
4586
|
+
prototype: GPUCommandEncoder;
|
|
4587
|
+
new(): GPUCommandEncoder;
|
|
4588
|
+
};
|
|
4589
|
+
|
|
4370
4590
|
/**
|
|
4371
4591
|
* 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.
|
|
4372
4592
|
* Available only in secure contexts.
|
|
@@ -4498,6 +4718,60 @@ interface GPUDebugCommandsMixin {
|
|
|
4498
4718
|
pushDebugGroup(groupLabel: string): void;
|
|
4499
4719
|
}
|
|
4500
4720
|
|
|
4721
|
+
interface GPUDeviceEventMap {
|
|
4722
|
+
"uncapturederror": GPUUncapturedErrorEvent;
|
|
4723
|
+
}
|
|
4724
|
+
|
|
4725
|
+
/**
|
|
4726
|
+
* 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.
|
|
4727
|
+
* Available only in secure contexts.
|
|
4728
|
+
*
|
|
4729
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
4730
|
+
*/
|
|
4731
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
4732
|
+
/**
|
|
4733
|
+
* The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
|
|
4734
|
+
*
|
|
4735
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
|
|
4736
|
+
*/
|
|
4737
|
+
readonly adapterInfo: GPUAdapterInfo;
|
|
4738
|
+
/**
|
|
4739
|
+
* 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.
|
|
4740
|
+
*
|
|
4741
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
|
|
4742
|
+
*/
|
|
4743
|
+
readonly features: GPUSupportedFeatures;
|
|
4744
|
+
/**
|
|
4745
|
+
* 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.
|
|
4746
|
+
*
|
|
4747
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
|
|
4748
|
+
*/
|
|
4749
|
+
readonly limits: GPUSupportedLimits;
|
|
4750
|
+
/**
|
|
4751
|
+
* 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.
|
|
4752
|
+
*
|
|
4753
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
|
|
4754
|
+
*/
|
|
4755
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
4756
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
|
|
4757
|
+
onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
|
|
4758
|
+
/**
|
|
4759
|
+
* The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
|
|
4760
|
+
*
|
|
4761
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
|
|
4762
|
+
*/
|
|
4763
|
+
readonly queue: GPUQueue;
|
|
4764
|
+
addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4765
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
4766
|
+
removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
4767
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
declare var GPUDevice: {
|
|
4771
|
+
prototype: GPUDevice;
|
|
4772
|
+
new(): GPUDevice;
|
|
4773
|
+
};
|
|
4774
|
+
|
|
4501
4775
|
/**
|
|
4502
4776
|
* 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.
|
|
4503
4777
|
* Available only in secure contexts.
|
|
@@ -4662,6 +4936,50 @@ declare var GPUQuerySet: {
|
|
|
4662
4936
|
new(): GPUQuerySet;
|
|
4663
4937
|
};
|
|
4664
4938
|
|
|
4939
|
+
/**
|
|
4940
|
+
* The **`GPUQueue`** interface of the WebGPU API controls execution of encoded commands on the GPU.
|
|
4941
|
+
* Available only in secure contexts.
|
|
4942
|
+
*
|
|
4943
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue)
|
|
4944
|
+
*/
|
|
4945
|
+
interface GPUQueue extends GPUObjectBase {
|
|
4946
|
+
/**
|
|
4947
|
+
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|
|
4948
|
+
*
|
|
4949
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
|
|
4950
|
+
*/
|
|
4951
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: GPUExtent3D): void;
|
|
4952
|
+
/**
|
|
4953
|
+
* 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.
|
|
4954
|
+
*
|
|
4955
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/onSubmittedWorkDone)
|
|
4956
|
+
*/
|
|
4957
|
+
onSubmittedWorkDone(): Promise<void>;
|
|
4958
|
+
/**
|
|
4959
|
+
* The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
|
|
4960
|
+
*
|
|
4961
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
|
|
4962
|
+
*/
|
|
4963
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
4964
|
+
/**
|
|
4965
|
+
* The **`writeBuffer()`** method of the GPUQueue interface writes a provided data source into a given GPUBuffer.
|
|
4966
|
+
*
|
|
4967
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeBuffer)
|
|
4968
|
+
*/
|
|
4969
|
+
writeBuffer(buffer: GPUBuffer, bufferOffset: GPUSize64, data: AllowSharedBufferSource, dataOffset?: GPUSize64, size?: GPUSize64): void;
|
|
4970
|
+
/**
|
|
4971
|
+
* The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
|
|
4972
|
+
*
|
|
4973
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
|
|
4974
|
+
*/
|
|
4975
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: GPUExtent3D): void;
|
|
4976
|
+
}
|
|
4977
|
+
|
|
4978
|
+
declare var GPUQueue: {
|
|
4979
|
+
prototype: GPUQueue;
|
|
4980
|
+
new(): GPUQueue;
|
|
4981
|
+
};
|
|
4982
|
+
|
|
4665
4983
|
/**
|
|
4666
4984
|
* The **`GPURenderBundle`** interface of the WebGPU API represents a container for pre-recorded bundles of commands.
|
|
4667
4985
|
* Available only in secure contexts.
|
|
@@ -12609,11 +12927,15 @@ type GLuint = number;
|
|
|
12609
12927
|
type GLuint64 = number;
|
|
12610
12928
|
type GPUBufferDynamicOffset = number;
|
|
12611
12929
|
type GPUColor = number[] | GPUColorDict;
|
|
12930
|
+
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12931
|
+
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
12612
12932
|
type GPUFlagsConstant = number;
|
|
12613
12933
|
type GPUIndex32 = number;
|
|
12614
12934
|
type GPUIntegerCoordinate = number;
|
|
12615
12935
|
type GPUIntegerCoordinateOut = number;
|
|
12616
12936
|
type GPUMapModeFlags = number;
|
|
12937
|
+
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12938
|
+
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
12617
12939
|
type GPUSignedOffset32 = number;
|
|
12618
12940
|
type GPUSize32 = number;
|
|
12619
12941
|
type GPUSize32Out = number;
|
|
@@ -12629,7 +12951,7 @@ type ImageDataArray = Uint8ClampedArray;
|
|
|
12629
12951
|
type Int32List = Int32Array | GLint[];
|
|
12630
12952
|
type MessageEventSource = MessagePort | ServiceWorker;
|
|
12631
12953
|
type NamedCurve = string;
|
|
12632
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
12954
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
12633
12955
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
12634
12956
|
type PerformanceEntryList = PerformanceEntry[];
|
|
12635
12957
|
type PushMessageDataInit = BufferSource | string;
|
|
@@ -12670,11 +12992,15 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
12670
12992
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12671
12993
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
12672
12994
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
12995
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
12996
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12673
12997
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12674
12998
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
12675
12999
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
13000
|
+
type GPULoadOp = "clear" | "load";
|
|
12676
13001
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12677
13002
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
13003
|
+
type GPUStoreOp = "discard" | "store";
|
|
12678
13004
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12679
13005
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12680
13006
|
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
|
@@ -87,6 +87,48 @@ interface GPUBindingCommandsMixin {
|
|
|
87
87
|
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
interface GPUCommandEncoder {
|
|
91
|
+
/**
|
|
92
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
93
|
+
*
|
|
94
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
95
|
+
*/
|
|
96
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
97
|
+
/**
|
|
98
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
99
|
+
*
|
|
100
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
101
|
+
*/
|
|
102
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
103
|
+
/**
|
|
104
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
105
|
+
*
|
|
106
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
107
|
+
*/
|
|
108
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
interface GPUQueue {
|
|
112
|
+
/**
|
|
113
|
+
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|
|
114
|
+
*
|
|
115
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/copyExternalImageToTexture)
|
|
116
|
+
*/
|
|
117
|
+
copyExternalImageToTexture(source: GPUCopyExternalImageSourceInfo, destination: GPUCopyExternalImageDestInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
118
|
+
/**
|
|
119
|
+
* The **`submit()`** method of the GPUQueue interface schedules the execution of command buffers represented by one or more GPUCommandBuffer objects by the GPU.
|
|
120
|
+
*
|
|
121
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/submit)
|
|
122
|
+
*/
|
|
123
|
+
submit(commandBuffers: Iterable<GPUCommandBuffer>): void;
|
|
124
|
+
/**
|
|
125
|
+
* The **`writeTexture()`** method of the GPUQueue interface writes a provided data source into a given GPUTexture.
|
|
126
|
+
*
|
|
127
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUQueue/writeTexture)
|
|
128
|
+
*/
|
|
129
|
+
writeTexture(destination: GPUTexelCopyTextureInfo, data: AllowSharedBufferSource, dataLayout: GPUTexelCopyBufferLayout, size: Iterable<GPUIntegerCoordinate>): void;
|
|
130
|
+
}
|
|
131
|
+
|
|
90
132
|
interface GPURenderPassEncoder {
|
|
91
133
|
/**
|
|
92
134
|
* The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
|