@types/webworker 0.0.63 → 0.0.65
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 +312 -1
- package/package.json +1 -1
- package/ts5.5/index.d.ts +291 -1
- package/ts5.5/iterable.d.ts +21 -0
- package/ts5.6/index.d.ts +291 -1
- package/ts5.6/iterable.d.ts +21 -0
- package/ts5.9/index.d.ts +291 -1
- package/ts5.9/iterable.d.ts +21 -0
package/ts5.5/index.d.ts
CHANGED
|
@@ -362,6 +362,36 @@ interface FontFaceSetLoadEventInit extends EventInit {
|
|
|
362
362
|
fontfaces?: FontFace[];
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
+
interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
|
|
366
|
+
entries: GPUBindGroupEntry[];
|
|
367
|
+
layout: GPUBindGroupLayout;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
interface GPUBindGroupEntry {
|
|
371
|
+
binding: GPUIndex32;
|
|
372
|
+
resource: GPUBindingResource;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
interface GPUBufferBinding {
|
|
376
|
+
buffer: GPUBuffer;
|
|
377
|
+
offset?: GPUSize64;
|
|
378
|
+
size?: GPUSize64;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
interface GPUCanvasConfiguration {
|
|
382
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
383
|
+
colorSpace?: PredefinedColorSpace;
|
|
384
|
+
device: GPUDevice;
|
|
385
|
+
format: GPUTextureFormat;
|
|
386
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
387
|
+
usage?: GPUTextureUsageFlags;
|
|
388
|
+
viewFormats?: GPUTextureFormat[];
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
interface GPUCanvasToneMapping {
|
|
392
|
+
mode?: GPUCanvasToneMappingMode;
|
|
393
|
+
}
|
|
394
|
+
|
|
365
395
|
interface GPUColorDict {
|
|
366
396
|
a: number;
|
|
367
397
|
b: number;
|
|
@@ -369,6 +399,19 @@ interface GPUColorDict {
|
|
|
369
399
|
r: number;
|
|
370
400
|
}
|
|
371
401
|
|
|
402
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
406
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
interface GPUComputePassTimestampWrites {
|
|
410
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
411
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
412
|
+
querySet: GPUQuerySet;
|
|
413
|
+
}
|
|
414
|
+
|
|
372
415
|
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
373
416
|
colorSpace?: PredefinedColorSpace;
|
|
374
417
|
premultipliedAlpha?: boolean;
|
|
@@ -386,6 +429,11 @@ interface GPUExtent3DDict {
|
|
|
386
429
|
width: GPUIntegerCoordinate;
|
|
387
430
|
}
|
|
388
431
|
|
|
432
|
+
interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
433
|
+
colorSpace?: PredefinedColorSpace;
|
|
434
|
+
source: VideoFrame;
|
|
435
|
+
}
|
|
436
|
+
|
|
389
437
|
interface GPUObjectDescriptorBase {
|
|
390
438
|
label?: string;
|
|
391
439
|
}
|
|
@@ -408,6 +456,45 @@ interface GPUPipelineErrorInit {
|
|
|
408
456
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
409
457
|
}
|
|
410
458
|
|
|
459
|
+
interface GPURenderPassColorAttachment {
|
|
460
|
+
clearValue?: GPUColor;
|
|
461
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
462
|
+
loadOp: GPULoadOp;
|
|
463
|
+
resolveTarget?: GPUTexture | GPUTextureView;
|
|
464
|
+
storeOp: GPUStoreOp;
|
|
465
|
+
view: GPUTexture | GPUTextureView;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
469
|
+
depthClearValue?: number;
|
|
470
|
+
depthLoadOp?: GPULoadOp;
|
|
471
|
+
depthReadOnly?: boolean;
|
|
472
|
+
depthStoreOp?: GPUStoreOp;
|
|
473
|
+
stencilClearValue?: GPUStencilValue;
|
|
474
|
+
stencilLoadOp?: GPULoadOp;
|
|
475
|
+
stencilReadOnly?: boolean;
|
|
476
|
+
stencilStoreOp?: GPUStoreOp;
|
|
477
|
+
view: GPUTexture | GPUTextureView;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
481
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
482
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
483
|
+
maxDrawCount?: GPUSize64;
|
|
484
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
485
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
interface GPURenderPassTimestampWrites {
|
|
489
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
490
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
491
|
+
querySet: GPUQuerySet;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
495
|
+
buffer: GPUBuffer;
|
|
496
|
+
}
|
|
497
|
+
|
|
411
498
|
interface GPUTexelCopyBufferLayout {
|
|
412
499
|
bytesPerRow?: GPUSize32;
|
|
413
500
|
offset?: GPUSize64;
|
|
@@ -5096,6 +5183,50 @@ declare var GPUBuffer: {
|
|
|
5096
5183
|
new(): GPUBuffer;
|
|
5097
5184
|
};
|
|
5098
5185
|
|
|
5186
|
+
/**
|
|
5187
|
+
* 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".
|
|
5188
|
+
* Available only in secure contexts.
|
|
5189
|
+
*
|
|
5190
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
5191
|
+
*/
|
|
5192
|
+
interface GPUCanvasContext {
|
|
5193
|
+
/**
|
|
5194
|
+
* The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
|
|
5195
|
+
*
|
|
5196
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
|
|
5197
|
+
*/
|
|
5198
|
+
readonly canvas: OffscreenCanvas;
|
|
5199
|
+
/**
|
|
5200
|
+
* 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.
|
|
5201
|
+
*
|
|
5202
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
|
|
5203
|
+
*/
|
|
5204
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
5205
|
+
/**
|
|
5206
|
+
* The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
|
|
5207
|
+
*
|
|
5208
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
|
|
5209
|
+
*/
|
|
5210
|
+
getConfiguration(): GPUCanvasConfiguration | null;
|
|
5211
|
+
/**
|
|
5212
|
+
* The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
|
|
5213
|
+
*
|
|
5214
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
|
|
5215
|
+
*/
|
|
5216
|
+
getCurrentTexture(): GPUTexture;
|
|
5217
|
+
/**
|
|
5218
|
+
* 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.
|
|
5219
|
+
*
|
|
5220
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
|
|
5221
|
+
*/
|
|
5222
|
+
unconfigure(): void;
|
|
5223
|
+
}
|
|
5224
|
+
|
|
5225
|
+
declare var GPUCanvasContext: {
|
|
5226
|
+
prototype: GPUCanvasContext;
|
|
5227
|
+
new(): GPUCanvasContext;
|
|
5228
|
+
};
|
|
5229
|
+
|
|
5099
5230
|
/**
|
|
5100
5231
|
* The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
|
|
5101
5232
|
* Available only in secure contexts.
|
|
@@ -5110,6 +5241,75 @@ declare var GPUCommandBuffer: {
|
|
|
5110
5241
|
new(): GPUCommandBuffer;
|
|
5111
5242
|
};
|
|
5112
5243
|
|
|
5244
|
+
/**
|
|
5245
|
+
* The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
|
|
5246
|
+
* Available only in secure contexts.
|
|
5247
|
+
*
|
|
5248
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
5249
|
+
*/
|
|
5250
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
5251
|
+
/**
|
|
5252
|
+
* The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
|
|
5253
|
+
*
|
|
5254
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
|
|
5255
|
+
*/
|
|
5256
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
5257
|
+
/**
|
|
5258
|
+
* The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
|
|
5259
|
+
*
|
|
5260
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
|
|
5261
|
+
*/
|
|
5262
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
5263
|
+
/**
|
|
5264
|
+
* The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
|
|
5265
|
+
*
|
|
5266
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
|
|
5267
|
+
*/
|
|
5268
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
5269
|
+
/**
|
|
5270
|
+
* The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
|
|
5271
|
+
*
|
|
5272
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
|
|
5273
|
+
*/
|
|
5274
|
+
copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
|
|
5275
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
|
|
5276
|
+
/**
|
|
5277
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
5278
|
+
*
|
|
5279
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
5280
|
+
*/
|
|
5281
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
5282
|
+
/**
|
|
5283
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
5284
|
+
*
|
|
5285
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
5286
|
+
*/
|
|
5287
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
5288
|
+
/**
|
|
5289
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
5290
|
+
*
|
|
5291
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
5292
|
+
*/
|
|
5293
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
5294
|
+
/**
|
|
5295
|
+
* The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
|
|
5296
|
+
*
|
|
5297
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
|
|
5298
|
+
*/
|
|
5299
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
5300
|
+
/**
|
|
5301
|
+
* The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
|
|
5302
|
+
*
|
|
5303
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
|
|
5304
|
+
*/
|
|
5305
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
5306
|
+
}
|
|
5307
|
+
|
|
5308
|
+
declare var GPUCommandEncoder: {
|
|
5309
|
+
prototype: GPUCommandEncoder;
|
|
5310
|
+
new(): GPUCommandEncoder;
|
|
5311
|
+
};
|
|
5312
|
+
|
|
5113
5313
|
/**
|
|
5114
5314
|
* 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.
|
|
5115
5315
|
* Available only in secure contexts.
|
|
@@ -5241,6 +5441,90 @@ interface GPUDebugCommandsMixin {
|
|
|
5241
5441
|
pushDebugGroup(groupLabel: string): void;
|
|
5242
5442
|
}
|
|
5243
5443
|
|
|
5444
|
+
interface GPUDeviceEventMap {
|
|
5445
|
+
"uncapturederror": GPUUncapturedErrorEvent;
|
|
5446
|
+
}
|
|
5447
|
+
|
|
5448
|
+
/**
|
|
5449
|
+
* 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.
|
|
5450
|
+
* Available only in secure contexts.
|
|
5451
|
+
*
|
|
5452
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
5453
|
+
*/
|
|
5454
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
5455
|
+
/**
|
|
5456
|
+
* The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
|
|
5457
|
+
*
|
|
5458
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
|
|
5459
|
+
*/
|
|
5460
|
+
readonly adapterInfo: GPUAdapterInfo;
|
|
5461
|
+
/**
|
|
5462
|
+
* 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.
|
|
5463
|
+
*
|
|
5464
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
|
|
5465
|
+
*/
|
|
5466
|
+
readonly features: GPUSupportedFeatures;
|
|
5467
|
+
/**
|
|
5468
|
+
* 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.
|
|
5469
|
+
*
|
|
5470
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
|
|
5471
|
+
*/
|
|
5472
|
+
readonly limits: GPUSupportedLimits;
|
|
5473
|
+
/**
|
|
5474
|
+
* 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.
|
|
5475
|
+
*
|
|
5476
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
|
|
5477
|
+
*/
|
|
5478
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
5479
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
|
|
5480
|
+
onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
|
|
5481
|
+
/**
|
|
5482
|
+
* The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
|
|
5483
|
+
*
|
|
5484
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
|
|
5485
|
+
*/
|
|
5486
|
+
readonly queue: GPUQueue;
|
|
5487
|
+
/**
|
|
5488
|
+
* 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.
|
|
5489
|
+
*
|
|
5490
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
|
|
5491
|
+
*/
|
|
5492
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
5493
|
+
/**
|
|
5494
|
+
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
5495
|
+
*
|
|
5496
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy)
|
|
5497
|
+
*/
|
|
5498
|
+
destroy(): void;
|
|
5499
|
+
/**
|
|
5500
|
+
* 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.
|
|
5501
|
+
*
|
|
5502
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture)
|
|
5503
|
+
*/
|
|
5504
|
+
importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture;
|
|
5505
|
+
/**
|
|
5506
|
+
* 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.
|
|
5507
|
+
*
|
|
5508
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope)
|
|
5509
|
+
*/
|
|
5510
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
5511
|
+
/**
|
|
5512
|
+
* 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.
|
|
5513
|
+
*
|
|
5514
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope)
|
|
5515
|
+
*/
|
|
5516
|
+
pushErrorScope(filter: GPUErrorFilter): void;
|
|
5517
|
+
addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
5518
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
5519
|
+
removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
5520
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
5521
|
+
}
|
|
5522
|
+
|
|
5523
|
+
declare var GPUDevice: {
|
|
5524
|
+
prototype: GPUDevice;
|
|
5525
|
+
new(): GPUDevice;
|
|
5526
|
+
};
|
|
5527
|
+
|
|
5244
5528
|
/**
|
|
5245
5529
|
* 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.
|
|
5246
5530
|
* Available only in secure contexts.
|
|
@@ -14369,6 +14653,7 @@ type GLsizei = number;
|
|
|
14369
14653
|
type GLsizeiptr = number;
|
|
14370
14654
|
type GLuint = number;
|
|
14371
14655
|
type GLuint64 = number;
|
|
14656
|
+
type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
|
|
14372
14657
|
type GPUBufferDynamicOffset = number;
|
|
14373
14658
|
type GPUColor = number[] | GPUColorDict;
|
|
14374
14659
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | VideoFrame | OffscreenCanvas;
|
|
@@ -14396,7 +14681,7 @@ type ImageDataArray = Uint8ClampedArray;
|
|
|
14396
14681
|
type Int32List = Int32Array | GLint[];
|
|
14397
14682
|
type MessageEventSource = MessagePort | ServiceWorker;
|
|
14398
14683
|
type NamedCurve = string;
|
|
14399
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
14684
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
14400
14685
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
14401
14686
|
type PerformanceEntryList = PerformanceEntry[];
|
|
14402
14687
|
type PushMessageDataInit = BufferSource | string;
|
|
@@ -14445,11 +14730,16 @@ type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
|
14445
14730
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
14446
14731
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
14447
14732
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
14733
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
14734
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
14448
14735
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
14449
14736
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
14737
|
+
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
14450
14738
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
14739
|
+
type GPULoadOp = "clear" | "load";
|
|
14451
14740
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
14452
14741
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
14742
|
+
type GPUStoreOp = "discard" | "store";
|
|
14453
14743
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
14454
14744
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
14455
14745
|
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.
|