@types/sharedworker 0.0.208 → 0.0.210

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
@@ -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.208 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.208.
31
+ You can read what changed in version 0.0.210 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fsharedworker%400.0.210.
package/index.d.ts CHANGED
@@ -219,6 +219,13 @@ interface FontFaceSetLoadEventInit extends EventInit {
219
219
  fontfaces?: FontFace[];
220
220
  }
221
221
 
222
+ interface GPUColorDict {
223
+ a: number;
224
+ b: number;
225
+ g: number;
226
+ r: number;
227
+ }
228
+
222
229
  interface GPUObjectDescriptorBase {
223
230
  label?: string;
224
231
  }
@@ -227,6 +234,9 @@ interface GPUPipelineErrorInit {
227
234
  reason: GPUPipelineErrorReason;
228
235
  }
229
236
 
237
+ interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
238
+ }
239
+
230
240
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
231
241
  arrayLayerCount?: GPUIntegerCoordinate;
232
242
  aspect?: GPUTextureAspect;
@@ -4296,6 +4306,105 @@ declare var GPURenderBundle: {
4296
4306
  new(): GPURenderBundle;
4297
4307
  };
4298
4308
 
4309
+ /**
4310
+ * The **`GPURenderBundleEncoder`** interface of the WebGPU API is used to pre-record bundles of commands.
4311
+ * Available only in secure contexts.
4312
+ *
4313
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
4314
+ */
4315
+ interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
4316
+ /**
4317
+ * 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.
4318
+ *
4319
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish)
4320
+ */
4321
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
4322
+ }
4323
+
4324
+ declare var GPURenderBundleEncoder: {
4325
+ prototype: GPURenderBundleEncoder;
4326
+ new(): GPURenderBundleEncoder;
4327
+ };
4328
+
4329
+ interface GPURenderCommandsMixin {
4330
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
4331
+ draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
4332
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
4333
+ drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
4334
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
4335
+ drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
4336
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
4337
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
4338
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
4339
+ setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
4340
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
4341
+ setPipeline(pipeline: GPURenderPipeline): void;
4342
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
4343
+ setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
4344
+ }
4345
+
4346
+ /**
4347
+ * 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.
4348
+ * Available only in secure contexts.
4349
+ *
4350
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
4351
+ */
4352
+ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
4353
+ /**
4354
+ * 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).
4355
+ *
4356
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)
4357
+ */
4358
+ beginOcclusionQuery(queryIndex: GPUSize32): void;
4359
+ /**
4360
+ * The **`end()`** method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence.
4361
+ *
4362
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end)
4363
+ */
4364
+ end(): void;
4365
+ /**
4366
+ * The **`endOcclusionQuery()`** method of the GPURenderPassEncoder interface ends an active occlusion query previously started with beginOcclusionQuery().
4367
+ *
4368
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)
4369
+ */
4370
+ endOcclusionQuery(): void;
4371
+ /**
4372
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
4373
+ *
4374
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
4375
+ */
4376
+ executeBundles(bundles: GPURenderBundle[]): void;
4377
+ /**
4378
+ * 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).
4379
+ *
4380
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
4381
+ */
4382
+ setBlendConstant(color: GPUColor): void;
4383
+ /**
4384
+ * 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.
4385
+ *
4386
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect)
4387
+ */
4388
+ setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
4389
+ /**
4390
+ * 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).
4391
+ *
4392
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference)
4393
+ */
4394
+ setStencilReference(reference: GPUStencilValue): void;
4395
+ /**
4396
+ * 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.
4397
+ *
4398
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport)
4399
+ */
4400
+ setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
4401
+ }
4402
+
4403
+ declare var GPURenderPassEncoder: {
4404
+ prototype: GPURenderPassEncoder;
4405
+ new(): GPURenderPassEncoder;
4406
+ };
4407
+
4299
4408
  /**
4300
4409
  * 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.
4301
4410
  * Available only in secure contexts.
@@ -11074,7 +11183,7 @@ interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerG
11074
11183
  */
11075
11184
  readonly self: WorkerGlobalScope & typeof globalThis;
11076
11185
  /**
11077
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
11186
+ * 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).
11078
11187
  *
11079
11188
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
11080
11189
  */
@@ -12026,7 +12135,7 @@ declare var onunhandledrejection: ((this: SharedWorkerGlobalScope, ev: PromiseRe
12026
12135
  */
12027
12136
  declare var self: WorkerGlobalScope & typeof globalThis;
12028
12137
  /**
12029
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
12138
+ * 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).
12030
12139
  *
12031
12140
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
12032
12141
  */
@@ -12116,15 +12225,18 @@ type GLsizeiptr = number;
12116
12225
  type GLuint = number;
12117
12226
  type GLuint64 = number;
12118
12227
  type GPUBufferDynamicOffset = number;
12228
+ type GPUColor = number[] | GPUColorDict;
12119
12229
  type GPUFlagsConstant = number;
12120
12230
  type GPUIndex32 = number;
12121
12231
  type GPUIntegerCoordinate = number;
12122
12232
  type GPUIntegerCoordinateOut = number;
12123
12233
  type GPUMapModeFlags = number;
12234
+ type GPUSignedOffset32 = number;
12124
12235
  type GPUSize32 = number;
12125
12236
  type GPUSize32Out = number;
12126
12237
  type GPUSize64 = number;
12127
12238
  type GPUSize64Out = number;
12239
+ type GPUStencilValue = number;
12128
12240
  type GPUTextureUsageFlags = number;
12129
12241
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
12130
12242
  type HeadersInit = [string, string][] | Record<string, string> | Headers;
@@ -12173,6 +12285,7 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
12173
12285
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12174
12286
  type GPUCompilationMessageType = "error" | "info" | "warning";
12175
12287
  type GPUDeviceLostReason = "destroyed" | "unknown";
12288
+ type GPUIndexFormat = "uint16" | "uint32";
12176
12289
  type GPUPipelineErrorReason = "internal" | "validation";
12177
12290
  type GPUQueryType = "occlusion" | "timestamp";
12178
12291
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
@@ -12301,6 +12414,21 @@ interface GPUBindingCommandsMixin {
12301
12414
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: GPUBufferDynamicOffset[]): void;
12302
12415
  }
12303
12416
 
12417
+ interface GPURenderPassEncoder {
12418
+ /**
12419
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
12420
+ *
12421
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
12422
+ */
12423
+ executeBundles(bundles: GPURenderBundle[]): void;
12424
+ /**
12425
+ * 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).
12426
+ *
12427
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
12428
+ */
12429
+ setBlendConstant(color: number[]): void;
12430
+ }
12431
+
12304
12432
  interface GPUSupportedFeatures extends ReadonlySet<string> {
12305
12433
  }
12306
12434
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/sharedworker",
3
- "version": "0.0.208",
3
+ "version": "0.0.210",
4
4
  "description": "Types for the global scope of Shared Workers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -216,6 +216,13 @@ interface FontFaceSetLoadEventInit extends EventInit {
216
216
  fontfaces?: FontFace[];
217
217
  }
218
218
 
219
+ interface GPUColorDict {
220
+ a: number;
221
+ b: number;
222
+ g: number;
223
+ r: number;
224
+ }
225
+
219
226
  interface GPUObjectDescriptorBase {
220
227
  label?: string;
221
228
  }
@@ -224,6 +231,9 @@ interface GPUPipelineErrorInit {
224
231
  reason: GPUPipelineErrorReason;
225
232
  }
226
233
 
234
+ interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
235
+ }
236
+
227
237
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
228
238
  arrayLayerCount?: GPUIntegerCoordinate;
229
239
  aspect?: GPUTextureAspect;
@@ -4293,6 +4303,105 @@ declare var GPURenderBundle: {
4293
4303
  new(): GPURenderBundle;
4294
4304
  };
4295
4305
 
4306
+ /**
4307
+ * The **`GPURenderBundleEncoder`** interface of the WebGPU API is used to pre-record bundles of commands.
4308
+ * Available only in secure contexts.
4309
+ *
4310
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
4311
+ */
4312
+ interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
4313
+ /**
4314
+ * 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.
4315
+ *
4316
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish)
4317
+ */
4318
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
4319
+ }
4320
+
4321
+ declare var GPURenderBundleEncoder: {
4322
+ prototype: GPURenderBundleEncoder;
4323
+ new(): GPURenderBundleEncoder;
4324
+ };
4325
+
4326
+ interface GPURenderCommandsMixin {
4327
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
4328
+ draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
4329
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
4330
+ drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
4331
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
4332
+ drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
4333
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
4334
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
4335
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
4336
+ setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
4337
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
4338
+ setPipeline(pipeline: GPURenderPipeline): void;
4339
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
4340
+ setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
4341
+ }
4342
+
4343
+ /**
4344
+ * 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.
4345
+ * Available only in secure contexts.
4346
+ *
4347
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
4348
+ */
4349
+ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
4350
+ /**
4351
+ * 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).
4352
+ *
4353
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)
4354
+ */
4355
+ beginOcclusionQuery(queryIndex: GPUSize32): void;
4356
+ /**
4357
+ * The **`end()`** method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence.
4358
+ *
4359
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end)
4360
+ */
4361
+ end(): void;
4362
+ /**
4363
+ * The **`endOcclusionQuery()`** method of the GPURenderPassEncoder interface ends an active occlusion query previously started with beginOcclusionQuery().
4364
+ *
4365
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)
4366
+ */
4367
+ endOcclusionQuery(): void;
4368
+ /**
4369
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
4370
+ *
4371
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
4372
+ */
4373
+ executeBundles(bundles: GPURenderBundle[]): void;
4374
+ /**
4375
+ * 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).
4376
+ *
4377
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
4378
+ */
4379
+ setBlendConstant(color: GPUColor): void;
4380
+ /**
4381
+ * 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.
4382
+ *
4383
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect)
4384
+ */
4385
+ setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
4386
+ /**
4387
+ * 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).
4388
+ *
4389
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference)
4390
+ */
4391
+ setStencilReference(reference: GPUStencilValue): void;
4392
+ /**
4393
+ * 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.
4394
+ *
4395
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport)
4396
+ */
4397
+ setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
4398
+ }
4399
+
4400
+ declare var GPURenderPassEncoder: {
4401
+ prototype: GPURenderPassEncoder;
4402
+ new(): GPURenderPassEncoder;
4403
+ };
4404
+
4296
4405
  /**
4297
4406
  * 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.
4298
4407
  * Available only in secure contexts.
@@ -11071,7 +11180,7 @@ interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerG
11071
11180
  */
11072
11181
  readonly self: WorkerGlobalScope & typeof globalThis;
11073
11182
  /**
11074
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
11183
+ * 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).
11075
11184
  *
11076
11185
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
11077
11186
  */
@@ -12023,7 +12132,7 @@ declare var onunhandledrejection: ((this: SharedWorkerGlobalScope, ev: PromiseRe
12023
12132
  */
12024
12133
  declare var self: WorkerGlobalScope & typeof globalThis;
12025
12134
  /**
12026
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
12135
+ * 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).
12027
12136
  *
12028
12137
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
12029
12138
  */
@@ -12113,15 +12222,18 @@ type GLsizeiptr = number;
12113
12222
  type GLuint = number;
12114
12223
  type GLuint64 = number;
12115
12224
  type GPUBufferDynamicOffset = number;
12225
+ type GPUColor = number[] | GPUColorDict;
12116
12226
  type GPUFlagsConstant = number;
12117
12227
  type GPUIndex32 = number;
12118
12228
  type GPUIntegerCoordinate = number;
12119
12229
  type GPUIntegerCoordinateOut = number;
12120
12230
  type GPUMapModeFlags = number;
12231
+ type GPUSignedOffset32 = number;
12121
12232
  type GPUSize32 = number;
12122
12233
  type GPUSize32Out = number;
12123
12234
  type GPUSize64 = number;
12124
12235
  type GPUSize64Out = number;
12236
+ type GPUStencilValue = number;
12125
12237
  type GPUTextureUsageFlags = number;
12126
12238
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
12127
12239
  type HeadersInit = [string, string][] | Record<string, string> | Headers;
@@ -12170,6 +12282,7 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
12170
12282
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12171
12283
  type GPUCompilationMessageType = "error" | "info" | "warning";
12172
12284
  type GPUDeviceLostReason = "destroyed" | "unknown";
12285
+ type GPUIndexFormat = "uint16" | "uint32";
12173
12286
  type GPUPipelineErrorReason = "internal" | "validation";
12174
12287
  type GPUQueryType = "occlusion" | "timestamp";
12175
12288
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
@@ -68,6 +68,21 @@ interface GPUBindingCommandsMixin {
68
68
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
69
69
  }
70
70
 
71
+ interface GPURenderPassEncoder {
72
+ /**
73
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
74
+ *
75
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
76
+ */
77
+ executeBundles(bundles: Iterable<GPURenderBundle>): void;
78
+ /**
79
+ * 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).
80
+ *
81
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
82
+ */
83
+ setBlendConstant(color: Iterable<number>): void;
84
+ }
85
+
71
86
  interface GPUSupportedFeatures extends ReadonlySet<string> {
72
87
  }
73
88
 
package/ts5.6/index.d.ts CHANGED
@@ -216,6 +216,13 @@ interface FontFaceSetLoadEventInit extends EventInit {
216
216
  fontfaces?: FontFace[];
217
217
  }
218
218
 
219
+ interface GPUColorDict {
220
+ a: number;
221
+ b: number;
222
+ g: number;
223
+ r: number;
224
+ }
225
+
219
226
  interface GPUObjectDescriptorBase {
220
227
  label?: string;
221
228
  }
@@ -224,6 +231,9 @@ interface GPUPipelineErrorInit {
224
231
  reason: GPUPipelineErrorReason;
225
232
  }
226
233
 
234
+ interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
235
+ }
236
+
227
237
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
228
238
  arrayLayerCount?: GPUIntegerCoordinate;
229
239
  aspect?: GPUTextureAspect;
@@ -4293,6 +4303,105 @@ declare var GPURenderBundle: {
4293
4303
  new(): GPURenderBundle;
4294
4304
  };
4295
4305
 
4306
+ /**
4307
+ * The **`GPURenderBundleEncoder`** interface of the WebGPU API is used to pre-record bundles of commands.
4308
+ * Available only in secure contexts.
4309
+ *
4310
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
4311
+ */
4312
+ interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
4313
+ /**
4314
+ * 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.
4315
+ *
4316
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish)
4317
+ */
4318
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
4319
+ }
4320
+
4321
+ declare var GPURenderBundleEncoder: {
4322
+ prototype: GPURenderBundleEncoder;
4323
+ new(): GPURenderBundleEncoder;
4324
+ };
4325
+
4326
+ interface GPURenderCommandsMixin {
4327
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
4328
+ draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
4329
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
4330
+ drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
4331
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
4332
+ drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
4333
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
4334
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
4335
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
4336
+ setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
4337
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
4338
+ setPipeline(pipeline: GPURenderPipeline): void;
4339
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
4340
+ setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
4341
+ }
4342
+
4343
+ /**
4344
+ * 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.
4345
+ * Available only in secure contexts.
4346
+ *
4347
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
4348
+ */
4349
+ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
4350
+ /**
4351
+ * 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).
4352
+ *
4353
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)
4354
+ */
4355
+ beginOcclusionQuery(queryIndex: GPUSize32): void;
4356
+ /**
4357
+ * The **`end()`** method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence.
4358
+ *
4359
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end)
4360
+ */
4361
+ end(): void;
4362
+ /**
4363
+ * The **`endOcclusionQuery()`** method of the GPURenderPassEncoder interface ends an active occlusion query previously started with beginOcclusionQuery().
4364
+ *
4365
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)
4366
+ */
4367
+ endOcclusionQuery(): void;
4368
+ /**
4369
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
4370
+ *
4371
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
4372
+ */
4373
+ executeBundles(bundles: GPURenderBundle[]): void;
4374
+ /**
4375
+ * 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).
4376
+ *
4377
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
4378
+ */
4379
+ setBlendConstant(color: GPUColor): void;
4380
+ /**
4381
+ * 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.
4382
+ *
4383
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect)
4384
+ */
4385
+ setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
4386
+ /**
4387
+ * 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).
4388
+ *
4389
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference)
4390
+ */
4391
+ setStencilReference(reference: GPUStencilValue): void;
4392
+ /**
4393
+ * 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.
4394
+ *
4395
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport)
4396
+ */
4397
+ setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
4398
+ }
4399
+
4400
+ declare var GPURenderPassEncoder: {
4401
+ prototype: GPURenderPassEncoder;
4402
+ new(): GPURenderPassEncoder;
4403
+ };
4404
+
4296
4405
  /**
4297
4406
  * 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.
4298
4407
  * Available only in secure contexts.
@@ -11071,7 +11180,7 @@ interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerG
11071
11180
  */
11072
11181
  readonly self: WorkerGlobalScope & typeof globalThis;
11073
11182
  /**
11074
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
11183
+ * 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).
11075
11184
  *
11076
11185
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
11077
11186
  */
@@ -12023,7 +12132,7 @@ declare var onunhandledrejection: ((this: SharedWorkerGlobalScope, ev: PromiseRe
12023
12132
  */
12024
12133
  declare var self: WorkerGlobalScope & typeof globalThis;
12025
12134
  /**
12026
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
12135
+ * 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).
12027
12136
  *
12028
12137
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
12029
12138
  */
@@ -12113,15 +12222,18 @@ type GLsizeiptr = number;
12113
12222
  type GLuint = number;
12114
12223
  type GLuint64 = number;
12115
12224
  type GPUBufferDynamicOffset = number;
12225
+ type GPUColor = number[] | GPUColorDict;
12116
12226
  type GPUFlagsConstant = number;
12117
12227
  type GPUIndex32 = number;
12118
12228
  type GPUIntegerCoordinate = number;
12119
12229
  type GPUIntegerCoordinateOut = number;
12120
12230
  type GPUMapModeFlags = number;
12231
+ type GPUSignedOffset32 = number;
12121
12232
  type GPUSize32 = number;
12122
12233
  type GPUSize32Out = number;
12123
12234
  type GPUSize64 = number;
12124
12235
  type GPUSize64Out = number;
12236
+ type GPUStencilValue = number;
12125
12237
  type GPUTextureUsageFlags = number;
12126
12238
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
12127
12239
  type HeadersInit = [string, string][] | Record<string, string> | Headers;
@@ -12170,6 +12282,7 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
12170
12282
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12171
12283
  type GPUCompilationMessageType = "error" | "info" | "warning";
12172
12284
  type GPUDeviceLostReason = "destroyed" | "unknown";
12285
+ type GPUIndexFormat = "uint16" | "uint32";
12173
12286
  type GPUPipelineErrorReason = "internal" | "validation";
12174
12287
  type GPUQueryType = "occlusion" | "timestamp";
12175
12288
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
@@ -72,6 +72,21 @@ interface GPUBindingCommandsMixin {
72
72
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
73
73
  }
74
74
 
75
+ interface GPURenderPassEncoder {
76
+ /**
77
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
78
+ *
79
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
80
+ */
81
+ executeBundles(bundles: Iterable<GPURenderBundle>): void;
82
+ /**
83
+ * 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).
84
+ *
85
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
86
+ */
87
+ setBlendConstant(color: Iterable<number>): void;
88
+ }
89
+
75
90
  interface GPUSupportedFeatures extends ReadonlySet<string> {
76
91
  }
77
92
 
package/ts5.9/index.d.ts CHANGED
@@ -216,6 +216,13 @@ interface FontFaceSetLoadEventInit extends EventInit {
216
216
  fontfaces?: FontFace[];
217
217
  }
218
218
 
219
+ interface GPUColorDict {
220
+ a: number;
221
+ b: number;
222
+ g: number;
223
+ r: number;
224
+ }
225
+
219
226
  interface GPUObjectDescriptorBase {
220
227
  label?: string;
221
228
  }
@@ -224,6 +231,9 @@ interface GPUPipelineErrorInit {
224
231
  reason: GPUPipelineErrorReason;
225
232
  }
226
233
 
234
+ interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
235
+ }
236
+
227
237
  interface GPUTextureViewDescriptor extends GPUObjectDescriptorBase {
228
238
  arrayLayerCount?: GPUIntegerCoordinate;
229
239
  aspect?: GPUTextureAspect;
@@ -4293,6 +4303,105 @@ declare var GPURenderBundle: {
4293
4303
  new(): GPURenderBundle;
4294
4304
  };
4295
4305
 
4306
+ /**
4307
+ * The **`GPURenderBundleEncoder`** interface of the WebGPU API is used to pre-record bundles of commands.
4308
+ * Available only in secure contexts.
4309
+ *
4310
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder)
4311
+ */
4312
+ interface GPURenderBundleEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
4313
+ /**
4314
+ * 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.
4315
+ *
4316
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/finish)
4317
+ */
4318
+ finish(descriptor?: GPURenderBundleDescriptor): GPURenderBundle;
4319
+ }
4320
+
4321
+ declare var GPURenderBundleEncoder: {
4322
+ prototype: GPURenderBundleEncoder;
4323
+ new(): GPURenderBundleEncoder;
4324
+ };
4325
+
4326
+ interface GPURenderCommandsMixin {
4327
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/draw) */
4328
+ draw(vertexCount: GPUSize32, instanceCount?: GPUSize32, firstVertex?: GPUSize32, firstInstance?: GPUSize32): void;
4329
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexed) */
4330
+ drawIndexed(indexCount: GPUSize32, instanceCount?: GPUSize32, firstIndex?: GPUSize32, baseVertex?: GPUSignedOffset32, firstInstance?: GPUSize32): void;
4331
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndexedIndirect) */
4332
+ drawIndexedIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
4333
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/drawIndirect) */
4334
+ drawIndirect(indirectBuffer: GPUBuffer, indirectOffset: GPUSize64): void;
4335
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setIndexBuffer) */
4336
+ setIndexBuffer(buffer: GPUBuffer, indexFormat: GPUIndexFormat, offset?: GPUSize64, size?: GPUSize64): void;
4337
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setPipeline) */
4338
+ setPipeline(pipeline: GPURenderPipeline): void;
4339
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderBundleEncoder/setVertexBuffer) */
4340
+ setVertexBuffer(slot: GPUIndex32, buffer: GPUBuffer | null, offset?: GPUSize64, size?: GPUSize64): void;
4341
+ }
4342
+
4343
+ /**
4344
+ * 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.
4345
+ * Available only in secure contexts.
4346
+ *
4347
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder)
4348
+ */
4349
+ interface GPURenderPassEncoder extends GPUBindingCommandsMixin, GPUDebugCommandsMixin, GPUObjectBase, GPURenderCommandsMixin {
4350
+ /**
4351
+ * 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).
4352
+ *
4353
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/beginOcclusionQuery)
4354
+ */
4355
+ beginOcclusionQuery(queryIndex: GPUSize32): void;
4356
+ /**
4357
+ * The **`end()`** method of the GPURenderPassEncoder interface completes recording of the current render pass command sequence.
4358
+ *
4359
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/end)
4360
+ */
4361
+ end(): void;
4362
+ /**
4363
+ * The **`endOcclusionQuery()`** method of the GPURenderPassEncoder interface ends an active occlusion query previously started with beginOcclusionQuery().
4364
+ *
4365
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/endOcclusionQuery)
4366
+ */
4367
+ endOcclusionQuery(): void;
4368
+ /**
4369
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
4370
+ *
4371
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
4372
+ */
4373
+ executeBundles(bundles: GPURenderBundle[]): void;
4374
+ /**
4375
+ * 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).
4376
+ *
4377
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
4378
+ */
4379
+ setBlendConstant(color: GPUColor): void;
4380
+ /**
4381
+ * 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.
4382
+ *
4383
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setScissorRect)
4384
+ */
4385
+ setScissorRect(x: GPUIntegerCoordinate, y: GPUIntegerCoordinate, width: GPUIntegerCoordinate, height: GPUIntegerCoordinate): void;
4386
+ /**
4387
+ * 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).
4388
+ *
4389
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setStencilReference)
4390
+ */
4391
+ setStencilReference(reference: GPUStencilValue): void;
4392
+ /**
4393
+ * 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.
4394
+ *
4395
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setViewport)
4396
+ */
4397
+ setViewport(x: number, y: number, width: number, height: number, minDepth: number, maxDepth: number): void;
4398
+ }
4399
+
4400
+ declare var GPURenderPassEncoder: {
4401
+ prototype: GPURenderPassEncoder;
4402
+ new(): GPURenderPassEncoder;
4403
+ };
4404
+
4296
4405
  /**
4297
4406
  * 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.
4298
4407
  * Available only in secure contexts.
@@ -11071,7 +11180,7 @@ interface WorkerGlobalScope extends EventTarget, FontFaceSource, WindowOrWorkerG
11071
11180
  */
11072
11181
  readonly self: WorkerGlobalScope & typeof globalThis;
11073
11182
  /**
11074
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
11183
+ * 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).
11075
11184
  *
11076
11185
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
11077
11186
  */
@@ -12023,7 +12132,7 @@ declare var onunhandledrejection: ((this: SharedWorkerGlobalScope, ev: PromiseRe
12023
12132
  */
12024
12133
  declare var self: WorkerGlobalScope & typeof globalThis;
12025
12134
  /**
12026
- * The **`importScripts()`** method of the WorkerGlobalScope interface synchronously imports one or more scripts into the worker's scope.
12135
+ * 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).
12027
12136
  *
12028
12137
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WorkerGlobalScope/importScripts)
12029
12138
  */
@@ -12113,15 +12222,18 @@ type GLsizeiptr = number;
12113
12222
  type GLuint = number;
12114
12223
  type GLuint64 = number;
12115
12224
  type GPUBufferDynamicOffset = number;
12225
+ type GPUColor = number[] | GPUColorDict;
12116
12226
  type GPUFlagsConstant = number;
12117
12227
  type GPUIndex32 = number;
12118
12228
  type GPUIntegerCoordinate = number;
12119
12229
  type GPUIntegerCoordinateOut = number;
12120
12230
  type GPUMapModeFlags = number;
12231
+ type GPUSignedOffset32 = number;
12121
12232
  type GPUSize32 = number;
12122
12233
  type GPUSize32Out = number;
12123
12234
  type GPUSize64 = number;
12124
12235
  type GPUSize64Out = number;
12236
+ type GPUStencilValue = number;
12125
12237
  type GPUTextureUsageFlags = number;
12126
12238
  type HashAlgorithmIdentifier = AlgorithmIdentifier;
12127
12239
  type HeadersInit = [string, string][] | Record<string, string> | Headers;
@@ -12170,6 +12282,7 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
12170
12282
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
12171
12283
  type GPUCompilationMessageType = "error" | "info" | "warning";
12172
12284
  type GPUDeviceLostReason = "destroyed" | "unknown";
12285
+ type GPUIndexFormat = "uint16" | "uint32";
12173
12286
  type GPUPipelineErrorReason = "internal" | "validation";
12174
12287
  type GPUQueryType = "occlusion" | "timestamp";
12175
12288
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
@@ -72,6 +72,21 @@ interface GPUBindingCommandsMixin {
72
72
  setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
73
73
  }
74
74
 
75
+ interface GPURenderPassEncoder {
76
+ /**
77
+ * The **`executeBundles()`** method of the GPURenderPassEncoder interface executes commands previously recorded into the referenced GPURenderBundles, as part of this render pass.
78
+ *
79
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/executeBundles)
80
+ */
81
+ executeBundles(bundles: Iterable<GPURenderBundle>): void;
82
+ /**
83
+ * 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).
84
+ *
85
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPURenderPassEncoder/setBlendConstant)
86
+ */
87
+ setBlendConstant(color: Iterable<number>): void;
88
+ }
89
+
75
90
  interface GPUSupportedFeatures extends ReadonlySet<string> {
76
91
  }
77
92