@types/sharedworker 0.0.213 → 0.0.215
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.d.ts +318 -2
- package/package.json +1 -1
- package/ts5.5/index.d.ts +297 -2
- package/ts5.5/iterable.d.ts +21 -0
- package/ts5.6/index.d.ts +297 -2
- package/ts5.6/iterable.d.ts +21 -0
- package/ts5.9/index.d.ts +297 -2
- package/ts5.9/iterable.d.ts +21 -0
package/ts5.9/index.d.ts
CHANGED
|
@@ -216,6 +216,36 @@ interface FontFaceSetLoadEventInit extends EventInit {
|
|
|
216
216
|
fontfaces?: FontFace[];
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
+
interface GPUBindGroupDescriptor extends GPUObjectDescriptorBase {
|
|
220
|
+
entries: GPUBindGroupEntry[];
|
|
221
|
+
layout: GPUBindGroupLayout;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
interface GPUBindGroupEntry {
|
|
225
|
+
binding: GPUIndex32;
|
|
226
|
+
resource: GPUBindingResource;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
interface GPUBufferBinding {
|
|
230
|
+
buffer: GPUBuffer;
|
|
231
|
+
offset?: GPUSize64;
|
|
232
|
+
size?: GPUSize64;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
interface GPUCanvasConfiguration {
|
|
236
|
+
alphaMode?: GPUCanvasAlphaMode;
|
|
237
|
+
colorSpace?: PredefinedColorSpace;
|
|
238
|
+
device: GPUDevice;
|
|
239
|
+
format: GPUTextureFormat;
|
|
240
|
+
toneMapping?: GPUCanvasToneMapping;
|
|
241
|
+
usage?: GPUTextureUsageFlags;
|
|
242
|
+
viewFormats?: GPUTextureFormat[];
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
interface GPUCanvasToneMapping {
|
|
246
|
+
mode?: GPUCanvasToneMappingMode;
|
|
247
|
+
}
|
|
248
|
+
|
|
219
249
|
interface GPUColorDict {
|
|
220
250
|
a: number;
|
|
221
251
|
b: number;
|
|
@@ -223,6 +253,19 @@ interface GPUColorDict {
|
|
|
223
253
|
r: number;
|
|
224
254
|
}
|
|
225
255
|
|
|
256
|
+
interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
interface GPUComputePassDescriptor extends GPUObjectDescriptorBase {
|
|
260
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
interface GPUComputePassTimestampWrites {
|
|
264
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
265
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
266
|
+
querySet: GPUQuerySet;
|
|
267
|
+
}
|
|
268
|
+
|
|
226
269
|
interface GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo {
|
|
227
270
|
colorSpace?: PredefinedColorSpace;
|
|
228
271
|
premultipliedAlpha?: boolean;
|
|
@@ -240,6 +283,10 @@ interface GPUExtent3DDict {
|
|
|
240
283
|
width: GPUIntegerCoordinate;
|
|
241
284
|
}
|
|
242
285
|
|
|
286
|
+
interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
|
|
287
|
+
colorSpace?: PredefinedColorSpace;
|
|
288
|
+
}
|
|
289
|
+
|
|
243
290
|
interface GPUObjectDescriptorBase {
|
|
244
291
|
label?: string;
|
|
245
292
|
}
|
|
@@ -262,6 +309,45 @@ interface GPUPipelineErrorInit {
|
|
|
262
309
|
interface GPURenderBundleDescriptor extends GPUObjectDescriptorBase {
|
|
263
310
|
}
|
|
264
311
|
|
|
312
|
+
interface GPURenderPassColorAttachment {
|
|
313
|
+
clearValue?: GPUColor;
|
|
314
|
+
depthSlice?: GPUIntegerCoordinate;
|
|
315
|
+
loadOp: GPULoadOp;
|
|
316
|
+
resolveTarget?: GPUTexture | GPUTextureView;
|
|
317
|
+
storeOp: GPUStoreOp;
|
|
318
|
+
view: GPUTexture | GPUTextureView;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
322
|
+
depthClearValue?: number;
|
|
323
|
+
depthLoadOp?: GPULoadOp;
|
|
324
|
+
depthReadOnly?: boolean;
|
|
325
|
+
depthStoreOp?: GPUStoreOp;
|
|
326
|
+
stencilClearValue?: GPUStencilValue;
|
|
327
|
+
stencilLoadOp?: GPULoadOp;
|
|
328
|
+
stencilReadOnly?: boolean;
|
|
329
|
+
stencilStoreOp?: GPUStoreOp;
|
|
330
|
+
view: GPUTexture | GPUTextureView;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
interface GPURenderPassDescriptor extends GPUObjectDescriptorBase {
|
|
334
|
+
colorAttachments: (GPURenderPassColorAttachment | null)[];
|
|
335
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
336
|
+
maxDrawCount?: GPUSize64;
|
|
337
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
338
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
interface GPURenderPassTimestampWrites {
|
|
342
|
+
beginningOfPassWriteIndex?: GPUSize32;
|
|
343
|
+
endOfPassWriteIndex?: GPUSize32;
|
|
344
|
+
querySet: GPUQuerySet;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
|
|
348
|
+
buffer: GPUBuffer;
|
|
349
|
+
}
|
|
350
|
+
|
|
265
351
|
interface GPUTexelCopyBufferLayout {
|
|
266
352
|
bytesPerRow?: GPUSize32;
|
|
267
353
|
offset?: GPUSize64;
|
|
@@ -4077,6 +4163,50 @@ declare var GPUBuffer: {
|
|
|
4077
4163
|
new(): GPUBuffer;
|
|
4078
4164
|
};
|
|
4079
4165
|
|
|
4166
|
+
/**
|
|
4167
|
+
* The **`GPUCanvasContext`** interface of the WebGPU API represents the WebGPU rendering context of a <canvas> element, returned via an HTMLCanvasElement.getContext() call with a contextType of "webgpu".
|
|
4168
|
+
* Available only in secure contexts.
|
|
4169
|
+
*
|
|
4170
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext)
|
|
4171
|
+
*/
|
|
4172
|
+
interface GPUCanvasContext {
|
|
4173
|
+
/**
|
|
4174
|
+
* The **`canvas`** read-only property of the GPUCanvasContext interface returns a reference to the canvas that the context was created from.
|
|
4175
|
+
*
|
|
4176
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/canvas)
|
|
4177
|
+
*/
|
|
4178
|
+
readonly canvas: OffscreenCanvas;
|
|
4179
|
+
/**
|
|
4180
|
+
* The **`configure()`** method of the GPUCanvasContext interface configures the context to use for rendering with a given GPUDevice. When called the canvas will initially be cleared to transparent black.
|
|
4181
|
+
*
|
|
4182
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/configure)
|
|
4183
|
+
*/
|
|
4184
|
+
configure(configuration: GPUCanvasConfiguration): void;
|
|
4185
|
+
/**
|
|
4186
|
+
* The **`getConfiguration()`** method of the GPUCanvasContext interface returns the current configuration set for the context.
|
|
4187
|
+
*
|
|
4188
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getConfiguration)
|
|
4189
|
+
*/
|
|
4190
|
+
getConfiguration(): GPUCanvasConfiguration | null;
|
|
4191
|
+
/**
|
|
4192
|
+
* The **`getCurrentTexture()`** method of the GPUCanvasContext interface returns the next GPUTexture to be composited to the document by the canvas context.
|
|
4193
|
+
*
|
|
4194
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/getCurrentTexture)
|
|
4195
|
+
*/
|
|
4196
|
+
getCurrentTexture(): GPUTexture;
|
|
4197
|
+
/**
|
|
4198
|
+
* The **`unconfigure()`** method of the GPUCanvasContext interface removes any previously-set context configuration, and destroys any textures returned via getCurrentTexture() while the canvas context was configured.
|
|
4199
|
+
*
|
|
4200
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCanvasContext/unconfigure)
|
|
4201
|
+
*/
|
|
4202
|
+
unconfigure(): void;
|
|
4203
|
+
}
|
|
4204
|
+
|
|
4205
|
+
declare var GPUCanvasContext: {
|
|
4206
|
+
prototype: GPUCanvasContext;
|
|
4207
|
+
new(): GPUCanvasContext;
|
|
4208
|
+
};
|
|
4209
|
+
|
|
4080
4210
|
/**
|
|
4081
4211
|
* The **`GPUCommandBuffer`** interface of the WebGPU API represents a pre-recorded list of GPU commands that can be submitted to a GPUQueue for execution.
|
|
4082
4212
|
* Available only in secure contexts.
|
|
@@ -4091,6 +4221,75 @@ declare var GPUCommandBuffer: {
|
|
|
4091
4221
|
new(): GPUCommandBuffer;
|
|
4092
4222
|
};
|
|
4093
4223
|
|
|
4224
|
+
/**
|
|
4225
|
+
* The **`GPUCommandEncoder`** interface of the WebGPU API represents an encoder that collects a sequence of GPU commands to be issued to the GPU.
|
|
4226
|
+
* Available only in secure contexts.
|
|
4227
|
+
*
|
|
4228
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder)
|
|
4229
|
+
*/
|
|
4230
|
+
interface GPUCommandEncoder extends GPUDebugCommandsMixin, GPUObjectBase {
|
|
4231
|
+
/**
|
|
4232
|
+
* The **`beginComputePass()`** method of the GPUCommandEncoder interface starts encoding a compute pass, returning a GPUComputePassEncoder that can be used to control computation.
|
|
4233
|
+
*
|
|
4234
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginComputePass)
|
|
4235
|
+
*/
|
|
4236
|
+
beginComputePass(descriptor?: GPUComputePassDescriptor): GPUComputePassEncoder;
|
|
4237
|
+
/**
|
|
4238
|
+
* The **`beginRenderPass()`** method of the GPUCommandEncoder interface starts encoding a render pass, returning a GPURenderPassEncoder that can be used to control rendering.
|
|
4239
|
+
*
|
|
4240
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/beginRenderPass)
|
|
4241
|
+
*/
|
|
4242
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
4243
|
+
/**
|
|
4244
|
+
* The **`clearBuffer()`** method of the GPUCommandEncoder interface encodes a command that fills a region of a GPUBuffer with zeroes.
|
|
4245
|
+
*
|
|
4246
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/clearBuffer)
|
|
4247
|
+
*/
|
|
4248
|
+
clearBuffer(buffer: GPUBuffer, offset?: GPUSize64, size?: GPUSize64): void;
|
|
4249
|
+
/**
|
|
4250
|
+
* The **`copyBufferToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUBuffer to another.
|
|
4251
|
+
*
|
|
4252
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToBuffer)
|
|
4253
|
+
*/
|
|
4254
|
+
copyBufferToBuffer(source: GPUBuffer, destination: GPUBuffer, size?: GPUSize64): void;
|
|
4255
|
+
copyBufferToBuffer(source: GPUBuffer, sourceOffset: GPUSize64, destination: GPUBuffer, destinationOffset: GPUSize64, size?: GPUSize64): void;
|
|
4256
|
+
/**
|
|
4257
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
4258
|
+
*
|
|
4259
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
4260
|
+
*/
|
|
4261
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4262
|
+
/**
|
|
4263
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
4264
|
+
*
|
|
4265
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
4266
|
+
*/
|
|
4267
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: GPUExtent3D): void;
|
|
4268
|
+
/**
|
|
4269
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
4270
|
+
*
|
|
4271
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
4272
|
+
*/
|
|
4273
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: GPUExtent3D): void;
|
|
4274
|
+
/**
|
|
4275
|
+
* The **`finish()`** method of the GPUCommandEncoder interface completes recording of the command sequence encoded on this GPUCommandEncoder, returning a corresponding GPUCommandBuffer.
|
|
4276
|
+
*
|
|
4277
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/finish)
|
|
4278
|
+
*/
|
|
4279
|
+
finish(descriptor?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
4280
|
+
/**
|
|
4281
|
+
* The **`resolveQuerySet()`** method of the GPUCommandEncoder interface encodes a command that resolves a GPUQuerySet, copying the results into a specified GPUBuffer.
|
|
4282
|
+
*
|
|
4283
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/resolveQuerySet)
|
|
4284
|
+
*/
|
|
4285
|
+
resolveQuerySet(querySet: GPUQuerySet, firstQuery: GPUSize32, queryCount: GPUSize32, destination: GPUBuffer, destinationOffset: GPUSize64): void;
|
|
4286
|
+
}
|
|
4287
|
+
|
|
4288
|
+
declare var GPUCommandEncoder: {
|
|
4289
|
+
prototype: GPUCommandEncoder;
|
|
4290
|
+
new(): GPUCommandEncoder;
|
|
4291
|
+
};
|
|
4292
|
+
|
|
4094
4293
|
/**
|
|
4095
4294
|
* The **`GPUCompilationInfo`** interface of the WebGPU API represents an array of GPUCompilationMessage objects generated by the GPU shader module compiler to help diagnose problems with shader code.
|
|
4096
4295
|
* Available only in secure contexts.
|
|
@@ -4222,6 +4421,90 @@ interface GPUDebugCommandsMixin {
|
|
|
4222
4421
|
pushDebugGroup(groupLabel: string): void;
|
|
4223
4422
|
}
|
|
4224
4423
|
|
|
4424
|
+
interface GPUDeviceEventMap {
|
|
4425
|
+
"uncapturederror": GPUUncapturedErrorEvent;
|
|
4426
|
+
}
|
|
4427
|
+
|
|
4428
|
+
/**
|
|
4429
|
+
* The **`GPUDevice`** interface of the WebGPU API represents a logical GPU device. This is the main interface through which the majority of WebGPU functionality is accessed.
|
|
4430
|
+
* Available only in secure contexts.
|
|
4431
|
+
*
|
|
4432
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice)
|
|
4433
|
+
*/
|
|
4434
|
+
interface GPUDevice extends EventTarget, GPUObjectBase {
|
|
4435
|
+
/**
|
|
4436
|
+
* The **`adapterInfo`** read-only property of the GPUDevice interface returns a GPUAdapterInfo object containing identifying information about the device's originating adapter.
|
|
4437
|
+
*
|
|
4438
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/adapterInfo)
|
|
4439
|
+
*/
|
|
4440
|
+
readonly adapterInfo: GPUAdapterInfo;
|
|
4441
|
+
/**
|
|
4442
|
+
* The **`features`** read-only property of the GPUDevice interface returns a GPUSupportedFeatures object that describes additional functionality supported by the device. Only features requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) are included.
|
|
4443
|
+
*
|
|
4444
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/features)
|
|
4445
|
+
*/
|
|
4446
|
+
readonly features: GPUSupportedFeatures;
|
|
4447
|
+
/**
|
|
4448
|
+
* The **`limits`** read-only property of the GPUDevice interface returns a GPUSupportedLimits object that describes the limits supported by the device. All limit values will be included, and the limits requested during the creation of the device (i.e., when GPUAdapter.requestDevice() is called) will be reflected in those values.
|
|
4449
|
+
*
|
|
4450
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/limits)
|
|
4451
|
+
*/
|
|
4452
|
+
readonly limits: GPUSupportedLimits;
|
|
4453
|
+
/**
|
|
4454
|
+
* The **`lost`** read-only property of the GPUDevice interface contains a Promise that remains pending throughout the device's lifetime and resolves with a GPUDeviceLostInfo object when the device is lost.
|
|
4455
|
+
*
|
|
4456
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/lost)
|
|
4457
|
+
*/
|
|
4458
|
+
readonly lost: Promise<GPUDeviceLostInfo>;
|
|
4459
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/uncapturederror_event) */
|
|
4460
|
+
onuncapturederror: ((this: GPUDevice, ev: GPUUncapturedErrorEvent) => any) | null;
|
|
4461
|
+
/**
|
|
4462
|
+
* The **`queue`** read-only property of the GPUDevice interface returns the primary GPUQueue for the device.
|
|
4463
|
+
*
|
|
4464
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/queue)
|
|
4465
|
+
*/
|
|
4466
|
+
readonly queue: GPUQueue;
|
|
4467
|
+
/**
|
|
4468
|
+
* The **`createBindGroup()`** method of the GPUDevice interface creates a GPUBindGroup based on a GPUBindGroupLayout that defines a set of resources to be bound together in a group and how those resources are used in shader stages.
|
|
4469
|
+
*
|
|
4470
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createBindGroup)
|
|
4471
|
+
*/
|
|
4472
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
4473
|
+
/**
|
|
4474
|
+
* The **`destroy()`** method of the GPUDevice interface destroys the device, preventing further operations on it.
|
|
4475
|
+
*
|
|
4476
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/destroy)
|
|
4477
|
+
*/
|
|
4478
|
+
destroy(): void;
|
|
4479
|
+
/**
|
|
4480
|
+
* The **`importExternalTexture()`** method of the GPUDevice interface takes an HTMLVideoElement or a VideoFrame object as an input and returns a GPUExternalTexture wrapper object containing a snapshot of the video that can be used as a frame in GPU rendering operations.
|
|
4481
|
+
*
|
|
4482
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/importExternalTexture)
|
|
4483
|
+
*/
|
|
4484
|
+
importExternalTexture(descriptor: GPUExternalTextureDescriptor): GPUExternalTexture;
|
|
4485
|
+
/**
|
|
4486
|
+
* The **`popErrorScope()`** method of the GPUDevice interface pops an existing GPU error scope from the error scope stack (originally pushed using GPUDevice.pushErrorScope()) and returns a Promise that resolves to an object describing the first error captured in the scope, or null if no error occurred.
|
|
4487
|
+
*
|
|
4488
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/popErrorScope)
|
|
4489
|
+
*/
|
|
4490
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
4491
|
+
/**
|
|
4492
|
+
* The **`pushErrorScope()`** method of the GPUDevice interface pushes a new GPU error scope onto the device's error scope stack, allowing you to capture errors of a particular type.
|
|
4493
|
+
*
|
|
4494
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/pushErrorScope)
|
|
4495
|
+
*/
|
|
4496
|
+
pushErrorScope(filter: GPUErrorFilter): void;
|
|
4497
|
+
addEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
4498
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
4499
|
+
removeEventListener<K extends keyof GPUDeviceEventMap>(type: K, listener: (this: GPUDevice, ev: GPUDeviceEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
4500
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
4501
|
+
}
|
|
4502
|
+
|
|
4503
|
+
declare var GPUDevice: {
|
|
4504
|
+
prototype: GPUDevice;
|
|
4505
|
+
new(): GPUDevice;
|
|
4506
|
+
};
|
|
4507
|
+
|
|
4225
4508
|
/**
|
|
4226
4509
|
* The **`GPUDeviceLostInfo`** interface of the WebGPU API represents the object returned when the GPUDevice.lost Promise resolves. This provides information as to why a device has been lost.
|
|
4227
4510
|
* Available only in secure contexts.
|
|
@@ -6837,6 +7120,12 @@ declare var PushManager: {
|
|
|
6837
7120
|
readonly supportedContentEncodings: ReadonlyArray<string>;
|
|
6838
7121
|
};
|
|
6839
7122
|
|
|
7123
|
+
/** Available only in secure contexts. */
|
|
7124
|
+
interface PushManagerAttribute {
|
|
7125
|
+
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration/pushManager) */
|
|
7126
|
+
readonly pushManager: PushManager;
|
|
7127
|
+
}
|
|
7128
|
+
|
|
6840
7129
|
/**
|
|
6841
7130
|
* The **`PushSubscription`** interface of the Push API provides a subscription's URL endpoint along with the public key and secrets that should be used for encrypting push messages to this subscription. This information must be passed to the application server, using any desired application-specific method.
|
|
6842
7131
|
* Available only in secure contexts.
|
|
@@ -7570,7 +7859,7 @@ interface ServiceWorkerRegistrationEventMap {
|
|
|
7570
7859
|
*
|
|
7571
7860
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerRegistration)
|
|
7572
7861
|
*/
|
|
7573
|
-
interface ServiceWorkerRegistration extends EventTarget {
|
|
7862
|
+
interface ServiceWorkerRegistration extends EventTarget, PushManagerAttribute {
|
|
7574
7863
|
/**
|
|
7575
7864
|
* The **`active`** read-only property of the ServiceWorkerRegistration interface returns a service worker whose ServiceWorker.state is activating or activated. This property is initially set to null.
|
|
7576
7865
|
*
|
|
@@ -12362,6 +12651,7 @@ type GLsizei = number;
|
|
|
12362
12651
|
type GLsizeiptr = number;
|
|
12363
12652
|
type GLuint = number;
|
|
12364
12653
|
type GLuint64 = number;
|
|
12654
|
+
type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer | GPUBufferBinding | GPUExternalTexture;
|
|
12365
12655
|
type GPUBufferDynamicOffset = number;
|
|
12366
12656
|
type GPUColor = number[] | GPUColorDict;
|
|
12367
12657
|
type GPUCopyExternalImageSource = ImageBitmap | ImageData | OffscreenCanvas;
|
|
@@ -12388,7 +12678,7 @@ type ImageDataArray = Uint8ClampedArray<ArrayBuffer>;
|
|
|
12388
12678
|
type Int32List = Int32Array<ArrayBufferLike> | GLint[];
|
|
12389
12679
|
type MessageEventSource = MessagePort | ServiceWorker;
|
|
12390
12680
|
type NamedCurve = string;
|
|
12391
|
-
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext;
|
|
12681
|
+
type OffscreenRenderingContext = OffscreenCanvasRenderingContext2D | ImageBitmapRenderingContext | WebGLRenderingContext | WebGL2RenderingContext | GPUCanvasContext;
|
|
12392
12682
|
type OnErrorEventHandler = OnErrorEventHandlerNonNull | null;
|
|
12393
12683
|
type PerformanceEntryList = PerformanceEntry[];
|
|
12394
12684
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T> | ReadableByteStreamController;
|
|
@@ -12425,11 +12715,16 @@ type FontDisplay = "auto" | "block" | "fallback" | "optional" | "swap";
|
|
|
12425
12715
|
type FontFaceLoadStatus = "error" | "loaded" | "loading" | "unloaded";
|
|
12426
12716
|
type FontFaceSetLoadStatus = "loaded" | "loading";
|
|
12427
12717
|
type GPUBufferMapState = "mapped" | "pending" | "unmapped";
|
|
12718
|
+
type GPUCanvasAlphaMode = "opaque" | "premultiplied";
|
|
12719
|
+
type GPUCanvasToneMappingMode = "extended" | "standard";
|
|
12428
12720
|
type GPUCompilationMessageType = "error" | "info" | "warning";
|
|
12429
12721
|
type GPUDeviceLostReason = "destroyed" | "unknown";
|
|
12722
|
+
type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
|
|
12430
12723
|
type GPUIndexFormat = "uint16" | "uint32";
|
|
12724
|
+
type GPULoadOp = "clear" | "load";
|
|
12431
12725
|
type GPUPipelineErrorReason = "internal" | "validation";
|
|
12432
12726
|
type GPUQueryType = "occlusion" | "timestamp";
|
|
12727
|
+
type GPUStoreOp = "discard" | "store";
|
|
12433
12728
|
type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
|
|
12434
12729
|
type GPUTextureDimension = "1d" | "2d" | "3d";
|
|
12435
12730
|
type GPUTextureFormat = "astc-10x10-unorm" | "astc-10x10-unorm-srgb" | "astc-10x5-unorm" | "astc-10x5-unorm-srgb" | "astc-10x6-unorm" | "astc-10x6-unorm-srgb" | "astc-10x8-unorm" | "astc-10x8-unorm-srgb" | "astc-12x10-unorm" | "astc-12x10-unorm-srgb" | "astc-12x12-unorm" | "astc-12x12-unorm-srgb" | "astc-4x4-unorm" | "astc-4x4-unorm-srgb" | "astc-5x4-unorm" | "astc-5x4-unorm-srgb" | "astc-5x5-unorm" | "astc-5x5-unorm-srgb" | "astc-6x5-unorm" | "astc-6x5-unorm-srgb" | "astc-6x6-unorm" | "astc-6x6-unorm-srgb" | "astc-8x5-unorm" | "astc-8x5-unorm-srgb" | "astc-8x6-unorm" | "astc-8x6-unorm-srgb" | "astc-8x8-unorm" | "astc-8x8-unorm-srgb" | "bc1-rgba-unorm" | "bc1-rgba-unorm-srgb" | "bc2-rgba-unorm" | "bc2-rgba-unorm-srgb" | "bc3-rgba-unorm" | "bc3-rgba-unorm-srgb" | "bc4-r-snorm" | "bc4-r-unorm" | "bc5-rg-snorm" | "bc5-rg-unorm" | "bc6h-rgb-float" | "bc6h-rgb-ufloat" | "bc7-rgba-unorm" | "bc7-rgba-unorm-srgb" | "bgra8unorm" | "bgra8unorm-srgb" | "depth16unorm" | "depth24plus" | "depth24plus-stencil8" | "depth32float" | "depth32float-stencil8" | "eac-r11snorm" | "eac-r11unorm" | "eac-rg11snorm" | "eac-rg11unorm" | "etc2-rgb8a1unorm" | "etc2-rgb8a1unorm-srgb" | "etc2-rgb8unorm" | "etc2-rgb8unorm-srgb" | "etc2-rgba8unorm" | "etc2-rgba8unorm-srgb" | "r16float" | "r16sint" | "r16snorm" | "r16uint" | "r16unorm" | "r32float" | "r32sint" | "r32uint" | "r8sint" | "r8snorm" | "r8uint" | "r8unorm" | "rg11b10ufloat" | "rg16float" | "rg16sint" | "rg16snorm" | "rg16uint" | "rg16unorm" | "rg32float" | "rg32sint" | "rg32uint" | "rg8sint" | "rg8snorm" | "rg8uint" | "rg8unorm" | "rgb10a2uint" | "rgb10a2unorm" | "rgb9e5ufloat" | "rgba16float" | "rgba16sint" | "rgba16snorm" | "rgba16uint" | "rgba16unorm" | "rgba32float" | "rgba32sint" | "rgba32uint" | "rgba8sint" | "rgba8snorm" | "rgba8uint" | "rgba8unorm" | "rgba8unorm-srgb" | "stencil8";
|
package/ts5.9/iterable.d.ts
CHANGED
|
@@ -72,6 +72,27 @@ interface GPUBindingCommandsMixin {
|
|
|
72
72
|
setBindGroup(index: GPUIndex32, bindGroup: GPUBindGroup | null, dynamicOffsets?: Iterable<GPUBufferDynamicOffset>): void;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
interface GPUCommandEncoder {
|
|
76
|
+
/**
|
|
77
|
+
* The **`copyBufferToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUBuffer to a GPUTexture.
|
|
78
|
+
*
|
|
79
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyBufferToTexture)
|
|
80
|
+
*/
|
|
81
|
+
copyBufferToTexture(source: GPUTexelCopyBufferInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
82
|
+
/**
|
|
83
|
+
* The **`copyTextureToBuffer()`** method of the GPUCommandEncoder interface encodes a command that copies data from a GPUTexture to a GPUBuffer.
|
|
84
|
+
*
|
|
85
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToBuffer)
|
|
86
|
+
*/
|
|
87
|
+
copyTextureToBuffer(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyBufferInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
88
|
+
/**
|
|
89
|
+
* The **`copyTextureToTexture()`** method of the GPUCommandEncoder interface encodes a command that copies data from one GPUTexture to another.
|
|
90
|
+
*
|
|
91
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCommandEncoder/copyTextureToTexture)
|
|
92
|
+
*/
|
|
93
|
+
copyTextureToTexture(source: GPUTexelCopyTextureInfo, destination: GPUTexelCopyTextureInfo, copySize: Iterable<GPUIntegerCoordinate>): void;
|
|
94
|
+
}
|
|
95
|
+
|
|
75
96
|
interface GPUQueue {
|
|
76
97
|
/**
|
|
77
98
|
* The **`copyExternalImageToTexture()`** method of the GPUQueue interface copies a snapshot taken from a source image, video, or canvas into a given GPUTexture.
|