@cloudflare/workers-types 4.20231016.0 → 4.20231025.0
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/2021-11-03/index.d.ts +133 -0
- package/2021-11-03/index.ts +133 -0
- package/2022-01-31/index.d.ts +133 -0
- package/2022-01-31/index.ts +133 -0
- package/2022-03-21/index.d.ts +133 -0
- package/2022-03-21/index.ts +133 -0
- package/2022-08-04/index.d.ts +133 -0
- package/2022-08-04/index.ts +133 -0
- package/2022-10-31/index.d.ts +133 -0
- package/2022-10-31/index.ts +133 -0
- package/2022-11-30/index.d.ts +133 -0
- package/2022-11-30/index.ts +133 -0
- package/2023-03-01/index.d.ts +133 -0
- package/2023-03-01/index.ts +133 -0
- package/2023-07-01/index.d.ts +133 -0
- package/2023-07-01/index.ts +133 -0
- package/experimental/index.d.ts +133 -0
- package/experimental/index.ts +133 -0
- package/index.d.ts +133 -0
- package/index.ts +133 -0
- package/oldest/index.d.ts +133 -0
- package/oldest/index.ts +133 -0
- package/package.json +1 -1
package/2021-11-03/index.d.ts
CHANGED
|
@@ -241,6 +241,8 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
241
241
|
GPUBufferUsage: typeof gpuGPUBufferUsage;
|
|
242
242
|
GPUShaderStage: typeof gpuGPUShaderStage;
|
|
243
243
|
GPUMapMode: typeof gpuGPUMapMode;
|
|
244
|
+
GPUTextureUsage: typeof gpuGPUTextureUsage;
|
|
245
|
+
GPUColorWrite: typeof gpuGPUColorWrite;
|
|
244
246
|
}
|
|
245
247
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
246
248
|
type: Type,
|
|
@@ -1977,9 +1979,13 @@ declare interface gpuGPUDevice extends EventTarget {
|
|
|
1977
1979
|
createComputePipeline(
|
|
1978
1980
|
descriptor: gpuGPUComputePipelineDescriptor
|
|
1979
1981
|
): gpuGPUComputePipeline;
|
|
1982
|
+
createRenderPipeline(
|
|
1983
|
+
descriptor: gpuGPURenderPipelineDescriptor
|
|
1984
|
+
): gpuGPURenderPipeline;
|
|
1980
1985
|
createCommandEncoder(
|
|
1981
1986
|
descriptor?: gpuGPUCommandEncoderDescriptor
|
|
1982
1987
|
): gpuGPUCommandEncoder;
|
|
1988
|
+
createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
|
|
1983
1989
|
destroy(): void;
|
|
1984
1990
|
createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
|
|
1985
1991
|
pushErrorScope(filter: string): void;
|
|
@@ -2245,6 +2251,133 @@ declare interface gpuGPUCompilationMessage {
|
|
|
2245
2251
|
declare interface gpuGPUCompilationInfo {
|
|
2246
2252
|
get messages(): gpuGPUCompilationMessage[];
|
|
2247
2253
|
}
|
|
2254
|
+
declare abstract class gpuGPUTextureUsage {
|
|
2255
|
+
static readonly COPY_SRC: number;
|
|
2256
|
+
static readonly COPY_DST: number;
|
|
2257
|
+
static readonly TEXTURE_BINDING: number;
|
|
2258
|
+
static readonly STORAGE_BINDING: number;
|
|
2259
|
+
static readonly RENDER_ATTACHMENT: number;
|
|
2260
|
+
}
|
|
2261
|
+
declare interface gpuGPUTextureDescriptor {
|
|
2262
|
+
label: string;
|
|
2263
|
+
size: number[] | gpuGPUExtent3DDict;
|
|
2264
|
+
mipLevelCount?: number;
|
|
2265
|
+
sampleCount?: number;
|
|
2266
|
+
dimension?: string;
|
|
2267
|
+
format: string;
|
|
2268
|
+
usage: number;
|
|
2269
|
+
viewFormats?: string[];
|
|
2270
|
+
}
|
|
2271
|
+
declare interface gpuGPUExtent3DDict {
|
|
2272
|
+
width: number;
|
|
2273
|
+
height?: number;
|
|
2274
|
+
depthOrArrayLayers?: number;
|
|
2275
|
+
}
|
|
2276
|
+
declare interface gpuGPUTexture {
|
|
2277
|
+
createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
|
|
2278
|
+
destroy(): void;
|
|
2279
|
+
get width(): number;
|
|
2280
|
+
get height(): number;
|
|
2281
|
+
get depthOrArrayLayers(): number;
|
|
2282
|
+
get mipLevelCount(): number;
|
|
2283
|
+
get dimension(): string;
|
|
2284
|
+
get format(): string;
|
|
2285
|
+
get usage(): number;
|
|
2286
|
+
}
|
|
2287
|
+
declare interface gpuGPUTextureView {}
|
|
2288
|
+
declare interface gpuGPUTextureViewDescriptor {
|
|
2289
|
+
label: string;
|
|
2290
|
+
format: string;
|
|
2291
|
+
dimension: string;
|
|
2292
|
+
aspect?: string;
|
|
2293
|
+
baseMipLevel?: number;
|
|
2294
|
+
mipLevelCount: number;
|
|
2295
|
+
baseArrayLayer?: number;
|
|
2296
|
+
arrayLayerCount: number;
|
|
2297
|
+
}
|
|
2298
|
+
declare abstract class gpuGPUColorWrite {
|
|
2299
|
+
static readonly RED: number;
|
|
2300
|
+
static readonly GREEN: number;
|
|
2301
|
+
static readonly BLUE: number;
|
|
2302
|
+
static readonly ALPHA: number;
|
|
2303
|
+
static readonly ALL: number;
|
|
2304
|
+
}
|
|
2305
|
+
declare interface gpuGPURenderPipeline {}
|
|
2306
|
+
declare interface gpuGPURenderPipelineDescriptor {
|
|
2307
|
+
label?: string;
|
|
2308
|
+
layout: string | gpuGPUPipelineLayout;
|
|
2309
|
+
vertex: gpuGPUVertexState;
|
|
2310
|
+
primitive?: gpuGPUPrimitiveState;
|
|
2311
|
+
depthStencil?: gpuGPUDepthStencilState;
|
|
2312
|
+
multisample?: gpuGPUMultisampleState;
|
|
2313
|
+
fragment?: gpuGPUFragmentState;
|
|
2314
|
+
}
|
|
2315
|
+
declare interface gpuGPUVertexState {
|
|
2316
|
+
module: gpuGPUShaderModule;
|
|
2317
|
+
entryPoint: string;
|
|
2318
|
+
constants?: Record<string, number>;
|
|
2319
|
+
buffers?: gpuGPUVertexBufferLayout[];
|
|
2320
|
+
}
|
|
2321
|
+
declare interface gpuGPUVertexBufferLayout {
|
|
2322
|
+
arrayStride: number | bigint;
|
|
2323
|
+
stepMode?: string;
|
|
2324
|
+
attributes: gpuGPUVertexAttribute[];
|
|
2325
|
+
}
|
|
2326
|
+
declare interface gpuGPUVertexAttribute {
|
|
2327
|
+
format: string;
|
|
2328
|
+
offset: number | bigint;
|
|
2329
|
+
shaderLocation: number;
|
|
2330
|
+
}
|
|
2331
|
+
declare interface gpuGPUPrimitiveState {
|
|
2332
|
+
topology?: string;
|
|
2333
|
+
stripIndexFormat?: string;
|
|
2334
|
+
frontFace?: string;
|
|
2335
|
+
cullMode?: string;
|
|
2336
|
+
unclippedDepth?: boolean;
|
|
2337
|
+
}
|
|
2338
|
+
declare interface gpuGPUStencilFaceState {
|
|
2339
|
+
compare?: string;
|
|
2340
|
+
failOp?: string;
|
|
2341
|
+
depthFailOp?: string;
|
|
2342
|
+
passOp?: string;
|
|
2343
|
+
}
|
|
2344
|
+
declare interface gpuGPUDepthStencilState {
|
|
2345
|
+
format: string;
|
|
2346
|
+
depthWriteEnabled: boolean;
|
|
2347
|
+
depthCompare: string;
|
|
2348
|
+
stencilFront?: gpuGPUStencilFaceState;
|
|
2349
|
+
stencilBack?: gpuGPUStencilFaceState;
|
|
2350
|
+
stencilReadMask?: number;
|
|
2351
|
+
stencilWriteMask?: number;
|
|
2352
|
+
depthBias?: number;
|
|
2353
|
+
depthBiasSlopeScale?: number;
|
|
2354
|
+
depthBiasClamp?: number;
|
|
2355
|
+
}
|
|
2356
|
+
declare interface gpuGPUMultisampleState {
|
|
2357
|
+
count?: number;
|
|
2358
|
+
mask?: number;
|
|
2359
|
+
alphaToCoverageEnabled?: boolean;
|
|
2360
|
+
}
|
|
2361
|
+
declare interface gpuGPUFragmentState {
|
|
2362
|
+
module: gpuGPUShaderModule;
|
|
2363
|
+
entryPoint: string;
|
|
2364
|
+
constants?: Record<string, number>;
|
|
2365
|
+
targets: gpuGPUColorTargetState[];
|
|
2366
|
+
}
|
|
2367
|
+
declare interface gpuGPUColorTargetState {
|
|
2368
|
+
format: string;
|
|
2369
|
+
blend: gpuGPUBlendState;
|
|
2370
|
+
writeMask?: number;
|
|
2371
|
+
}
|
|
2372
|
+
declare interface gpuGPUBlendState {
|
|
2373
|
+
color: gpuGPUBlendComponent;
|
|
2374
|
+
alpha: gpuGPUBlendComponent;
|
|
2375
|
+
}
|
|
2376
|
+
declare interface gpuGPUBlendComponent {
|
|
2377
|
+
operation?: string;
|
|
2378
|
+
srcFactor?: string;
|
|
2379
|
+
dstFactor?: string;
|
|
2380
|
+
}
|
|
2248
2381
|
declare interface BasicImageTransformations {
|
|
2249
2382
|
/**
|
|
2250
2383
|
* Maximum width in image pixels. The value must be an integer.
|
package/2021-11-03/index.ts
CHANGED
|
@@ -241,6 +241,8 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
241
241
|
GPUBufferUsage: typeof gpuGPUBufferUsage;
|
|
242
242
|
GPUShaderStage: typeof gpuGPUShaderStage;
|
|
243
243
|
GPUMapMode: typeof gpuGPUMapMode;
|
|
244
|
+
GPUTextureUsage: typeof gpuGPUTextureUsage;
|
|
245
|
+
GPUColorWrite: typeof gpuGPUColorWrite;
|
|
244
246
|
}
|
|
245
247
|
export declare function addEventListener<
|
|
246
248
|
Type extends keyof WorkerGlobalScopeEventMap
|
|
@@ -1982,9 +1984,13 @@ export interface gpuGPUDevice extends EventTarget {
|
|
|
1982
1984
|
createComputePipeline(
|
|
1983
1985
|
descriptor: gpuGPUComputePipelineDescriptor
|
|
1984
1986
|
): gpuGPUComputePipeline;
|
|
1987
|
+
createRenderPipeline(
|
|
1988
|
+
descriptor: gpuGPURenderPipelineDescriptor
|
|
1989
|
+
): gpuGPURenderPipeline;
|
|
1985
1990
|
createCommandEncoder(
|
|
1986
1991
|
descriptor?: gpuGPUCommandEncoderDescriptor
|
|
1987
1992
|
): gpuGPUCommandEncoder;
|
|
1993
|
+
createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
|
|
1988
1994
|
destroy(): void;
|
|
1989
1995
|
createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
|
|
1990
1996
|
pushErrorScope(filter: string): void;
|
|
@@ -2250,6 +2256,133 @@ export interface gpuGPUCompilationMessage {
|
|
|
2250
2256
|
export interface gpuGPUCompilationInfo {
|
|
2251
2257
|
get messages(): gpuGPUCompilationMessage[];
|
|
2252
2258
|
}
|
|
2259
|
+
export declare abstract class gpuGPUTextureUsage {
|
|
2260
|
+
static readonly COPY_SRC: number;
|
|
2261
|
+
static readonly COPY_DST: number;
|
|
2262
|
+
static readonly TEXTURE_BINDING: number;
|
|
2263
|
+
static readonly STORAGE_BINDING: number;
|
|
2264
|
+
static readonly RENDER_ATTACHMENT: number;
|
|
2265
|
+
}
|
|
2266
|
+
export interface gpuGPUTextureDescriptor {
|
|
2267
|
+
label: string;
|
|
2268
|
+
size: number[] | gpuGPUExtent3DDict;
|
|
2269
|
+
mipLevelCount?: number;
|
|
2270
|
+
sampleCount?: number;
|
|
2271
|
+
dimension?: string;
|
|
2272
|
+
format: string;
|
|
2273
|
+
usage: number;
|
|
2274
|
+
viewFormats?: string[];
|
|
2275
|
+
}
|
|
2276
|
+
export interface gpuGPUExtent3DDict {
|
|
2277
|
+
width: number;
|
|
2278
|
+
height?: number;
|
|
2279
|
+
depthOrArrayLayers?: number;
|
|
2280
|
+
}
|
|
2281
|
+
export interface gpuGPUTexture {
|
|
2282
|
+
createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
|
|
2283
|
+
destroy(): void;
|
|
2284
|
+
get width(): number;
|
|
2285
|
+
get height(): number;
|
|
2286
|
+
get depthOrArrayLayers(): number;
|
|
2287
|
+
get mipLevelCount(): number;
|
|
2288
|
+
get dimension(): string;
|
|
2289
|
+
get format(): string;
|
|
2290
|
+
get usage(): number;
|
|
2291
|
+
}
|
|
2292
|
+
export interface gpuGPUTextureView {}
|
|
2293
|
+
export interface gpuGPUTextureViewDescriptor {
|
|
2294
|
+
label: string;
|
|
2295
|
+
format: string;
|
|
2296
|
+
dimension: string;
|
|
2297
|
+
aspect?: string;
|
|
2298
|
+
baseMipLevel?: number;
|
|
2299
|
+
mipLevelCount: number;
|
|
2300
|
+
baseArrayLayer?: number;
|
|
2301
|
+
arrayLayerCount: number;
|
|
2302
|
+
}
|
|
2303
|
+
export declare abstract class gpuGPUColorWrite {
|
|
2304
|
+
static readonly RED: number;
|
|
2305
|
+
static readonly GREEN: number;
|
|
2306
|
+
static readonly BLUE: number;
|
|
2307
|
+
static readonly ALPHA: number;
|
|
2308
|
+
static readonly ALL: number;
|
|
2309
|
+
}
|
|
2310
|
+
export interface gpuGPURenderPipeline {}
|
|
2311
|
+
export interface gpuGPURenderPipelineDescriptor {
|
|
2312
|
+
label?: string;
|
|
2313
|
+
layout: string | gpuGPUPipelineLayout;
|
|
2314
|
+
vertex: gpuGPUVertexState;
|
|
2315
|
+
primitive?: gpuGPUPrimitiveState;
|
|
2316
|
+
depthStencil?: gpuGPUDepthStencilState;
|
|
2317
|
+
multisample?: gpuGPUMultisampleState;
|
|
2318
|
+
fragment?: gpuGPUFragmentState;
|
|
2319
|
+
}
|
|
2320
|
+
export interface gpuGPUVertexState {
|
|
2321
|
+
module: gpuGPUShaderModule;
|
|
2322
|
+
entryPoint: string;
|
|
2323
|
+
constants?: Record<string, number>;
|
|
2324
|
+
buffers?: gpuGPUVertexBufferLayout[];
|
|
2325
|
+
}
|
|
2326
|
+
export interface gpuGPUVertexBufferLayout {
|
|
2327
|
+
arrayStride: number | bigint;
|
|
2328
|
+
stepMode?: string;
|
|
2329
|
+
attributes: gpuGPUVertexAttribute[];
|
|
2330
|
+
}
|
|
2331
|
+
export interface gpuGPUVertexAttribute {
|
|
2332
|
+
format: string;
|
|
2333
|
+
offset: number | bigint;
|
|
2334
|
+
shaderLocation: number;
|
|
2335
|
+
}
|
|
2336
|
+
export interface gpuGPUPrimitiveState {
|
|
2337
|
+
topology?: string;
|
|
2338
|
+
stripIndexFormat?: string;
|
|
2339
|
+
frontFace?: string;
|
|
2340
|
+
cullMode?: string;
|
|
2341
|
+
unclippedDepth?: boolean;
|
|
2342
|
+
}
|
|
2343
|
+
export interface gpuGPUStencilFaceState {
|
|
2344
|
+
compare?: string;
|
|
2345
|
+
failOp?: string;
|
|
2346
|
+
depthFailOp?: string;
|
|
2347
|
+
passOp?: string;
|
|
2348
|
+
}
|
|
2349
|
+
export interface gpuGPUDepthStencilState {
|
|
2350
|
+
format: string;
|
|
2351
|
+
depthWriteEnabled: boolean;
|
|
2352
|
+
depthCompare: string;
|
|
2353
|
+
stencilFront?: gpuGPUStencilFaceState;
|
|
2354
|
+
stencilBack?: gpuGPUStencilFaceState;
|
|
2355
|
+
stencilReadMask?: number;
|
|
2356
|
+
stencilWriteMask?: number;
|
|
2357
|
+
depthBias?: number;
|
|
2358
|
+
depthBiasSlopeScale?: number;
|
|
2359
|
+
depthBiasClamp?: number;
|
|
2360
|
+
}
|
|
2361
|
+
export interface gpuGPUMultisampleState {
|
|
2362
|
+
count?: number;
|
|
2363
|
+
mask?: number;
|
|
2364
|
+
alphaToCoverageEnabled?: boolean;
|
|
2365
|
+
}
|
|
2366
|
+
export interface gpuGPUFragmentState {
|
|
2367
|
+
module: gpuGPUShaderModule;
|
|
2368
|
+
entryPoint: string;
|
|
2369
|
+
constants?: Record<string, number>;
|
|
2370
|
+
targets: gpuGPUColorTargetState[];
|
|
2371
|
+
}
|
|
2372
|
+
export interface gpuGPUColorTargetState {
|
|
2373
|
+
format: string;
|
|
2374
|
+
blend: gpuGPUBlendState;
|
|
2375
|
+
writeMask?: number;
|
|
2376
|
+
}
|
|
2377
|
+
export interface gpuGPUBlendState {
|
|
2378
|
+
color: gpuGPUBlendComponent;
|
|
2379
|
+
alpha: gpuGPUBlendComponent;
|
|
2380
|
+
}
|
|
2381
|
+
export interface gpuGPUBlendComponent {
|
|
2382
|
+
operation?: string;
|
|
2383
|
+
srcFactor?: string;
|
|
2384
|
+
dstFactor?: string;
|
|
2385
|
+
}
|
|
2253
2386
|
export interface BasicImageTransformations {
|
|
2254
2387
|
/**
|
|
2255
2388
|
* Maximum width in image pixels. The value must be an integer.
|
package/2022-01-31/index.d.ts
CHANGED
|
@@ -241,6 +241,8 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
241
241
|
GPUBufferUsage: typeof gpuGPUBufferUsage;
|
|
242
242
|
GPUShaderStage: typeof gpuGPUShaderStage;
|
|
243
243
|
GPUMapMode: typeof gpuGPUMapMode;
|
|
244
|
+
GPUTextureUsage: typeof gpuGPUTextureUsage;
|
|
245
|
+
GPUColorWrite: typeof gpuGPUColorWrite;
|
|
244
246
|
}
|
|
245
247
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
246
248
|
type: Type,
|
|
@@ -1963,9 +1965,13 @@ declare interface gpuGPUDevice extends EventTarget {
|
|
|
1963
1965
|
createComputePipeline(
|
|
1964
1966
|
descriptor: gpuGPUComputePipelineDescriptor
|
|
1965
1967
|
): gpuGPUComputePipeline;
|
|
1968
|
+
createRenderPipeline(
|
|
1969
|
+
descriptor: gpuGPURenderPipelineDescriptor
|
|
1970
|
+
): gpuGPURenderPipeline;
|
|
1966
1971
|
createCommandEncoder(
|
|
1967
1972
|
descriptor?: gpuGPUCommandEncoderDescriptor
|
|
1968
1973
|
): gpuGPUCommandEncoder;
|
|
1974
|
+
createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
|
|
1969
1975
|
destroy(): void;
|
|
1970
1976
|
createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
|
|
1971
1977
|
pushErrorScope(filter: string): void;
|
|
@@ -2231,6 +2237,133 @@ declare interface gpuGPUCompilationMessage {
|
|
|
2231
2237
|
declare interface gpuGPUCompilationInfo {
|
|
2232
2238
|
get messages(): gpuGPUCompilationMessage[];
|
|
2233
2239
|
}
|
|
2240
|
+
declare abstract class gpuGPUTextureUsage {
|
|
2241
|
+
static readonly COPY_SRC: number;
|
|
2242
|
+
static readonly COPY_DST: number;
|
|
2243
|
+
static readonly TEXTURE_BINDING: number;
|
|
2244
|
+
static readonly STORAGE_BINDING: number;
|
|
2245
|
+
static readonly RENDER_ATTACHMENT: number;
|
|
2246
|
+
}
|
|
2247
|
+
declare interface gpuGPUTextureDescriptor {
|
|
2248
|
+
label: string;
|
|
2249
|
+
size: number[] | gpuGPUExtent3DDict;
|
|
2250
|
+
mipLevelCount?: number;
|
|
2251
|
+
sampleCount?: number;
|
|
2252
|
+
dimension?: string;
|
|
2253
|
+
format: string;
|
|
2254
|
+
usage: number;
|
|
2255
|
+
viewFormats?: string[];
|
|
2256
|
+
}
|
|
2257
|
+
declare interface gpuGPUExtent3DDict {
|
|
2258
|
+
width: number;
|
|
2259
|
+
height?: number;
|
|
2260
|
+
depthOrArrayLayers?: number;
|
|
2261
|
+
}
|
|
2262
|
+
declare interface gpuGPUTexture {
|
|
2263
|
+
createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
|
|
2264
|
+
destroy(): void;
|
|
2265
|
+
get width(): number;
|
|
2266
|
+
get height(): number;
|
|
2267
|
+
get depthOrArrayLayers(): number;
|
|
2268
|
+
get mipLevelCount(): number;
|
|
2269
|
+
get dimension(): string;
|
|
2270
|
+
get format(): string;
|
|
2271
|
+
get usage(): number;
|
|
2272
|
+
}
|
|
2273
|
+
declare interface gpuGPUTextureView {}
|
|
2274
|
+
declare interface gpuGPUTextureViewDescriptor {
|
|
2275
|
+
label: string;
|
|
2276
|
+
format: string;
|
|
2277
|
+
dimension: string;
|
|
2278
|
+
aspect?: string;
|
|
2279
|
+
baseMipLevel?: number;
|
|
2280
|
+
mipLevelCount: number;
|
|
2281
|
+
baseArrayLayer?: number;
|
|
2282
|
+
arrayLayerCount: number;
|
|
2283
|
+
}
|
|
2284
|
+
declare abstract class gpuGPUColorWrite {
|
|
2285
|
+
static readonly RED: number;
|
|
2286
|
+
static readonly GREEN: number;
|
|
2287
|
+
static readonly BLUE: number;
|
|
2288
|
+
static readonly ALPHA: number;
|
|
2289
|
+
static readonly ALL: number;
|
|
2290
|
+
}
|
|
2291
|
+
declare interface gpuGPURenderPipeline {}
|
|
2292
|
+
declare interface gpuGPURenderPipelineDescriptor {
|
|
2293
|
+
label?: string;
|
|
2294
|
+
layout: string | gpuGPUPipelineLayout;
|
|
2295
|
+
vertex: gpuGPUVertexState;
|
|
2296
|
+
primitive?: gpuGPUPrimitiveState;
|
|
2297
|
+
depthStencil?: gpuGPUDepthStencilState;
|
|
2298
|
+
multisample?: gpuGPUMultisampleState;
|
|
2299
|
+
fragment?: gpuGPUFragmentState;
|
|
2300
|
+
}
|
|
2301
|
+
declare interface gpuGPUVertexState {
|
|
2302
|
+
module: gpuGPUShaderModule;
|
|
2303
|
+
entryPoint: string;
|
|
2304
|
+
constants?: Record<string, number>;
|
|
2305
|
+
buffers?: gpuGPUVertexBufferLayout[];
|
|
2306
|
+
}
|
|
2307
|
+
declare interface gpuGPUVertexBufferLayout {
|
|
2308
|
+
arrayStride: number | bigint;
|
|
2309
|
+
stepMode?: string;
|
|
2310
|
+
attributes: gpuGPUVertexAttribute[];
|
|
2311
|
+
}
|
|
2312
|
+
declare interface gpuGPUVertexAttribute {
|
|
2313
|
+
format: string;
|
|
2314
|
+
offset: number | bigint;
|
|
2315
|
+
shaderLocation: number;
|
|
2316
|
+
}
|
|
2317
|
+
declare interface gpuGPUPrimitiveState {
|
|
2318
|
+
topology?: string;
|
|
2319
|
+
stripIndexFormat?: string;
|
|
2320
|
+
frontFace?: string;
|
|
2321
|
+
cullMode?: string;
|
|
2322
|
+
unclippedDepth?: boolean;
|
|
2323
|
+
}
|
|
2324
|
+
declare interface gpuGPUStencilFaceState {
|
|
2325
|
+
compare?: string;
|
|
2326
|
+
failOp?: string;
|
|
2327
|
+
depthFailOp?: string;
|
|
2328
|
+
passOp?: string;
|
|
2329
|
+
}
|
|
2330
|
+
declare interface gpuGPUDepthStencilState {
|
|
2331
|
+
format: string;
|
|
2332
|
+
depthWriteEnabled: boolean;
|
|
2333
|
+
depthCompare: string;
|
|
2334
|
+
stencilFront?: gpuGPUStencilFaceState;
|
|
2335
|
+
stencilBack?: gpuGPUStencilFaceState;
|
|
2336
|
+
stencilReadMask?: number;
|
|
2337
|
+
stencilWriteMask?: number;
|
|
2338
|
+
depthBias?: number;
|
|
2339
|
+
depthBiasSlopeScale?: number;
|
|
2340
|
+
depthBiasClamp?: number;
|
|
2341
|
+
}
|
|
2342
|
+
declare interface gpuGPUMultisampleState {
|
|
2343
|
+
count?: number;
|
|
2344
|
+
mask?: number;
|
|
2345
|
+
alphaToCoverageEnabled?: boolean;
|
|
2346
|
+
}
|
|
2347
|
+
declare interface gpuGPUFragmentState {
|
|
2348
|
+
module: gpuGPUShaderModule;
|
|
2349
|
+
entryPoint: string;
|
|
2350
|
+
constants?: Record<string, number>;
|
|
2351
|
+
targets: gpuGPUColorTargetState[];
|
|
2352
|
+
}
|
|
2353
|
+
declare interface gpuGPUColorTargetState {
|
|
2354
|
+
format: string;
|
|
2355
|
+
blend: gpuGPUBlendState;
|
|
2356
|
+
writeMask?: number;
|
|
2357
|
+
}
|
|
2358
|
+
declare interface gpuGPUBlendState {
|
|
2359
|
+
color: gpuGPUBlendComponent;
|
|
2360
|
+
alpha: gpuGPUBlendComponent;
|
|
2361
|
+
}
|
|
2362
|
+
declare interface gpuGPUBlendComponent {
|
|
2363
|
+
operation?: string;
|
|
2364
|
+
srcFactor?: string;
|
|
2365
|
+
dstFactor?: string;
|
|
2366
|
+
}
|
|
2234
2367
|
declare interface BasicImageTransformations {
|
|
2235
2368
|
/**
|
|
2236
2369
|
* Maximum width in image pixels. The value must be an integer.
|
package/2022-01-31/index.ts
CHANGED
|
@@ -241,6 +241,8 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
241
241
|
GPUBufferUsage: typeof gpuGPUBufferUsage;
|
|
242
242
|
GPUShaderStage: typeof gpuGPUShaderStage;
|
|
243
243
|
GPUMapMode: typeof gpuGPUMapMode;
|
|
244
|
+
GPUTextureUsage: typeof gpuGPUTextureUsage;
|
|
245
|
+
GPUColorWrite: typeof gpuGPUColorWrite;
|
|
244
246
|
}
|
|
245
247
|
export declare function addEventListener<
|
|
246
248
|
Type extends keyof WorkerGlobalScopeEventMap
|
|
@@ -1968,9 +1970,13 @@ export interface gpuGPUDevice extends EventTarget {
|
|
|
1968
1970
|
createComputePipeline(
|
|
1969
1971
|
descriptor: gpuGPUComputePipelineDescriptor
|
|
1970
1972
|
): gpuGPUComputePipeline;
|
|
1973
|
+
createRenderPipeline(
|
|
1974
|
+
descriptor: gpuGPURenderPipelineDescriptor
|
|
1975
|
+
): gpuGPURenderPipeline;
|
|
1971
1976
|
createCommandEncoder(
|
|
1972
1977
|
descriptor?: gpuGPUCommandEncoderDescriptor
|
|
1973
1978
|
): gpuGPUCommandEncoder;
|
|
1979
|
+
createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
|
|
1974
1980
|
destroy(): void;
|
|
1975
1981
|
createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
|
|
1976
1982
|
pushErrorScope(filter: string): void;
|
|
@@ -2236,6 +2242,133 @@ export interface gpuGPUCompilationMessage {
|
|
|
2236
2242
|
export interface gpuGPUCompilationInfo {
|
|
2237
2243
|
get messages(): gpuGPUCompilationMessage[];
|
|
2238
2244
|
}
|
|
2245
|
+
export declare abstract class gpuGPUTextureUsage {
|
|
2246
|
+
static readonly COPY_SRC: number;
|
|
2247
|
+
static readonly COPY_DST: number;
|
|
2248
|
+
static readonly TEXTURE_BINDING: number;
|
|
2249
|
+
static readonly STORAGE_BINDING: number;
|
|
2250
|
+
static readonly RENDER_ATTACHMENT: number;
|
|
2251
|
+
}
|
|
2252
|
+
export interface gpuGPUTextureDescriptor {
|
|
2253
|
+
label: string;
|
|
2254
|
+
size: number[] | gpuGPUExtent3DDict;
|
|
2255
|
+
mipLevelCount?: number;
|
|
2256
|
+
sampleCount?: number;
|
|
2257
|
+
dimension?: string;
|
|
2258
|
+
format: string;
|
|
2259
|
+
usage: number;
|
|
2260
|
+
viewFormats?: string[];
|
|
2261
|
+
}
|
|
2262
|
+
export interface gpuGPUExtent3DDict {
|
|
2263
|
+
width: number;
|
|
2264
|
+
height?: number;
|
|
2265
|
+
depthOrArrayLayers?: number;
|
|
2266
|
+
}
|
|
2267
|
+
export interface gpuGPUTexture {
|
|
2268
|
+
createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
|
|
2269
|
+
destroy(): void;
|
|
2270
|
+
get width(): number;
|
|
2271
|
+
get height(): number;
|
|
2272
|
+
get depthOrArrayLayers(): number;
|
|
2273
|
+
get mipLevelCount(): number;
|
|
2274
|
+
get dimension(): string;
|
|
2275
|
+
get format(): string;
|
|
2276
|
+
get usage(): number;
|
|
2277
|
+
}
|
|
2278
|
+
export interface gpuGPUTextureView {}
|
|
2279
|
+
export interface gpuGPUTextureViewDescriptor {
|
|
2280
|
+
label: string;
|
|
2281
|
+
format: string;
|
|
2282
|
+
dimension: string;
|
|
2283
|
+
aspect?: string;
|
|
2284
|
+
baseMipLevel?: number;
|
|
2285
|
+
mipLevelCount: number;
|
|
2286
|
+
baseArrayLayer?: number;
|
|
2287
|
+
arrayLayerCount: number;
|
|
2288
|
+
}
|
|
2289
|
+
export declare abstract class gpuGPUColorWrite {
|
|
2290
|
+
static readonly RED: number;
|
|
2291
|
+
static readonly GREEN: number;
|
|
2292
|
+
static readonly BLUE: number;
|
|
2293
|
+
static readonly ALPHA: number;
|
|
2294
|
+
static readonly ALL: number;
|
|
2295
|
+
}
|
|
2296
|
+
export interface gpuGPURenderPipeline {}
|
|
2297
|
+
export interface gpuGPURenderPipelineDescriptor {
|
|
2298
|
+
label?: string;
|
|
2299
|
+
layout: string | gpuGPUPipelineLayout;
|
|
2300
|
+
vertex: gpuGPUVertexState;
|
|
2301
|
+
primitive?: gpuGPUPrimitiveState;
|
|
2302
|
+
depthStencil?: gpuGPUDepthStencilState;
|
|
2303
|
+
multisample?: gpuGPUMultisampleState;
|
|
2304
|
+
fragment?: gpuGPUFragmentState;
|
|
2305
|
+
}
|
|
2306
|
+
export interface gpuGPUVertexState {
|
|
2307
|
+
module: gpuGPUShaderModule;
|
|
2308
|
+
entryPoint: string;
|
|
2309
|
+
constants?: Record<string, number>;
|
|
2310
|
+
buffers?: gpuGPUVertexBufferLayout[];
|
|
2311
|
+
}
|
|
2312
|
+
export interface gpuGPUVertexBufferLayout {
|
|
2313
|
+
arrayStride: number | bigint;
|
|
2314
|
+
stepMode?: string;
|
|
2315
|
+
attributes: gpuGPUVertexAttribute[];
|
|
2316
|
+
}
|
|
2317
|
+
export interface gpuGPUVertexAttribute {
|
|
2318
|
+
format: string;
|
|
2319
|
+
offset: number | bigint;
|
|
2320
|
+
shaderLocation: number;
|
|
2321
|
+
}
|
|
2322
|
+
export interface gpuGPUPrimitiveState {
|
|
2323
|
+
topology?: string;
|
|
2324
|
+
stripIndexFormat?: string;
|
|
2325
|
+
frontFace?: string;
|
|
2326
|
+
cullMode?: string;
|
|
2327
|
+
unclippedDepth?: boolean;
|
|
2328
|
+
}
|
|
2329
|
+
export interface gpuGPUStencilFaceState {
|
|
2330
|
+
compare?: string;
|
|
2331
|
+
failOp?: string;
|
|
2332
|
+
depthFailOp?: string;
|
|
2333
|
+
passOp?: string;
|
|
2334
|
+
}
|
|
2335
|
+
export interface gpuGPUDepthStencilState {
|
|
2336
|
+
format: string;
|
|
2337
|
+
depthWriteEnabled: boolean;
|
|
2338
|
+
depthCompare: string;
|
|
2339
|
+
stencilFront?: gpuGPUStencilFaceState;
|
|
2340
|
+
stencilBack?: gpuGPUStencilFaceState;
|
|
2341
|
+
stencilReadMask?: number;
|
|
2342
|
+
stencilWriteMask?: number;
|
|
2343
|
+
depthBias?: number;
|
|
2344
|
+
depthBiasSlopeScale?: number;
|
|
2345
|
+
depthBiasClamp?: number;
|
|
2346
|
+
}
|
|
2347
|
+
export interface gpuGPUMultisampleState {
|
|
2348
|
+
count?: number;
|
|
2349
|
+
mask?: number;
|
|
2350
|
+
alphaToCoverageEnabled?: boolean;
|
|
2351
|
+
}
|
|
2352
|
+
export interface gpuGPUFragmentState {
|
|
2353
|
+
module: gpuGPUShaderModule;
|
|
2354
|
+
entryPoint: string;
|
|
2355
|
+
constants?: Record<string, number>;
|
|
2356
|
+
targets: gpuGPUColorTargetState[];
|
|
2357
|
+
}
|
|
2358
|
+
export interface gpuGPUColorTargetState {
|
|
2359
|
+
format: string;
|
|
2360
|
+
blend: gpuGPUBlendState;
|
|
2361
|
+
writeMask?: number;
|
|
2362
|
+
}
|
|
2363
|
+
export interface gpuGPUBlendState {
|
|
2364
|
+
color: gpuGPUBlendComponent;
|
|
2365
|
+
alpha: gpuGPUBlendComponent;
|
|
2366
|
+
}
|
|
2367
|
+
export interface gpuGPUBlendComponent {
|
|
2368
|
+
operation?: string;
|
|
2369
|
+
srcFactor?: string;
|
|
2370
|
+
dstFactor?: string;
|
|
2371
|
+
}
|
|
2239
2372
|
export interface BasicImageTransformations {
|
|
2240
2373
|
/**
|
|
2241
2374
|
* Maximum width in image pixels. The value must be an integer.
|