@types/serviceworker 0.0.187 → 0.0.189
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 +137 -0
- package/package.json +1 -1
- package/ts5.5/index.d.ts +137 -0
- package/ts5.6/index.d.ts +137 -0
- package/ts5.9/index.d.ts +137 -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.189 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fserviceworker%400.0.189.
|
package/index.d.ts
CHANGED
|
@@ -291,6 +291,12 @@ interface GPUBufferBinding {
|
|
|
291
291
|
size?: GPUSize64;
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
+
interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
|
|
295
|
+
mappedAtCreation?: boolean;
|
|
296
|
+
size: GPUSize64;
|
|
297
|
+
usage: GPUBufferUsageFlags;
|
|
298
|
+
}
|
|
299
|
+
|
|
294
300
|
interface GPUCanvasConfiguration {
|
|
295
301
|
alphaMode?: GPUCanvasAlphaMode;
|
|
296
302
|
colorSpace?: PredefinedColorSpace;
|
|
@@ -315,6 +321,9 @@ interface GPUColorDict {
|
|
|
315
321
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
316
322
|
}
|
|
317
323
|
|
|
324
|
+
interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
|
|
325
|
+
}
|
|
326
|
+
|
|
318
327
|
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
319
328
|
timestampWrites?: GPUComputePassTimestampWrites;
|
|
320
329
|
}
|
|
@@ -325,6 +334,10 @@ interface GPUComputePassTimestampWrites {
|
|
|
325
334
|
querySet: GPUQuerySet;
|
|
326
335
|
}
|
|
327
336
|
|
|
337
|
+
interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
338
|
+
compute: GPUProgrammableStage;
|
|
339
|
+
}
|
|
340
|
+
|
|
328
341
|
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
329
342
|
colorSpace?: PredefinedColorSpace;
|
|
330
343
|
premultipliedAlpha?: boolean;
|
|
@@ -361,13 +374,37 @@ interface GPUOrigin3DDict {
|
|
|
361
374
|
z?: GPUIntegerCoordinate;
|
|
362
375
|
}
|
|
363
376
|
|
|
377
|
+
interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
|
|
378
|
+
layout: GPUPipelineLayout | GPUAutoLayoutMode;
|
|
379
|
+
}
|
|
380
|
+
|
|
364
381
|
interface GPUPipelineErrorInit {
|
|
365
382
|
reason: GPUPipelineErrorReason;
|
|
366
383
|
}
|
|
367
384
|
|
|
385
|
+
interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
386
|
+
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
interface GPUProgrammableStage {
|
|
390
|
+
constants?: Record<string, GPUPipelineConstantValue>;
|
|
391
|
+
entryPoint?: string;
|
|
392
|
+
module: GPUShaderModule;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
|
|
396
|
+
count: GPUSize32;
|
|
397
|
+
type: GPUQueryType;
|
|
398
|
+
}
|
|
399
|
+
|
|
368
400
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
369
401
|
}
|
|
370
402
|
|
|
403
|
+
interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
|
|
404
|
+
depthReadOnly?: boolean;
|
|
405
|
+
stencilReadOnly?: boolean;
|
|
406
|
+
}
|
|
407
|
+
|
|
371
408
|
interface GPURenderPassColorAttachment {
|
|
372
409
|
clearValue?: GPUColor;
|
|
373
410
|
depthSlice?: GPUIntegerCoordinate;
|
|
@@ -397,12 +434,35 @@ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
|
397
434
|
timestampWrites?: GPURenderPassTimestampWrites;
|
|
398
435
|
}
|
|
399
436
|
|
|
437
|
+
interface GPURenderPassLayout extends GPUObjectDescriptorBase {
|
|
438
|
+
colorFormats: (GPUTextureFormat | null)[];
|
|
439
|
+
depthStencilFormat?: GPUTextureFormat;
|
|
440
|
+
sampleCount?: GPUSize32;
|
|
441
|
+
}
|
|
442
|
+
|
|
400
443
|
interface GPURenderPassTimestampWrites {
|
|
401
444
|
beginningOfPassWriteIndex?: GPUSize32;
|
|
402
445
|
endOfPassWriteIndex?: GPUSize32;
|
|
403
446
|
querySet: GPUQuerySet;
|
|
404
447
|
}
|
|
405
448
|
|
|
449
|
+
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
450
|
+
addressModeU?: GPUAddressMode;
|
|
451
|
+
addressModeV?: GPUAddressMode;
|
|
452
|
+
addressModeW?: GPUAddressMode;
|
|
453
|
+
compare?: GPUCompareFunction;
|
|
454
|
+
lodMaxClamp?: number;
|
|
455
|
+
lodMinClamp?: number;
|
|
456
|
+
magFilter?: GPUFilterMode;
|
|
457
|
+
maxAnisotropy?: number;
|
|
458
|
+
minFilter?: GPUFilterMode;
|
|
459
|
+
mipmapFilter?: GPUMipmapFilterMode;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
463
|
+
code: string;
|
|
464
|
+
}
|
|
465
|
+
|
|
406
466
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
407
467
|
buffer: GPUBuffer;
|
|
408
468
|
}
|
|
@@ -420,6 +480,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
420
480
|
texture: GPUTexture;
|
|
421
481
|
}
|
|
422
482
|
|
|
483
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
484
|
+
dimension?: GPUTextureDimension;
|
|
485
|
+
format: GPUTextureFormat;
|
|
486
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
487
|
+
sampleCount?: GPUSize32;
|
|
488
|
+
size: GPUExtent3D;
|
|
489
|
+
usage: GPUTextureUsageFlags;
|
|
490
|
+
viewFormats?: GPUTextureFormat[];
|
|
491
|
+
}
|
|
492
|
+
|
|
423
493
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
424
494
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
425
495
|
aspect?: GPUTextureAspect;
|
|
@@ -4790,6 +4860,66 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
4790
4860
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
|
|
4791
4861
|
*/
|
|
4792
4862
|
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
4863
|
+
/**
|
|
4864
|
+
* The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
|
|
4865
|
+
*
|
|
4866
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
|
|
4867
|
+
*/
|
|
4868
|
+
createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
|
|
4869
|
+
/**
|
|
4870
|
+
* The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
|
|
4871
|
+
*
|
|
4872
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
|
|
4873
|
+
*/
|
|
4874
|
+
createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
|
|
4875
|
+
/**
|
|
4876
|
+
* The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
|
|
4877
|
+
*
|
|
4878
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
|
|
4879
|
+
*/
|
|
4880
|
+
createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
|
|
4881
|
+
/**
|
|
4882
|
+
* The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
|
|
4883
|
+
*
|
|
4884
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
|
|
4885
|
+
*/
|
|
4886
|
+
createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
|
|
4887
|
+
/**
|
|
4888
|
+
* The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
|
|
4889
|
+
*
|
|
4890
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
|
|
4891
|
+
*/
|
|
4892
|
+
createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
|
|
4893
|
+
/**
|
|
4894
|
+
* The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
|
|
4895
|
+
*
|
|
4896
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
|
|
4897
|
+
*/
|
|
4898
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
4899
|
+
/**
|
|
4900
|
+
* The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
|
|
4901
|
+
*
|
|
4902
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
4903
|
+
*/
|
|
4904
|
+
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
4905
|
+
/**
|
|
4906
|
+
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
4907
|
+
*
|
|
4908
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
4909
|
+
*/
|
|
4910
|
+
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
4911
|
+
/**
|
|
4912
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
4913
|
+
*
|
|
4914
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
4915
|
+
*/
|
|
4916
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
4917
|
+
/**
|
|
4918
|
+
* The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
|
|
4919
|
+
*
|
|
4920
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
4921
|
+
*/
|
|
4922
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
4793
4923
|
/**
|
|
4794
4924
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4795
4925
|
*
|
|
@@ -12980,6 +13110,7 @@ type GLuint = number;
|
|
|
12980
13110
|
type GLuint64 = number;
|
|
12981
13111
|
type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
|
|
12982
13112
|
type GPUBufferDynamicOffset = number;
|
|
13113
|
+
type GPUBufferUsageFlags = number;
|
|
12983
13114
|
type GPUColor = number[] | GPUColorDict;
|
|
12984
13115
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12985
13116
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
@@ -12990,6 +13121,7 @@ type GPUIntegerCoordinateOut = number;
|
|
|
12990
13121
|
type GPUMapModeFlags = number;
|
|
12991
13122
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12992
13123
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
13124
|
+
type GPUPipelineConstantValue = number;
|
|
12993
13125
|
type GPUSignedOffset32 = number;
|
|
12994
13126
|
type GPUSize32 = number;
|
|
12995
13127
|
type GPUSize32Out = number;
|
|
@@ -13045,14 +13177,19 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
|
|
|
13045
13177
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
13046
13178
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
13047
13179
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
13180
|
+
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
13181
|
+
type GPUAutoLayoutMode = "auto";
|
|
13048
13182
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
13049
13183
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
13050
13184
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
13185
|
+
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
13051
13186
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
13052
13187
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
13053
13188
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
13189
|
+
type GPUFilterMode = "linear" | "nearest";
|
|
13054
13190
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
13055
13191
|
type GPULoadOp = "clear" | "load";
|
|
13192
|
+
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
13056
13193
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
13057
13194
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
13058
13195
|
type GPUStoreOp = "discard" | "store";
|
package/package.json
CHANGED
package/ts5.5/index.d.ts
CHANGED
|
@@ -288,6 +288,12 @@ interface GPUBufferBinding {
|
|
|
288
288
|
size?: GPUSize64;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
|
|
292
|
+
mappedAtCreation?: boolean;
|
|
293
|
+
size: GPUSize64;
|
|
294
|
+
usage: GPUBufferUsageFlags;
|
|
295
|
+
}
|
|
296
|
+
|
|
291
297
|
interface GPUCanvasConfiguration {
|
|
292
298
|
alphaMode?: GPUCanvasAlphaMode;
|
|
293
299
|
colorSpace?: PredefinedColorSpace;
|
|
@@ -312,6 +318,9 @@ interface GPUColorDict {
|
|
|
312
318
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
313
319
|
}
|
|
314
320
|
|
|
321
|
+
interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
|
|
322
|
+
}
|
|
323
|
+
|
|
315
324
|
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
316
325
|
timestampWrites?: GPUComputePassTimestampWrites;
|
|
317
326
|
}
|
|
@@ -322,6 +331,10 @@ interface GPUComputePassTimestampWrites {
|
|
|
322
331
|
querySet: GPUQuerySet;
|
|
323
332
|
}
|
|
324
333
|
|
|
334
|
+
interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
335
|
+
compute: GPUProgrammableStage;
|
|
336
|
+
}
|
|
337
|
+
|
|
325
338
|
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
326
339
|
colorSpace?: PredefinedColorSpace;
|
|
327
340
|
premultipliedAlpha?: boolean;
|
|
@@ -358,13 +371,37 @@ interface GPUOrigin3DDict {
|
|
|
358
371
|
z?: GPUIntegerCoordinate;
|
|
359
372
|
}
|
|
360
373
|
|
|
374
|
+
interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
|
|
375
|
+
layout: GPUPipelineLayout | GPUAutoLayoutMode;
|
|
376
|
+
}
|
|
377
|
+
|
|
361
378
|
interface GPUPipelineErrorInit {
|
|
362
379
|
reason: GPUPipelineErrorReason;
|
|
363
380
|
}
|
|
364
381
|
|
|
382
|
+
interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
383
|
+
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
interface GPUProgrammableStage {
|
|
387
|
+
constants?: Record<string, GPUPipelineConstantValue>;
|
|
388
|
+
entryPoint?: string;
|
|
389
|
+
module: GPUShaderModule;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
|
|
393
|
+
count: GPUSize32;
|
|
394
|
+
type: GPUQueryType;
|
|
395
|
+
}
|
|
396
|
+
|
|
365
397
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
366
398
|
}
|
|
367
399
|
|
|
400
|
+
interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
|
|
401
|
+
depthReadOnly?: boolean;
|
|
402
|
+
stencilReadOnly?: boolean;
|
|
403
|
+
}
|
|
404
|
+
|
|
368
405
|
interface GPURenderPassColorAttachment {
|
|
369
406
|
clearValue?: GPUColor;
|
|
370
407
|
depthSlice?: GPUIntegerCoordinate;
|
|
@@ -394,12 +431,35 @@ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
|
394
431
|
timestampWrites?: GPURenderPassTimestampWrites;
|
|
395
432
|
}
|
|
396
433
|
|
|
434
|
+
interface GPURenderPassLayout extends GPUObjectDescriptorBase {
|
|
435
|
+
colorFormats: (GPUTextureFormat | null)[];
|
|
436
|
+
depthStencilFormat?: GPUTextureFormat;
|
|
437
|
+
sampleCount?: GPUSize32;
|
|
438
|
+
}
|
|
439
|
+
|
|
397
440
|
interface GPURenderPassTimestampWrites {
|
|
398
441
|
beginningOfPassWriteIndex?: GPUSize32;
|
|
399
442
|
endOfPassWriteIndex?: GPUSize32;
|
|
400
443
|
querySet: GPUQuerySet;
|
|
401
444
|
}
|
|
402
445
|
|
|
446
|
+
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
447
|
+
addressModeU?: GPUAddressMode;
|
|
448
|
+
addressModeV?: GPUAddressMode;
|
|
449
|
+
addressModeW?: GPUAddressMode;
|
|
450
|
+
compare?: GPUCompareFunction;
|
|
451
|
+
lodMaxClamp?: number;
|
|
452
|
+
lodMinClamp?: number;
|
|
453
|
+
magFilter?: GPUFilterMode;
|
|
454
|
+
maxAnisotropy?: number;
|
|
455
|
+
minFilter?: GPUFilterMode;
|
|
456
|
+
mipmapFilter?: GPUMipmapFilterMode;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
460
|
+
code: string;
|
|
461
|
+
}
|
|
462
|
+
|
|
403
463
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
404
464
|
buffer: GPUBuffer;
|
|
405
465
|
}
|
|
@@ -417,6 +477,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
417
477
|
texture: GPUTexture;
|
|
418
478
|
}
|
|
419
479
|
|
|
480
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
481
|
+
dimension?: GPUTextureDimension;
|
|
482
|
+
format: GPUTextureFormat;
|
|
483
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
484
|
+
sampleCount?: GPUSize32;
|
|
485
|
+
size: GPUExtent3D;
|
|
486
|
+
usage: GPUTextureUsageFlags;
|
|
487
|
+
viewFormats?: GPUTextureFormat[];
|
|
488
|
+
}
|
|
489
|
+
|
|
420
490
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
421
491
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
422
492
|
aspect?: GPUTextureAspect;
|
|
@@ -4787,6 +4857,66 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
4787
4857
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
|
|
4788
4858
|
*/
|
|
4789
4859
|
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
4860
|
+
/**
|
|
4861
|
+
* The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
|
|
4862
|
+
*
|
|
4863
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
|
|
4864
|
+
*/
|
|
4865
|
+
createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
|
|
4866
|
+
/**
|
|
4867
|
+
* The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
|
|
4868
|
+
*
|
|
4869
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
|
|
4870
|
+
*/
|
|
4871
|
+
createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
|
|
4872
|
+
/**
|
|
4873
|
+
* The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
|
|
4874
|
+
*
|
|
4875
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
|
|
4876
|
+
*/
|
|
4877
|
+
createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
|
|
4878
|
+
/**
|
|
4879
|
+
* The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
|
|
4880
|
+
*
|
|
4881
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
|
|
4882
|
+
*/
|
|
4883
|
+
createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
|
|
4884
|
+
/**
|
|
4885
|
+
* The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
|
|
4886
|
+
*
|
|
4887
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
|
|
4888
|
+
*/
|
|
4889
|
+
createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
|
|
4890
|
+
/**
|
|
4891
|
+
* The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
|
|
4892
|
+
*
|
|
4893
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
|
|
4894
|
+
*/
|
|
4895
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
4896
|
+
/**
|
|
4897
|
+
* The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
|
|
4898
|
+
*
|
|
4899
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
4900
|
+
*/
|
|
4901
|
+
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
4902
|
+
/**
|
|
4903
|
+
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
4904
|
+
*
|
|
4905
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
4906
|
+
*/
|
|
4907
|
+
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
4908
|
+
/**
|
|
4909
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
4910
|
+
*
|
|
4911
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
4912
|
+
*/
|
|
4913
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
4914
|
+
/**
|
|
4915
|
+
* The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
|
|
4916
|
+
*
|
|
4917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
4918
|
+
*/
|
|
4919
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
4790
4920
|
/**
|
|
4791
4921
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4792
4922
|
*
|
|
@@ -12977,6 +13107,7 @@ type GLuint = number;
|
|
|
12977
13107
|
type GLuint64 = number;
|
|
12978
13108
|
type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
|
|
12979
13109
|
type GPUBufferDynamicOffset = number;
|
|
13110
|
+
type GPUBufferUsageFlags = number;
|
|
12980
13111
|
type GPUColor = number[] | GPUColorDict;
|
|
12981
13112
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12982
13113
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
@@ -12987,6 +13118,7 @@ type GPUIntegerCoordinateOut = number;
|
|
|
12987
13118
|
type GPUMapModeFlags = number;
|
|
12988
13119
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12989
13120
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
13121
|
+
type GPUPipelineConstantValue = number;
|
|
12990
13122
|
type GPUSignedOffset32 = number;
|
|
12991
13123
|
type GPUSize32 = number;
|
|
12992
13124
|
type GPUSize32Out = number;
|
|
@@ -13042,14 +13174,19 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
|
|
|
13042
13174
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
13043
13175
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
13044
13176
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
13177
|
+
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
13178
|
+
type GPUAutoLayoutMode = "auto";
|
|
13045
13179
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
13046
13180
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
13047
13181
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
13182
|
+
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
13048
13183
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
13049
13184
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
13050
13185
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
13186
|
+
type GPUFilterMode = "linear" | "nearest";
|
|
13051
13187
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
13052
13188
|
type GPULoadOp = "clear" | "load";
|
|
13189
|
+
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
13053
13190
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
13054
13191
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
13055
13192
|
type GPUStoreOp = "discard" | "store";
|
package/ts5.6/index.d.ts
CHANGED
|
@@ -288,6 +288,12 @@ interface GPUBufferBinding {
|
|
|
288
288
|
size?: GPUSize64;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
|
|
292
|
+
mappedAtCreation?: boolean;
|
|
293
|
+
size: GPUSize64;
|
|
294
|
+
usage: GPUBufferUsageFlags;
|
|
295
|
+
}
|
|
296
|
+
|
|
291
297
|
interface GPUCanvasConfiguration {
|
|
292
298
|
alphaMode?: GPUCanvasAlphaMode;
|
|
293
299
|
colorSpace?: PredefinedColorSpace;
|
|
@@ -312,6 +318,9 @@ interface GPUColorDict {
|
|
|
312
318
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
313
319
|
}
|
|
314
320
|
|
|
321
|
+
interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
|
|
322
|
+
}
|
|
323
|
+
|
|
315
324
|
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
316
325
|
timestampWrites?: GPUComputePassTimestampWrites;
|
|
317
326
|
}
|
|
@@ -322,6 +331,10 @@ interface GPUComputePassTimestampWrites {
|
|
|
322
331
|
querySet: GPUQuerySet;
|
|
323
332
|
}
|
|
324
333
|
|
|
334
|
+
interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
335
|
+
compute: GPUProgrammableStage;
|
|
336
|
+
}
|
|
337
|
+
|
|
325
338
|
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
326
339
|
colorSpace?: PredefinedColorSpace;
|
|
327
340
|
premultipliedAlpha?: boolean;
|
|
@@ -358,13 +371,37 @@ interface GPUOrigin3DDict {
|
|
|
358
371
|
z?: GPUIntegerCoordinate;
|
|
359
372
|
}
|
|
360
373
|
|
|
374
|
+
interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
|
|
375
|
+
layout: GPUPipelineLayout | GPUAutoLayoutMode;
|
|
376
|
+
}
|
|
377
|
+
|
|
361
378
|
interface GPUPipelineErrorInit {
|
|
362
379
|
reason: GPUPipelineErrorReason;
|
|
363
380
|
}
|
|
364
381
|
|
|
382
|
+
interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
383
|
+
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
interface GPUProgrammableStage {
|
|
387
|
+
constants?: Record<string, GPUPipelineConstantValue>;
|
|
388
|
+
entryPoint?: string;
|
|
389
|
+
module: GPUShaderModule;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
|
|
393
|
+
count: GPUSize32;
|
|
394
|
+
type: GPUQueryType;
|
|
395
|
+
}
|
|
396
|
+
|
|
365
397
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
366
398
|
}
|
|
367
399
|
|
|
400
|
+
interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
|
|
401
|
+
depthReadOnly?: boolean;
|
|
402
|
+
stencilReadOnly?: boolean;
|
|
403
|
+
}
|
|
404
|
+
|
|
368
405
|
interface GPURenderPassColorAttachment {
|
|
369
406
|
clearValue?: GPUColor;
|
|
370
407
|
depthSlice?: GPUIntegerCoordinate;
|
|
@@ -394,12 +431,35 @@ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
|
394
431
|
timestampWrites?: GPURenderPassTimestampWrites;
|
|
395
432
|
}
|
|
396
433
|
|
|
434
|
+
interface GPURenderPassLayout extends GPUObjectDescriptorBase {
|
|
435
|
+
colorFormats: (GPUTextureFormat | null)[];
|
|
436
|
+
depthStencilFormat?: GPUTextureFormat;
|
|
437
|
+
sampleCount?: GPUSize32;
|
|
438
|
+
}
|
|
439
|
+
|
|
397
440
|
interface GPURenderPassTimestampWrites {
|
|
398
441
|
beginningOfPassWriteIndex?: GPUSize32;
|
|
399
442
|
endOfPassWriteIndex?: GPUSize32;
|
|
400
443
|
querySet: GPUQuerySet;
|
|
401
444
|
}
|
|
402
445
|
|
|
446
|
+
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
447
|
+
addressModeU?: GPUAddressMode;
|
|
448
|
+
addressModeV?: GPUAddressMode;
|
|
449
|
+
addressModeW?: GPUAddressMode;
|
|
450
|
+
compare?: GPUCompareFunction;
|
|
451
|
+
lodMaxClamp?: number;
|
|
452
|
+
lodMinClamp?: number;
|
|
453
|
+
magFilter?: GPUFilterMode;
|
|
454
|
+
maxAnisotropy?: number;
|
|
455
|
+
minFilter?: GPUFilterMode;
|
|
456
|
+
mipmapFilter?: GPUMipmapFilterMode;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
460
|
+
code: string;
|
|
461
|
+
}
|
|
462
|
+
|
|
403
463
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
404
464
|
buffer: GPUBuffer;
|
|
405
465
|
}
|
|
@@ -417,6 +477,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
417
477
|
texture: GPUTexture;
|
|
418
478
|
}
|
|
419
479
|
|
|
480
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
481
|
+
dimension?: GPUTextureDimension;
|
|
482
|
+
format: GPUTextureFormat;
|
|
483
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
484
|
+
sampleCount?: GPUSize32;
|
|
485
|
+
size: GPUExtent3D;
|
|
486
|
+
usage: GPUTextureUsageFlags;
|
|
487
|
+
viewFormats?: GPUTextureFormat[];
|
|
488
|
+
}
|
|
489
|
+
|
|
420
490
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
421
491
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
422
492
|
aspect?: GPUTextureAspect;
|
|
@@ -4787,6 +4857,66 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
4787
4857
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
|
|
4788
4858
|
*/
|
|
4789
4859
|
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
4860
|
+
/**
|
|
4861
|
+
* The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
|
|
4862
|
+
*
|
|
4863
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
|
|
4864
|
+
*/
|
|
4865
|
+
createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
|
|
4866
|
+
/**
|
|
4867
|
+
* The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
|
|
4868
|
+
*
|
|
4869
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
|
|
4870
|
+
*/
|
|
4871
|
+
createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
|
|
4872
|
+
/**
|
|
4873
|
+
* The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
|
|
4874
|
+
*
|
|
4875
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
|
|
4876
|
+
*/
|
|
4877
|
+
createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
|
|
4878
|
+
/**
|
|
4879
|
+
* The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
|
|
4880
|
+
*
|
|
4881
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
|
|
4882
|
+
*/
|
|
4883
|
+
createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
|
|
4884
|
+
/**
|
|
4885
|
+
* The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
|
|
4886
|
+
*
|
|
4887
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
|
|
4888
|
+
*/
|
|
4889
|
+
createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
|
|
4890
|
+
/**
|
|
4891
|
+
* The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
|
|
4892
|
+
*
|
|
4893
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
|
|
4894
|
+
*/
|
|
4895
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
4896
|
+
/**
|
|
4897
|
+
* The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
|
|
4898
|
+
*
|
|
4899
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
4900
|
+
*/
|
|
4901
|
+
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
4902
|
+
/**
|
|
4903
|
+
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
4904
|
+
*
|
|
4905
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
4906
|
+
*/
|
|
4907
|
+
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
4908
|
+
/**
|
|
4909
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
4910
|
+
*
|
|
4911
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
4912
|
+
*/
|
|
4913
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
4914
|
+
/**
|
|
4915
|
+
* The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
|
|
4916
|
+
*
|
|
4917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
4918
|
+
*/
|
|
4919
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
4790
4920
|
/**
|
|
4791
4921
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4792
4922
|
*
|
|
@@ -12977,6 +13107,7 @@ type GLuint = number;
|
|
|
12977
13107
|
type GLuint64 = number;
|
|
12978
13108
|
type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
|
|
12979
13109
|
type GPUBufferDynamicOffset = number;
|
|
13110
|
+
type GPUBufferUsageFlags = number;
|
|
12980
13111
|
type GPUColor = number[] | GPUColorDict;
|
|
12981
13112
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12982
13113
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
@@ -12987,6 +13118,7 @@ type GPUIntegerCoordinateOut = number;
|
|
|
12987
13118
|
type GPUMapModeFlags = number;
|
|
12988
13119
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12989
13120
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
13121
|
+
type GPUPipelineConstantValue = number;
|
|
12990
13122
|
type GPUSignedOffset32 = number;
|
|
12991
13123
|
type GPUSize32 = number;
|
|
12992
13124
|
type GPUSize32Out = number;
|
|
@@ -13042,14 +13174,19 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
|
|
|
13042
13174
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
13043
13175
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
13044
13176
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
13177
|
+
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
13178
|
+
type GPUAutoLayoutMode = "auto";
|
|
13045
13179
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
13046
13180
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
13047
13181
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
13182
|
+
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
13048
13183
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
13049
13184
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
13050
13185
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
13186
|
+
type GPUFilterMode = "linear" | "nearest";
|
|
13051
13187
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
13052
13188
|
type GPULoadOp = "clear" | "load";
|
|
13189
|
+
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
13053
13190
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
13054
13191
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
13055
13192
|
type GPUStoreOp = "discard" | "store";
|
package/ts5.9/index.d.ts
CHANGED
|
@@ -288,6 +288,12 @@ interface GPUBufferBinding {
|
|
|
288
288
|
size?: GPUSize64;
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
+
interface GPUBufferDescriptor extends GPUObjectDescriptorBase {
|
|
292
|
+
mappedAtCreation?: boolean;
|
|
293
|
+
size: GPUSize64;
|
|
294
|
+
usage: GPUBufferUsageFlags;
|
|
295
|
+
}
|
|
296
|
+
|
|
291
297
|
interface GPUCanvasConfiguration {
|
|
292
298
|
alphaMode?: GPUCanvasAlphaMode;
|
|
293
299
|
colorSpace?: PredefinedColorSpace;
|
|
@@ -312,6 +318,9 @@ interface GPUColorDict {
|
|
|
312
318
|
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
313
319
|
}
|
|
314
320
|
|
|
321
|
+
interface GPUCommandEncoderDescriptor extends GPUObjectDescriptorBase {
|
|
322
|
+
}
|
|
323
|
+
|
|
315
324
|
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
316
325
|
timestampWrites?: GPUComputePassTimestampWrites;
|
|
317
326
|
}
|
|
@@ -322,6 +331,10 @@ interface GPUComputePassTimestampWrites {
|
|
|
322
331
|
querySet: GPUQuerySet;
|
|
323
332
|
}
|
|
324
333
|
|
|
334
|
+
interface GPUComputePipelineDescriptor extends GPUPipelineDescriptorBase {
|
|
335
|
+
compute: GPUProgrammableStage;
|
|
336
|
+
}
|
|
337
|
+
|
|
325
338
|
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
326
339
|
colorSpace?: PredefinedColorSpace;
|
|
327
340
|
premultipliedAlpha?: boolean;
|
|
@@ -358,13 +371,37 @@ interface GPUOrigin3DDict {
|
|
|
358
371
|
z?: GPUIntegerCoordinate;
|
|
359
372
|
}
|
|
360
373
|
|
|
374
|
+
interface GPUPipelineDescriptorBase extends GPUObjectDescriptorBase {
|
|
375
|
+
layout: GPUPipelineLayout | GPUAutoLayoutMode;
|
|
376
|
+
}
|
|
377
|
+
|
|
361
378
|
interface GPUPipelineErrorInit {
|
|
362
379
|
reason: GPUPipelineErrorReason;
|
|
363
380
|
}
|
|
364
381
|
|
|
382
|
+
interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
|
|
383
|
+
bindGroupLayouts: (GPUBindGroupLayout | null)[];
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
interface GPUProgrammableStage {
|
|
387
|
+
constants?: Record<string, GPUPipelineConstantValue>;
|
|
388
|
+
entryPoint?: string;
|
|
389
|
+
module: GPUShaderModule;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
interface GPUQuerySetDescriptor extends GPUObjectDescriptorBase {
|
|
393
|
+
count: GPUSize32;
|
|
394
|
+
type: GPUQueryType;
|
|
395
|
+
}
|
|
396
|
+
|
|
365
397
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
366
398
|
}
|
|
367
399
|
|
|
400
|
+
interface GPURenderBundleEncoderDescriptor extends GPURenderPassLayout {
|
|
401
|
+
depthReadOnly?: boolean;
|
|
402
|
+
stencilReadOnly?: boolean;
|
|
403
|
+
}
|
|
404
|
+
|
|
368
405
|
interface GPURenderPassColorAttachment {
|
|
369
406
|
clearValue?: GPUColor;
|
|
370
407
|
depthSlice?: GPUIntegerCoordinate;
|
|
@@ -394,12 +431,35 @@ interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
|
394
431
|
timestampWrites?: GPURenderPassTimestampWrites;
|
|
395
432
|
}
|
|
396
433
|
|
|
434
|
+
interface GPURenderPassLayout extends GPUObjectDescriptorBase {
|
|
435
|
+
colorFormats: (GPUTextureFormat | null)[];
|
|
436
|
+
depthStencilFormat?: GPUTextureFormat;
|
|
437
|
+
sampleCount?: GPUSize32;
|
|
438
|
+
}
|
|
439
|
+
|
|
397
440
|
interface GPURenderPassTimestampWrites {
|
|
398
441
|
beginningOfPassWriteIndex?: GPUSize32;
|
|
399
442
|
endOfPassWriteIndex?: GPUSize32;
|
|
400
443
|
querySet: GPUQuerySet;
|
|
401
444
|
}
|
|
402
445
|
|
|
446
|
+
interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
|
|
447
|
+
addressModeU?: GPUAddressMode;
|
|
448
|
+
addressModeV?: GPUAddressMode;
|
|
449
|
+
addressModeW?: GPUAddressMode;
|
|
450
|
+
compare?: GPUCompareFunction;
|
|
451
|
+
lodMaxClamp?: number;
|
|
452
|
+
lodMinClamp?: number;
|
|
453
|
+
magFilter?: GPUFilterMode;
|
|
454
|
+
maxAnisotropy?: number;
|
|
455
|
+
minFilter?: GPUFilterMode;
|
|
456
|
+
mipmapFilter?: GPUMipmapFilterMode;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
|
|
460
|
+
code: string;
|
|
461
|
+
}
|
|
462
|
+
|
|
403
463
|
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
404
464
|
buffer: GPUBuffer;
|
|
405
465
|
}
|
|
@@ -417,6 +477,16 @@ interface GPUTexelCopyTextureInfo {
|
|
|
417
477
|
texture: GPUTexture;
|
|
418
478
|
}
|
|
419
479
|
|
|
480
|
+
interface GPUTextureDescriptor extends GPUObjectDescriptorBase {
|
|
481
|
+
dimension?: GPUTextureDimension;
|
|
482
|
+
format: GPUTextureFormat;
|
|
483
|
+
mipLevelCount?: GPUIntegerCoordinate;
|
|
484
|
+
sampleCount?: GPUSize32;
|
|
485
|
+
size: GPUExtent3D;
|
|
486
|
+
usage: GPUTextureUsageFlags;
|
|
487
|
+
viewFormats?: GPUTextureFormat[];
|
|
488
|
+
}
|
|
489
|
+
|
|
420
490
|
interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
|
|
421
491
|
arrayLayerCount?: GPUIntegerCoordinate;
|
|
422
492
|
aspect?: GPUTextureAspect;
|
|
@@ -4787,6 +4857,66 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
|
4787
4857
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
|
|
4788
4858
|
*/
|
|
4789
4859
|
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
4860
|
+
/**
|
|
4861
|
+
* The **`createBuffer()`** method of the GPUDevice interface creates a GPUBuffer in which to store raw data to use in GPU operations.
|
|
4862
|
+
*
|
|
4863
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBuffer)
|
|
4864
|
+
*/
|
|
4865
|
+
createBuffer(descriptor: GPUBufferDescriptor): GPUBuffer;
|
|
4866
|
+
/**
|
|
4867
|
+
* The **`createCommandEncoder()`** method of the GPUDevice interface creates a GPUCommandEncoder, used to encode commands to be issued to the GPU.
|
|
4868
|
+
*
|
|
4869
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createCommandEncoder)
|
|
4870
|
+
*/
|
|
4871
|
+
createCommandEncoder(descriptor?: GPUCommandEncoderDescriptor): GPUCommandEncoder;
|
|
4872
|
+
/**
|
|
4873
|
+
* The **`createComputePipeline()`** method of the GPUDevice interface creates a GPUComputePipeline that can control the compute shader stage and be used in a GPUComputePassEncoder.
|
|
4874
|
+
*
|
|
4875
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipeline)
|
|
4876
|
+
*/
|
|
4877
|
+
createComputePipeline(descriptor: GPUComputePipelineDescriptor): GPUComputePipeline;
|
|
4878
|
+
/**
|
|
4879
|
+
* The **`createComputePipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPUComputePipeline, which can control the compute shader stage and be used in a GPUComputePassEncoder, once the pipeline can be used without any stalling.
|
|
4880
|
+
*
|
|
4881
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createComputePipelineAsync)
|
|
4882
|
+
*/
|
|
4883
|
+
createComputePipelineAsync(descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
|
|
4884
|
+
/**
|
|
4885
|
+
* The **`createPipelineLayout()`** method of the GPUDevice interface creates a GPUPipelineLayout that defines the GPUBindGroupLayouts used by a pipeline. GPUBindGroups used with the pipeline during command encoding must have compatible GPUBindGroupLayouts.
|
|
4886
|
+
*
|
|
4887
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createPipelineLayout)
|
|
4888
|
+
*/
|
|
4889
|
+
createPipelineLayout(descriptor: GPUPipelineLayoutDescriptor): GPUPipelineLayout;
|
|
4890
|
+
/**
|
|
4891
|
+
* The **`createQuerySet()`** method of the GPUDevice interface creates a GPUQuerySet that can be used to record the results of queries on passes, such as occlusion or timestamp queries.
|
|
4892
|
+
*
|
|
4893
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createQuerySet)
|
|
4894
|
+
*/
|
|
4895
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
4896
|
+
/**
|
|
4897
|
+
* The **`createRenderBundleEncoder()`** method of the GPUDevice interface creates a GPURenderBundleEncoder that can be used to pre-record bundles of commands. These can be reused in GPURenderPassEncoders via the executeBundles() method, as many times as required.
|
|
4898
|
+
*
|
|
4899
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
|
|
4900
|
+
*/
|
|
4901
|
+
createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
|
|
4902
|
+
/**
|
|
4903
|
+
* The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
|
|
4904
|
+
*
|
|
4905
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createSampler)
|
|
4906
|
+
*/
|
|
4907
|
+
createSampler(descriptor?: GPUSamplerDescriptor): GPUSampler;
|
|
4908
|
+
/**
|
|
4909
|
+
* The **`createShaderModule()`** method of the GPUDevice interface creates a GPUShaderModule from a string of WGSL source code.
|
|
4910
|
+
*
|
|
4911
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createShaderModule)
|
|
4912
|
+
*/
|
|
4913
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
4914
|
+
/**
|
|
4915
|
+
* The **`createTexture()`** method of the GPUDevice interface creates a GPUTexture in which to store 1D, 2D, or 3D arrays of data, such as images, to use in GPU rendering operations.
|
|
4916
|
+
*
|
|
4917
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createTexture)
|
|
4918
|
+
*/
|
|
4919
|
+
createTexture(descriptor: GPUTextureDescriptor): GPUTexture;
|
|
4790
4920
|
/**
|
|
4791
4921
|
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4792
4922
|
*
|
|
@@ -12977,6 +13107,7 @@ type GLuint = number;
|
|
|
12977
13107
|
type GLuint64 = number;
|
|
12978
13108
|
type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
|
|
12979
13109
|
type GPUBufferDynamicOffset = number;
|
|
13110
|
+
type GPUBufferUsageFlags = number;
|
|
12980
13111
|
type GPUColor = number[] | GPUColorDict;
|
|
12981
13112
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
12982
13113
|
type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
|
|
@@ -12987,6 +13118,7 @@ type GPUIntegerCoordinateOut = number;
|
|
|
12987
13118
|
type GPUMapModeFlags = number;
|
|
12988
13119
|
type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
|
|
12989
13120
|
type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
|
|
13121
|
+
type GPUPipelineConstantValue = number;
|
|
12990
13122
|
type GPUSignedOffset32 = number;
|
|
12991
13123
|
type GPUSize32 = number;
|
|
12992
13124
|
type GPUSize32Out = number;
|
|
@@ -13042,14 +13174,19 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
|
|
|
13042
13174
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
13043
13175
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
13044
13176
|
type FrameType = "auxiliary" | "nested" | "none" | "top-level";
|
|
13177
|
+
type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
|
|
13178
|
+
type GPUAutoLayoutMode = "auto";
|
|
13045
13179
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
13046
13180
|
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
13047
13181
|
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
13182
|
+
type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
|
|
13048
13183
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
13049
13184
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
13050
13185
|
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
13186
|
+
type GPUFilterMode = "linear" | "nearest";
|
|
13051
13187
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
13052
13188
|
type GPULoadOp = "clear" | "load";
|
|
13189
|
+
type GPUMipmapFilterMode = "linear" | "nearest";
|
|
13053
13190
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
13054
13191
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
13055
13192
|
type GPUStoreOp = "discard" | "store";
|