@types/serviceworker 0.0.184 → 0.0.186
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 +311 -1
- package/package.json +1 -1
- package/ts5.5/index.d.ts +290 -1
- package/ts5.5/iterable.d.ts +21 -0
- package/ts5.6/index.d.ts +290 -1
- package/ts5.6/iterable.d.ts +21 -0
- package/ts5.9/index.d.ts +290 -1
- package/ts5.9/iterable.d.ts +21 -0
package/ts5.5/index.d.ts
CHANGED
|
@@ -272,6 +272,36 @@ interface FontFaceSetLoadEventInit extends EventInit {
|
|
|
272
272
|
fontfaces?: FontFace[];
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
|
|
276
|
+
entries: GPUBindGroupEntry[];
|
|
277
|
+
layout: GPUBindGroupLayout;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
interface GPUBindGroupEntry {
|
|
281
|
+
binding: GPUIndex32;
|
|
282
|
+
resource: GPUBindingResource;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
interface GPUBufferBinding {
|
|
286
|
+
buffer: GPUBuffer;
|
|
287
|
+
offset?: GPUSize64;
|
|
288
|
+
size?: GPUSize64;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
interface GPUCanvasConfiguration {
|
|
292
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
293
|
+
colorSpace?: PredefinedColorSpace;
|
|
294
|
+
device: GPUDevice;
|
|
295
|
+
format: GPUTextureFormat;
|
|
296
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
297
|
+
usage?: GPUTextureUsageFlags;
|
|
298
|
+
viewFormats?: GPUTextureFormat[];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
interface GPUCanvasToneMapping {
|
|
302
|
+
mode?: GPUCanvasToneMappingMode;
|
|
303
|
+
}
|
|
304
|
+
|
|
275
305
|
interface GPUColorDict {
|
|
276
306
|
a: number;
|
|
277
307
|
b: number;
|
|
@@ -279,6 +309,19 @@ interface GPUColorDict {
|
|
|
279
309
|
r: number;
|
|
280
310
|
}
|
|
281
311
|
|
|
312
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
316
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
interface GPUComputePassTimestampWrites {
|
|
320
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
321
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
322
|
+
querySet: GPUQuerySet;
|
|
323
|
+
}
|
|
324
|
+
|
|
282
325
|
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
283
326
|
colorSpace?: PredefinedColorSpace;
|
|
284
327
|
premultipliedAlpha?: boolean;
|
|
@@ -296,6 +339,10 @@ interface GPUExtent3DDict {
|
|
|
296
339
|
width: GPUIntegerCoordinate;
|
|
297
340
|
}
|
|
298
341
|
|
|
342
|
+
interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
343
|
+
colorSpace?: PredefinedColorSpace;
|
|
344
|
+
}
|
|
345
|
+
|
|
299
346
|
interface GPUObjectDescriptorBase {
|
|
300
347
|
label?: string;
|
|
301
348
|
}
|
|
@@ -318,6 +365,45 @@ interface GPUPipelineErrorInit {
|
|
|
318
365
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
319
366
|
}
|
|
320
367
|
|
|
368
|
+
interface GPURenderPassColorAttachment {
|
|
369
|
+
clearValue?: GPUColor;
|
|
370
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
371
|
+
loadOp: GPULoadOp;
|
|
372
|
+
resolveTarget?: GPUTexture | GPUTextureView;
|
|
373
|
+
storeOp: GPUStoreOp;
|
|
374
|
+
view: GPUTexture | GPUTextureView;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
378
|
+
depthClearValue?: number;
|
|
379
|
+
depthLoadOp?: GPULoadOp;
|
|
380
|
+
depthReadOnly?: boolean;
|
|
381
|
+
depthStoreOp?: GPUStoreOp;
|
|
382
|
+
stencilClearValue?: GPUStencilValue;
|
|
383
|
+
stencilLoadOp?: GPULoadOp;
|
|
384
|
+
stencilReadOnly?: boolean;
|
|
385
|
+
stencilStoreOp?: GPUStoreOp;
|
|
386
|
+
view: GPUTexture | GPUTextureView;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
390
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
391
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
392
|
+
maxDrawCount?: GPUSize64;
|
|
393
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
394
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
interface GPURenderPassTimestampWrites {
|
|
398
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
399
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
400
|
+
querySet: GPUQuerySet;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
404
|
+
buffer: GPUBuffer;
|
|
405
|
+
}
|
|
406
|
+
|
|
321
407
|
interface GPUTexelCopyBufferLayout {
|
|
322
408
|
bytesPerRow?: GPUSize32;
|
|
323
409
|
offset?: GPUSize64;
|
|
@@ -4394,6 +4480,50 @@ declare var GPUBuffer: {
|
|
|
4394
4480
|
new(): GPUBuffer;
|
|
4395
4481
|
};
|
|
4396
4482
|
|
|
4483
|
+
/**
|
|
4484
|
+
* 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".
|
|
4485
|
+
* Available only in secure contexts.
|
|
4486
|
+
*
|
|
4487
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
4488
|
+
*/
|
|
4489
|
+
interface GPUCanvasContext {
|
|
4490
|
+
/**
|
|
4491
|
+
* The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
|
|
4492
|
+
*
|
|
4493
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
|
|
4494
|
+
*/
|
|
4495
|
+
readonly canvas: OffscreenCanvas;
|
|
4496
|
+
/**
|
|
4497
|
+
* 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.
|
|
4498
|
+
*
|
|
4499
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
|
|
4500
|
+
*/
|
|
4501
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
4502
|
+
/**
|
|
4503
|
+
* The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
|
|
4504
|
+
*
|
|
4505
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
|
|
4506
|
+
*/
|
|
4507
|
+
getConfiguration(): GPUCanvasConfiguration | null;
|
|
4508
|
+
/**
|
|
4509
|
+
* The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
|
|
4510
|
+
*
|
|
4511
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
|
|
4512
|
+
*/
|
|
4513
|
+
getCurrentTexture(): GPUTexture;
|
|
4514
|
+
/**
|
|
4515
|
+
* 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.
|
|
4516
|
+
*
|
|
4517
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
|
|
4518
|
+
*/
|
|
4519
|
+
unconfigure(): void;
|
|
4520
|
+
}
|
|
4521
|
+
|
|
4522
|
+
declare var GPUCanvasContext: {
|
|
4523
|
+
prototype: GPUCanvasContext;
|
|
4524
|
+
new(): GPUCanvasContext;
|
|
4525
|
+
};
|
|
4526
|
+
|
|
4397
4527
|
/**
|
|
4398
4528
|
* The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
|
|
4399
4529
|
* Available only in secure contexts.
|
|
@@ -4408,6 +4538,75 @@ declare var GPUCommandBuffer: {
|
|
|
4408
4538
|
new(): GPUCommandBuffer;
|
|
4409
4539
|
};
|
|
4410
4540
|
|
|
4541
|
+
/**
|
|
4542
|
+
* The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
|
|
4543
|
+
* Available only in secure contexts.
|
|
4544
|
+
*
|
|
4545
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
4546
|
+
*/
|
|
4547
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
4548
|
+
/**
|
|
4549
|
+
* The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
|
|
4550
|
+
*
|
|
4551
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
|
|
4552
|
+
*/
|
|
4553
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
4554
|
+
/**
|
|
4555
|
+
* The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
|
|
4556
|
+
*
|
|
4557
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
|
|
4558
|
+
*/
|
|
4559
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
4560
|
+
/**
|
|
4561
|
+
* The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
|
|
4562
|
+
*
|
|
4563
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
|
|
4564
|
+
*/
|
|
4565
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
4566
|
+
/**
|
|
4567
|
+
* The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
|
|
4568
|
+
*
|
|
4569
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
|
|
4570
|
+
*/
|
|
4571
|
+
copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
|
|
4572
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
|
|
4573
|
+
/**
|
|
4574
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
4575
|
+
*
|
|
4576
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
4577
|
+
*/
|
|
4578
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4579
|
+
/**
|
|
4580
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
4581
|
+
*
|
|
4582
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
4583
|
+
*/
|
|
4584
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
4585
|
+
/**
|
|
4586
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
4587
|
+
*
|
|
4588
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
4589
|
+
*/
|
|
4590
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4591
|
+
/**
|
|
4592
|
+
* The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
|
|
4593
|
+
*
|
|
4594
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
|
|
4595
|
+
*/
|
|
4596
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
4597
|
+
/**
|
|
4598
|
+
* The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
|
|
4599
|
+
*
|
|
4600
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
|
|
4601
|
+
*/
|
|
4602
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
4603
|
+
}
|
|
4604
|
+
|
|
4605
|
+
declare var GPUCommandEncoder: {
|
|
4606
|
+
prototype: GPUCommandEncoder;
|
|
4607
|
+
new(): GPUCommandEncoder;
|
|
4608
|
+
};
|
|
4609
|
+
|
|
4411
4610
|
/**
|
|
4412
4611
|
* 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.
|
|
4413
4612
|
* Available only in secure contexts.
|
|
@@ -4539,6 +4738,90 @@ interface GPUDebugCommandsMixin {
|
|
|
4539
4738
|
pushDebugGroup(groupLabel: string): void;
|
|
4540
4739
|
}
|
|
4541
4740
|
|
|
4741
|
+
interface GPUDeviceEventMap {
|
|
4742
|
+
"uncapturederror": GPUUncapturedErrorEvent;
|
|
4743
|
+
}
|
|
4744
|
+
|
|
4745
|
+
/**
|
|
4746
|
+
* 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.
|
|
4747
|
+
* Available only in secure contexts.
|
|
4748
|
+
*
|
|
4749
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
4750
|
+
*/
|
|
4751
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
4752
|
+
/**
|
|
4753
|
+
* The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
|
|
4754
|
+
*
|
|
4755
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
|
|
4756
|
+
*/
|
|
4757
|
+
readonly adapterInfo: GPUAdapterInfo;
|
|
4758
|
+
/**
|
|
4759
|
+
* 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.
|
|
4760
|
+
*
|
|
4761
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
|
|
4762
|
+
*/
|
|
4763
|
+
readonly features: GPUSupportedFeatures;
|
|
4764
|
+
/**
|
|
4765
|
+
* 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.
|
|
4766
|
+
*
|
|
4767
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
|
|
4768
|
+
*/
|
|
4769
|
+
readonly limits: GPUSupportedLimits;
|
|
4770
|
+
/**
|
|
4771
|
+
* 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.
|
|
4772
|
+
*
|
|
4773
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
|
|
4774
|
+
*/
|
|
4775
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
4776
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
|
|
4777
|
+
onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
|
|
4778
|
+
/**
|
|
4779
|
+
* The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
|
|
4780
|
+
*
|
|
4781
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
|
|
4782
|
+
*/
|
|
4783
|
+
readonly queue: GPUQueue;
|
|
4784
|
+
/**
|
|
4785
|
+
* 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.
|
|
4786
|
+
*
|
|
4787
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
|
|
4788
|
+
*/
|
|
4789
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
4790
|
+
/**
|
|
4791
|
+
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4792
|
+
*
|
|
4793
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy)
|
|
4794
|
+
*/
|
|
4795
|
+
destroy(): void;
|
|
4796
|
+
/**
|
|
4797
|
+
* 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.
|
|
4798
|
+
*
|
|
4799
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture)
|
|
4800
|
+
*/
|
|
4801
|
+
importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture;
|
|
4802
|
+
/**
|
|
4803
|
+
* 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.
|
|
4804
|
+
*
|
|
4805
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope)
|
|
4806
|
+
*/
|
|
4807
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
4808
|
+
/**
|
|
4809
|
+
* 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.
|
|
4810
|
+
*
|
|
4811
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope)
|
|
4812
|
+
*/
|
|
4813
|
+
pushErrorScope(filter: GPUErrorFilter): void;
|
|
4814
|
+
addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4815
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
4816
|
+
removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
4817
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
4818
|
+
}
|
|
4819
|
+
|
|
4820
|
+
declare var GPUDevice: {
|
|
4821
|
+
prototype: GPUDevice;
|
|
4822
|
+
new(): GPUDevice;
|
|
4823
|
+
};
|
|
4824
|
+
|
|
4542
4825
|
/**
|
|
4543
4826
|
* 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.
|
|
4544
4827
|
* Available only in secure contexts.
|
|
@@ -12692,6 +12975,7 @@ type GLsizei = number;
|
|
|
12692
12975
|
type GLsizeiptr = number;
|
|
12693
12976
|
type GLuint = number;
|
|
12694
12977
|
type GLuint64 = number;
|
|
12978
|
+
type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
|
|
12695
12979
|
type GPUBufferDynamicOffset = number;
|
|
12696
12980
|
type GPUColor = number[] | GPUColorDict;
|
|
12697
12981
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
@@ -12718,7 +13002,7 @@ type ImageDataArray = Uint8ClampedArray;
|
|
|
12718
13002
|
type Int32List = Int32Array | GLint[];
|
|
12719
13003
|
type MessageEventSource = MessagePort | ServiceWorker;
|
|
12720
13004
|
type NamedCurve = string;
|
|
12721
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
13005
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
12722
13006
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
12723
13007
|
type PerformanceEntryList = PerformanceEntry[];
|
|
12724
13008
|
type PushMessageDataInit = BufferSource | string;
|
|
@@ -12759,11 +13043,16 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
12759
13043
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12760
13044
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
12761
13045
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
13046
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
13047
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12762
13048
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12763
13049
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
13050
|
+
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
12764
13051
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
13052
|
+
type GPULoadOp = "clear" | "load";
|
|
12765
13053
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12766
13054
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
13055
|
+
type GPUStoreOp = "discard" | "store";
|
|
12767
13056
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12768
13057
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12769
13058
|
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
|
@@ -83,6 +83,27 @@ interface GPUBindingCommandsMixin {
|
|
|
83
83
|
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
interface GPUCommandEncoder {
|
|
87
|
+
/**
|
|
88
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
89
|
+
*
|
|
90
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
91
|
+
*/
|
|
92
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
93
|
+
/**
|
|
94
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
95
|
+
*
|
|
96
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
97
|
+
*/
|
|
98
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
99
|
+
/**
|
|
100
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
101
|
+
*
|
|
102
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
103
|
+
*/
|
|
104
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
105
|
+
}
|
|
106
|
+
|
|
86
107
|
interface GPUQueue {
|
|
87
108
|
/**
|
|
88
109
|
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|