@types/webworker 0.0.58 → 0.0.60

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 CHANGED
@@ -45,4 +45,4 @@ This project does not respect semantic versioning as almost every change could p
45
45
 
46
46
  ## Deploy Metadata
47
47
 
48
- You can read what changed in version 0.0.58 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.58.
48
+ You can read what changed in version 0.0.60 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fwebworker%400.0.60.
package/index.d.ts CHANGED
@@ -365,6 +365,13 @@ interface FontFaceSetLoadEventInit extends EventInit {
365
365
  fontfaces?: FontFace[];
366
366
  }
367
367
 
368
+ interface GPUColorDict {
369
+ a: number;
370
+ b: number;
371
+ g: number;
372
+ r: number;
373
+ }
374
+
368
375
  interface GPUObjectDescriptorBase {
369
376
  label?: string;
370
377
  }
@@ -373,6 +380,9 @@ interface GPUPipelineErrorInit {
373
380
  reason: GPUPipelineErrorReason;
374
381
  }
375
382
 
383
+ interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
384
+ }
385
+
376
386
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
377
387
  arrayLayerCount?: GPUIntegerCoordinate;
378
388
  aspect?: GPUTextureAspect;
@@ -5315,6 +5325,105 @@ declare var GPURenderBundle: {
5315
5325
  new(): GPURenderBundle;
5316
5326
  };
5317
5327
 
5328
+ /**
5329
+ * The **`GPURenderBundleEncoder`** interface of the WebGPU API is used to pre-record bundles of commands.
5330
+ * Available only in secure contexts.
5331
+ *
5332
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
5333
+ */
5334
+ interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
5335
+ /**
5336
+ * The **`finish()`** method of the GPURenderBundleEncoder interface completes recording of the current render bundle command sequence, returning a GPURenderBundle object that can be passed into a GPURenderPassEncoder.executeBundles() call to execute those commands in a specific render pass.
5337
+ *
5338
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish)
5339
+ */
5340
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
5341
+ }
5342
+
5343
+ declare var GPURenderBundleEncoder: {
5344
+ prototype: GPURenderBundleEncoder;
5345
+ new(): GPURenderBundleEncoder;
5346
+ };
5347
+
5348
+ interface GPURenderCommandsMixin {
5349
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
5350
+ draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
5351
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
5352
+ drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
5353
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
5354
+ drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
5355
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
5356
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
5357
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
5358
+ setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
5359
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
5360
+ setPipeline(pipeline: GPURenderPipeline): void;
5361
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
5362
+ setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
5363
+ }
5364
+
5365
+ /**
5366
+ * The **`GPURenderPassEncoder`** interface of the WebGPU API encodes commands related to controlling the vertex and fragment shader stages, as issued by a GPURenderPipeline. It forms part of the overall encoding activity of a GPUCommandEncoder.
5367
+ * Available only in secure contexts.
5368
+ *
5369
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
5370
+ */
5371
+ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
5372
+ /**
5373
+ * The **`beginOcclusionQuery()`** method of the GPURenderPassEncoder interface begins an occlusion query at the specified index of the relevant GPUQuerySet (provided as the value of the occlusionQuerySet descriptor property when invoking GPUCommandEncoder.beginRenderPass() to run the render pass).
5374
+ *
5375
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)
5376
+ */
5377
+ beginOcclusionQuery(queryIndex: GPUSize32): void;
5378
+ /**
5379
+ * The **`end()`** method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence.
5380
+ *
5381
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end)
5382
+ */
5383
+ end(): void;
5384
+ /**
5385
+ * The **`endOcclusionQuery()`** method of the GPURenderPassEncoder interface ends an active occlusion query previously started with beginOcclusionQuery().
5386
+ *
5387
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)
5388
+ */
5389
+ endOcclusionQuery(): void;
5390
+ /**
5391
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
5392
+ *
5393
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
5394
+ */
5395
+ executeBundles(bundles: GPURenderBundle[]): void;
5396
+ /**
5397
+ * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property).
5398
+ *
5399
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
5400
+ */
5401
+ setBlendConstant(color: GPUColor): void;
5402
+ /**
5403
+ * The **`setScissorRect()`** method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded.
5404
+ *
5405
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect)
5406
+ */
5407
+ setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
5408
+ /**
5409
+ * The **`setStencilReference()`** method of the GPURenderPassEncoder interface sets the stencil reference value using during stencil tests with the "replace" stencil operation (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the properties defining the various stencil operations).
5410
+ *
5411
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference)
5412
+ */
5413
+ setStencilReference(reference: GPUStencilValue): void;
5414
+ /**
5415
+ * The **`setViewport()`** method of the GPURenderPassEncoder interface sets the viewport used during the rasterization stage to linearly map from normalized device coordinates to viewport coordinates.
5416
+ *
5417
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport)
5418
+ */
5419
+ setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
5420
+ }
5421
+
5422
+ declare var GPURenderPassEncoder: {
5423
+ prototype: GPURenderPassEncoder;
5424
+ new(): GPURenderPassEncoder;
5425
+ };
5426
+
5318
5427
  /**
5319
5428
  * The **`GPURenderPipeline`** interface of the WebGPU API represents a pipeline that controls the vertex and fragment shader stages and can be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
5320
5429
  * Available only in secure contexts.
@@ -13041,7 +13150,7 @@ interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerG
13041
13150
  */
13042
13151
  readonly self: WorkerGlobalScope & typeof globalThis;
13043
13152
  /**
13044
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
13153
+ * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the scope of a classic worker (a worker constructed from a classic script).
13045
13154
  *
13046
13155
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
13047
13156
  */
@@ -14024,7 +14133,7 @@ declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: Promis
14024
14133
  */
14025
14134
  declare var self: WorkerGlobalScope & typeof globalThis;
14026
14135
  /**
14027
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
14136
+ * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the scope of a classic worker (a worker constructed from a classic script).
14028
14137
  *
14029
14138
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
14030
14139
  */
@@ -14123,15 +14232,18 @@ type GLsizeiptr = number;
14123
14232
  type GLuint = number;
14124
14233
  type GLuint64 = number;
14125
14234
  type GPUBufferDynamicOffset = number;
14235
+ type GPUColor = number[] | GPUColorDict;
14126
14236
  type GPUFlagsConstant = number;
14127
14237
  type GPUIndex32 = number;
14128
14238
  type GPUIntegerCoordinate = number;
14129
14239
  type GPUIntegerCoordinateOut = number;
14130
14240
  type GPUMapModeFlags = number;
14241
+ type GPUSignedOffset32 = number;
14131
14242
  type GPUSize32 = number;
14132
14243
  type GPUSize32Out = number;
14133
14244
  type GPUSize64 = number;
14134
14245
  type GPUSize64Out = number;
14246
+ type GPUStencilValue = number;
14135
14247
  type GPUTextureUsageFlags = number;
14136
14248
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
14137
14249
  type HeadersInit = [string, string][] | Record<string, string> | Headers;
@@ -14193,6 +14305,7 @@ type FrameType = "auxiliary" | "nested" | "none" | "top-level";
14193
14305
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
14194
14306
  type GPUCompilationMessageType = "error" | "info" | "warning";
14195
14307
  type GPUDeviceLostReason = "destroyed" | "unknown";
14308
+ type GPUIndexFormat = "uint16" | "uint32";
14196
14309
  type GPUPipelineErrorReason = "internal" | "validation";
14197
14310
  type GPUQueryType = "occlusion" | "timestamp";
14198
14311
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
@@ -14345,6 +14458,21 @@ interface GPUBindingCommandsMixin {
14345
14458
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void;
14346
14459
  }
14347
14460
 
14461
+ interface GPURenderPassEncoder {
14462
+ /**
14463
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
14464
+ *
14465
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
14466
+ */
14467
+ executeBundles(bundles: GPURenderBundle[]): void;
14468
+ /**
14469
+ * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property).
14470
+ *
14471
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
14472
+ */
14473
+ setBlendConstant(color: number[]): void;
14474
+ }
14475
+
14348
14476
  interface GPUSupportedFeatures extends ReadonlySet<string> {
14349
14477
  }
14350
14478
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/webworker",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "description": "Types for the global scope of Web Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -362,6 +362,13 @@ interface FontFaceSetLoadEventInit extends EventInit {
362
362
  fontfaces?: FontFace[];
363
363
  }
364
364
 
365
+ interface GPUColorDict {
366
+ a: number;
367
+ b: number;
368
+ g: number;
369
+ r: number;
370
+ }
371
+
365
372
  interface GPUObjectDescriptorBase {
366
373
  label?: string;
367
374
  }
@@ -370,6 +377,9 @@ interface GPUPipelineErrorInit {
370
377
  reason: GPUPipelineErrorReason;
371
378
  }
372
379
 
380
+ interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
381
+ }
382
+
373
383
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
374
384
  arrayLayerCount?: GPUIntegerCoordinate;
375
385
  aspect?: GPUTextureAspect;
@@ -5312,6 +5322,105 @@ declare var GPURenderBundle: {
5312
5322
  new(): GPURenderBundle;
5313
5323
  };
5314
5324
 
5325
+ /**
5326
+ * The **`GPURenderBundleEncoder`** interface of the WebGPU API is used to pre-record bundles of commands.
5327
+ * Available only in secure contexts.
5328
+ *
5329
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
5330
+ */
5331
+ interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
5332
+ /**
5333
+ * The **`finish()`** method of the GPURenderBundleEncoder interface completes recording of the current render bundle command sequence, returning a GPURenderBundle object that can be passed into a GPURenderPassEncoder.executeBundles() call to execute those commands in a specific render pass.
5334
+ *
5335
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish)
5336
+ */
5337
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
5338
+ }
5339
+
5340
+ declare var GPURenderBundleEncoder: {
5341
+ prototype: GPURenderBundleEncoder;
5342
+ new(): GPURenderBundleEncoder;
5343
+ };
5344
+
5345
+ interface GPURenderCommandsMixin {
5346
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
5347
+ draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
5348
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
5349
+ drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
5350
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
5351
+ drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
5352
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
5353
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
5354
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
5355
+ setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
5356
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
5357
+ setPipeline(pipeline: GPURenderPipeline): void;
5358
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
5359
+ setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
5360
+ }
5361
+
5362
+ /**
5363
+ * The **`GPURenderPassEncoder`** interface of the WebGPU API encodes commands related to controlling the vertex and fragment shader stages, as issued by a GPURenderPipeline. It forms part of the overall encoding activity of a GPUCommandEncoder.
5364
+ * Available only in secure contexts.
5365
+ *
5366
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
5367
+ */
5368
+ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
5369
+ /**
5370
+ * The **`beginOcclusionQuery()`** method of the GPURenderPassEncoder interface begins an occlusion query at the specified index of the relevant GPUQuerySet (provided as the value of the occlusionQuerySet descriptor property when invoking GPUCommandEncoder.beginRenderPass() to run the render pass).
5371
+ *
5372
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)
5373
+ */
5374
+ beginOcclusionQuery(queryIndex: GPUSize32): void;
5375
+ /**
5376
+ * The **`end()`** method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence.
5377
+ *
5378
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end)
5379
+ */
5380
+ end(): void;
5381
+ /**
5382
+ * The **`endOcclusionQuery()`** method of the GPURenderPassEncoder interface ends an active occlusion query previously started with beginOcclusionQuery().
5383
+ *
5384
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)
5385
+ */
5386
+ endOcclusionQuery(): void;
5387
+ /**
5388
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
5389
+ *
5390
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
5391
+ */
5392
+ executeBundles(bundles: GPURenderBundle[]): void;
5393
+ /**
5394
+ * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property).
5395
+ *
5396
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
5397
+ */
5398
+ setBlendConstant(color: GPUColor): void;
5399
+ /**
5400
+ * The **`setScissorRect()`** method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded.
5401
+ *
5402
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect)
5403
+ */
5404
+ setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
5405
+ /**
5406
+ * The **`setStencilReference()`** method of the GPURenderPassEncoder interface sets the stencil reference value using during stencil tests with the "replace" stencil operation (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the properties defining the various stencil operations).
5407
+ *
5408
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference)
5409
+ */
5410
+ setStencilReference(reference: GPUStencilValue): void;
5411
+ /**
5412
+ * The **`setViewport()`** method of the GPURenderPassEncoder interface sets the viewport used during the rasterization stage to linearly map from normalized device coordinates to viewport coordinates.
5413
+ *
5414
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport)
5415
+ */
5416
+ setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
5417
+ }
5418
+
5419
+ declare var GPURenderPassEncoder: {
5420
+ prototype: GPURenderPassEncoder;
5421
+ new(): GPURenderPassEncoder;
5422
+ };
5423
+
5315
5424
  /**
5316
5425
  * The **`GPURenderPipeline`** interface of the WebGPU API represents a pipeline that controls the vertex and fragment shader stages and can be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
5317
5426
  * Available only in secure contexts.
@@ -13038,7 +13147,7 @@ interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerG
13038
13147
  */
13039
13148
  readonly self: WorkerGlobalScope & typeof globalThis;
13040
13149
  /**
13041
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
13150
+ * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the scope of a classic worker (a worker constructed from a classic script).
13042
13151
  *
13043
13152
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
13044
13153
  */
@@ -14021,7 +14130,7 @@ declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: Promis
14021
14130
  */
14022
14131
  declare var self: WorkerGlobalScope & typeof globalThis;
14023
14132
  /**
14024
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
14133
+ * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the scope of a classic worker (a worker constructed from a classic script).
14025
14134
  *
14026
14135
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
14027
14136
  */
@@ -14120,15 +14229,18 @@ type GLsizeiptr = number;
14120
14229
  type GLuint = number;
14121
14230
  type GLuint64 = number;
14122
14231
  type GPUBufferDynamicOffset = number;
14232
+ type GPUColor = number[] | GPUColorDict;
14123
14233
  type GPUFlagsConstant = number;
14124
14234
  type GPUIndex32 = number;
14125
14235
  type GPUIntegerCoordinate = number;
14126
14236
  type GPUIntegerCoordinateOut = number;
14127
14237
  type GPUMapModeFlags = number;
14238
+ type GPUSignedOffset32 = number;
14128
14239
  type GPUSize32 = number;
14129
14240
  type GPUSize32Out = number;
14130
14241
  type GPUSize64 = number;
14131
14242
  type GPUSize64Out = number;
14243
+ type GPUStencilValue = number;
14132
14244
  type GPUTextureUsageFlags = number;
14133
14245
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
14134
14246
  type HeadersInit = [string, string][] | Record<string, string> | Headers;
@@ -14190,6 +14302,7 @@ type FrameType = "auxiliary" | "nested" | "none" | "top-level";
14190
14302
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
14191
14303
  type GPUCompilationMessageType = "error" | "info" | "warning";
14192
14304
  type GPUDeviceLostReason = "destroyed" | "unknown";
14305
+ type GPUIndexFormat = "uint16" | "uint32";
14193
14306
  type GPUPipelineErrorReason = "internal" | "validation";
14194
14307
  type GPUQueryType = "occlusion" | "timestamp";
14195
14308
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
@@ -83,6 +83,21 @@ interface GPUBindingCommandsMixin {
83
83
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
84
84
  }
85
85
 
86
+ interface GPURenderPassEncoder {
87
+ /**
88
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
89
+ *
90
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
91
+ */
92
+ executeBundles(bundles: Iterable<GPURenderBundle>): void;
93
+ /**
94
+ * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property).
95
+ *
96
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
97
+ */
98
+ setBlendConstant(color: Iterable<number>): void;
99
+ }
100
+
86
101
  interface GPUSupportedFeatures extends ReadonlySet<string> {
87
102
  }
88
103
 
package/ts5.6/index.d.ts CHANGED
@@ -362,6 +362,13 @@ interface FontFaceSetLoadEventInit extends EventInit {
362
362
  fontfaces?: FontFace[];
363
363
  }
364
364
 
365
+ interface GPUColorDict {
366
+ a: number;
367
+ b: number;
368
+ g: number;
369
+ r: number;
370
+ }
371
+
365
372
  interface GPUObjectDescriptorBase {
366
373
  label?: string;
367
374
  }
@@ -370,6 +377,9 @@ interface GPUPipelineErrorInit {
370
377
  reason: GPUPipelineErrorReason;
371
378
  }
372
379
 
380
+ interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
381
+ }
382
+
373
383
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
374
384
  arrayLayerCount?: GPUIntegerCoordinate;
375
385
  aspect?: GPUTextureAspect;
@@ -5312,6 +5322,105 @@ declare var GPURenderBundle: {
5312
5322
  new(): GPURenderBundle;
5313
5323
  };
5314
5324
 
5325
+ /**
5326
+ * The **`GPURenderBundleEncoder`** interface of the WebGPU API is used to pre-record bundles of commands.
5327
+ * Available only in secure contexts.
5328
+ *
5329
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
5330
+ */
5331
+ interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
5332
+ /**
5333
+ * The **`finish()`** method of the GPURenderBundleEncoder interface completes recording of the current render bundle command sequence, returning a GPURenderBundle object that can be passed into a GPURenderPassEncoder.executeBundles() call to execute those commands in a specific render pass.
5334
+ *
5335
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish)
5336
+ */
5337
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
5338
+ }
5339
+
5340
+ declare var GPURenderBundleEncoder: {
5341
+ prototype: GPURenderBundleEncoder;
5342
+ new(): GPURenderBundleEncoder;
5343
+ };
5344
+
5345
+ interface GPURenderCommandsMixin {
5346
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
5347
+ draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
5348
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
5349
+ drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
5350
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
5351
+ drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
5352
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
5353
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
5354
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
5355
+ setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
5356
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
5357
+ setPipeline(pipeline: GPURenderPipeline): void;
5358
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
5359
+ setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
5360
+ }
5361
+
5362
+ /**
5363
+ * The **`GPURenderPassEncoder`** interface of the WebGPU API encodes commands related to controlling the vertex and fragment shader stages, as issued by a GPURenderPipeline. It forms part of the overall encoding activity of a GPUCommandEncoder.
5364
+ * Available only in secure contexts.
5365
+ *
5366
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
5367
+ */
5368
+ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
5369
+ /**
5370
+ * The **`beginOcclusionQuery()`** method of the GPURenderPassEncoder interface begins an occlusion query at the specified index of the relevant GPUQuerySet (provided as the value of the occlusionQuerySet descriptor property when invoking GPUCommandEncoder.beginRenderPass() to run the render pass).
5371
+ *
5372
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)
5373
+ */
5374
+ beginOcclusionQuery(queryIndex: GPUSize32): void;
5375
+ /**
5376
+ * The **`end()`** method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence.
5377
+ *
5378
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end)
5379
+ */
5380
+ end(): void;
5381
+ /**
5382
+ * The **`endOcclusionQuery()`** method of the GPURenderPassEncoder interface ends an active occlusion query previously started with beginOcclusionQuery().
5383
+ *
5384
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)
5385
+ */
5386
+ endOcclusionQuery(): void;
5387
+ /**
5388
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
5389
+ *
5390
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
5391
+ */
5392
+ executeBundles(bundles: GPURenderBundle[]): void;
5393
+ /**
5394
+ * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property).
5395
+ *
5396
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
5397
+ */
5398
+ setBlendConstant(color: GPUColor): void;
5399
+ /**
5400
+ * The **`setScissorRect()`** method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded.
5401
+ *
5402
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect)
5403
+ */
5404
+ setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
5405
+ /**
5406
+ * The **`setStencilReference()`** method of the GPURenderPassEncoder interface sets the stencil reference value using during stencil tests with the "replace" stencil operation (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the properties defining the various stencil operations).
5407
+ *
5408
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference)
5409
+ */
5410
+ setStencilReference(reference: GPUStencilValue): void;
5411
+ /**
5412
+ * The **`setViewport()`** method of the GPURenderPassEncoder interface sets the viewport used during the rasterization stage to linearly map from normalized device coordinates to viewport coordinates.
5413
+ *
5414
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport)
5415
+ */
5416
+ setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
5417
+ }
5418
+
5419
+ declare var GPURenderPassEncoder: {
5420
+ prototype: GPURenderPassEncoder;
5421
+ new(): GPURenderPassEncoder;
5422
+ };
5423
+
5315
5424
  /**
5316
5425
  * The **`GPURenderPipeline`** interface of the WebGPU API represents a pipeline that controls the vertex and fragment shader stages and can be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
5317
5426
  * Available only in secure contexts.
@@ -13038,7 +13147,7 @@ interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerG
13038
13147
  */
13039
13148
  readonly self: WorkerGlobalScope & typeof globalThis;
13040
13149
  /**
13041
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
13150
+ * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the scope of a classic worker (a worker constructed from a classic script).
13042
13151
  *
13043
13152
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
13044
13153
  */
@@ -14021,7 +14130,7 @@ declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: Promis
14021
14130
  */
14022
14131
  declare var self: WorkerGlobalScope & typeof globalThis;
14023
14132
  /**
14024
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
14133
+ * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the scope of a classic worker (a worker constructed from a classic script).
14025
14134
  *
14026
14135
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
14027
14136
  */
@@ -14120,15 +14229,18 @@ type GLsizeiptr = number;
14120
14229
  type GLuint = number;
14121
14230
  type GLuint64 = number;
14122
14231
  type GPUBufferDynamicOffset = number;
14232
+ type GPUColor = number[] | GPUColorDict;
14123
14233
  type GPUFlagsConstant = number;
14124
14234
  type GPUIndex32 = number;
14125
14235
  type GPUIntegerCoordinate = number;
14126
14236
  type GPUIntegerCoordinateOut = number;
14127
14237
  type GPUMapModeFlags = number;
14238
+ type GPUSignedOffset32 = number;
14128
14239
  type GPUSize32 = number;
14129
14240
  type GPUSize32Out = number;
14130
14241
  type GPUSize64 = number;
14131
14242
  type GPUSize64Out = number;
14243
+ type GPUStencilValue = number;
14132
14244
  type GPUTextureUsageFlags = number;
14133
14245
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
14134
14246
  type HeadersInit = [string, string][] | Record<string, string> | Headers;
@@ -14190,6 +14302,7 @@ type FrameType = "auxiliary" | "nested" | "none" | "top-level";
14190
14302
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
14191
14303
  type GPUCompilationMessageType = "error" | "info" | "warning";
14192
14304
  type GPUDeviceLostReason = "destroyed" | "unknown";
14305
+ type GPUIndexFormat = "uint16" | "uint32";
14193
14306
  type GPUPipelineErrorReason = "internal" | "validation";
14194
14307
  type GPUQueryType = "occlusion" | "timestamp";
14195
14308
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
@@ -87,6 +87,21 @@ interface GPUBindingCommandsMixin {
87
87
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
88
88
  }
89
89
 
90
+ interface GPURenderPassEncoder {
91
+ /**
92
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
93
+ *
94
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
95
+ */
96
+ executeBundles(bundles: Iterable<GPURenderBundle>): void;
97
+ /**
98
+ * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property).
99
+ *
100
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
101
+ */
102
+ setBlendConstant(color: Iterable<number>): void;
103
+ }
104
+
90
105
  interface GPUSupportedFeatures extends ReadonlySet<string> {
91
106
  }
92
107
 
package/ts5.9/index.d.ts CHANGED
@@ -362,6 +362,13 @@ interface FontFaceSetLoadEventInit extends EventInit {
362
362
  fontfaces?: FontFace[];
363
363
  }
364
364
 
365
+ interface GPUColorDict {
366
+ a: number;
367
+ b: number;
368
+ g: number;
369
+ r: number;
370
+ }
371
+
365
372
  interface GPUObjectDescriptorBase {
366
373
  label?: string;
367
374
  }
@@ -370,6 +377,9 @@ interface GPUPipelineErrorInit {
370
377
  reason: GPUPipelineErrorReason;
371
378
  }
372
379
 
380
+ interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
381
+ }
382
+
373
383
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
374
384
  arrayLayerCount?: GPUIntegerCoordinate;
375
385
  aspect?: GPUTextureAspect;
@@ -5312,6 +5322,105 @@ declare var GPURenderBundle: {
5312
5322
  new(): GPURenderBundle;
5313
5323
  };
5314
5324
 
5325
+ /**
5326
+ * The **`GPURenderBundleEncoder`** interface of the WebGPU API is used to pre-record bundles of commands.
5327
+ * Available only in secure contexts.
5328
+ *
5329
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
5330
+ */
5331
+ interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
5332
+ /**
5333
+ * The **`finish()`** method of the GPURenderBundleEncoder interface completes recording of the current render bundle command sequence, returning a GPURenderBundle object that can be passed into a GPURenderPassEncoder.executeBundles() call to execute those commands in a specific render pass.
5334
+ *
5335
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish)
5336
+ */
5337
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
5338
+ }
5339
+
5340
+ declare var GPURenderBundleEncoder: {
5341
+ prototype: GPURenderBundleEncoder;
5342
+ new(): GPURenderBundleEncoder;
5343
+ };
5344
+
5345
+ interface GPURenderCommandsMixin {
5346
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
5347
+ draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
5348
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
5349
+ drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
5350
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
5351
+ drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
5352
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
5353
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
5354
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
5355
+ setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
5356
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
5357
+ setPipeline(pipeline: GPURenderPipeline): void;
5358
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
5359
+ setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
5360
+ }
5361
+
5362
+ /**
5363
+ * The **`GPURenderPassEncoder`** interface of the WebGPU API encodes commands related to controlling the vertex and fragment shader stages, as issued by a GPURenderPipeline. It forms part of the overall encoding activity of a GPUCommandEncoder.
5364
+ * Available only in secure contexts.
5365
+ *
5366
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
5367
+ */
5368
+ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
5369
+ /**
5370
+ * The **`beginOcclusionQuery()`** method of the GPURenderPassEncoder interface begins an occlusion query at the specified index of the relevant GPUQuerySet (provided as the value of the occlusionQuerySet descriptor property when invoking GPUCommandEncoder.beginRenderPass() to run the render pass).
5371
+ *
5372
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)
5373
+ */
5374
+ beginOcclusionQuery(queryIndex: GPUSize32): void;
5375
+ /**
5376
+ * The **`end()`** method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence.
5377
+ *
5378
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end)
5379
+ */
5380
+ end(): void;
5381
+ /**
5382
+ * The **`endOcclusionQuery()`** method of the GPURenderPassEncoder interface ends an active occlusion query previously started with beginOcclusionQuery().
5383
+ *
5384
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)
5385
+ */
5386
+ endOcclusionQuery(): void;
5387
+ /**
5388
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
5389
+ *
5390
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
5391
+ */
5392
+ executeBundles(bundles: GPURenderBundle[]): void;
5393
+ /**
5394
+ * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property).
5395
+ *
5396
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
5397
+ */
5398
+ setBlendConstant(color: GPUColor): void;
5399
+ /**
5400
+ * The **`setScissorRect()`** method of the GPURenderPassEncoder interface sets the scissor rectangle used during the rasterization stage. After transformation into viewport coordinates any fragments that fall outside the scissor rectangle will be discarded.
5401
+ *
5402
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect)
5403
+ */
5404
+ setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
5405
+ /**
5406
+ * The **`setStencilReference()`** method of the GPURenderPassEncoder interface sets the stencil reference value using during stencil tests with the "replace" stencil operation (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the properties defining the various stencil operations).
5407
+ *
5408
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference)
5409
+ */
5410
+ setStencilReference(reference: GPUStencilValue): void;
5411
+ /**
5412
+ * The **`setViewport()`** method of the GPURenderPassEncoder interface sets the viewport used during the rasterization stage to linearly map from normalized device coordinates to viewport coordinates.
5413
+ *
5414
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport)
5415
+ */
5416
+ setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
5417
+ }
5418
+
5419
+ declare var GPURenderPassEncoder: {
5420
+ prototype: GPURenderPassEncoder;
5421
+ new(): GPURenderPassEncoder;
5422
+ };
5423
+
5315
5424
  /**
5316
5425
  * The **`GPURenderPipeline`** interface of the WebGPU API represents a pipeline that controls the vertex and fragment shader stages and can be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
5317
5426
  * Available only in secure contexts.
@@ -13038,7 +13147,7 @@ interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerG
13038
13147
  */
13039
13148
  readonly self: WorkerGlobalScope & typeof globalThis;
13040
13149
  /**
13041
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
13150
+ * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the scope of a classic worker (a worker constructed from a classic script).
13042
13151
  *
13043
13152
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
13044
13153
  */
@@ -14021,7 +14130,7 @@ declare var onunhandledrejection: ((this: DedicatedWorkerGlobalScope, ev: Promis
14021
14130
  */
14022
14131
  declare var self: WorkerGlobalScope & typeof globalThis;
14023
14132
  /**
14024
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
14133
+ * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the scope of a classic worker (a worker constructed from a classic script).
14025
14134
  *
14026
14135
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
14027
14136
  */
@@ -14120,15 +14229,18 @@ type GLsizeiptr = number;
14120
14229
  type GLuint = number;
14121
14230
  type GLuint64 = number;
14122
14231
  type GPUBufferDynamicOffset = number;
14232
+ type GPUColor = number[] | GPUColorDict;
14123
14233
  type GPUFlagsConstant = number;
14124
14234
  type GPUIndex32 = number;
14125
14235
  type GPUIntegerCoordinate = number;
14126
14236
  type GPUIntegerCoordinateOut = number;
14127
14237
  type GPUMapModeFlags = number;
14238
+ type GPUSignedOffset32 = number;
14128
14239
  type GPUSize32 = number;
14129
14240
  type GPUSize32Out = number;
14130
14241
  type GPUSize64 = number;
14131
14242
  type GPUSize64Out = number;
14243
+ type GPUStencilValue = number;
14132
14244
  type GPUTextureUsageFlags = number;
14133
14245
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
14134
14246
  type HeadersInit = [string, string][] | Record<string, string> | Headers;
@@ -14190,6 +14302,7 @@ type FrameType = "auxiliary" | "nested" | "none" | "top-level";
14190
14302
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
14191
14303
  type GPUCompilationMessageType = "error" | "info" | "warning";
14192
14304
  type GPUDeviceLostReason = "destroyed" | "unknown";
14305
+ type GPUIndexFormat = "uint16" | "uint32";
14193
14306
  type GPUPipelineErrorReason = "internal" | "validation";
14194
14307
  type GPUQueryType = "occlusion" | "timestamp";
14195
14308
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
@@ -87,6 +87,21 @@ interface GPUBindingCommandsMixin {
87
87
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
88
88
  }
89
89
 
90
+ interface GPURenderPassEncoder {
91
+ /**
92
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
93
+ *
94
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
95
+ */
96
+ executeBundles(bundles: Iterable<GPURenderBundle>): void;
97
+ /**
98
+ * The **`setBlendConstant()`** method of the GPURenderPassEncoder interface sets the constant blend color and alpha values used with "constant" and "one-minus-constant" blend factors (as set in the descriptor of the GPUDevice.createRenderPipeline() method, in the blend property).
99
+ *
100
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
101
+ */
102
+ setBlendConstant(color: Iterable<number>): void;
103
+ }
104
+
90
105
  interface GPUSupportedFeatures extends ReadonlySet<string> {
91
106
  }
92
107