@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.
@@ -247,6 +247,8 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
247
247
  GPUBufferUsage: typeof gpuGPUBufferUsage;
248
248
  GPUShaderStage: typeof gpuGPUShaderStage;
249
249
  GPUMapMode: typeof gpuGPUMapMode;
250
+ GPUTextureUsage: typeof gpuGPUTextureUsage;
251
+ GPUColorWrite: typeof gpuGPUColorWrite;
250
252
  }
251
253
  declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
252
254
  type: Type,
@@ -2034,9 +2036,13 @@ declare interface gpuGPUDevice extends EventTarget {
2034
2036
  createComputePipeline(
2035
2037
  descriptor: gpuGPUComputePipelineDescriptor
2036
2038
  ): gpuGPUComputePipeline;
2039
+ createRenderPipeline(
2040
+ descriptor: gpuGPURenderPipelineDescriptor
2041
+ ): gpuGPURenderPipeline;
2037
2042
  createCommandEncoder(
2038
2043
  descriptor?: gpuGPUCommandEncoderDescriptor
2039
2044
  ): gpuGPUCommandEncoder;
2045
+ createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
2040
2046
  destroy(): void;
2041
2047
  createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
2042
2048
  pushErrorScope(filter: string): void;
@@ -2306,6 +2312,133 @@ declare interface gpuGPUCompilationMessage {
2306
2312
  declare interface gpuGPUCompilationInfo {
2307
2313
  get messages(): gpuGPUCompilationMessage[];
2308
2314
  }
2315
+ declare abstract class gpuGPUTextureUsage {
2316
+ static readonly COPY_SRC: number;
2317
+ static readonly COPY_DST: number;
2318
+ static readonly TEXTURE_BINDING: number;
2319
+ static readonly STORAGE_BINDING: number;
2320
+ static readonly RENDER_ATTACHMENT: number;
2321
+ }
2322
+ declare interface gpuGPUTextureDescriptor {
2323
+ label: string;
2324
+ size: number[] | gpuGPUExtent3DDict;
2325
+ mipLevelCount?: number;
2326
+ sampleCount?: number;
2327
+ dimension?: string;
2328
+ format: string;
2329
+ usage: number;
2330
+ viewFormats?: string[];
2331
+ }
2332
+ declare interface gpuGPUExtent3DDict {
2333
+ width: number;
2334
+ height?: number;
2335
+ depthOrArrayLayers?: number;
2336
+ }
2337
+ declare interface gpuGPUTexture {
2338
+ createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
2339
+ destroy(): void;
2340
+ get width(): number;
2341
+ get height(): number;
2342
+ get depthOrArrayLayers(): number;
2343
+ get mipLevelCount(): number;
2344
+ get dimension(): string;
2345
+ get format(): string;
2346
+ get usage(): number;
2347
+ }
2348
+ declare interface gpuGPUTextureView {}
2349
+ declare interface gpuGPUTextureViewDescriptor {
2350
+ label: string;
2351
+ format: string;
2352
+ dimension: string;
2353
+ aspect?: string;
2354
+ baseMipLevel?: number;
2355
+ mipLevelCount: number;
2356
+ baseArrayLayer?: number;
2357
+ arrayLayerCount: number;
2358
+ }
2359
+ declare abstract class gpuGPUColorWrite {
2360
+ static readonly RED: number;
2361
+ static readonly GREEN: number;
2362
+ static readonly BLUE: number;
2363
+ static readonly ALPHA: number;
2364
+ static readonly ALL: number;
2365
+ }
2366
+ declare interface gpuGPURenderPipeline {}
2367
+ declare interface gpuGPURenderPipelineDescriptor {
2368
+ label?: string;
2369
+ layout: string | gpuGPUPipelineLayout;
2370
+ vertex: gpuGPUVertexState;
2371
+ primitive?: gpuGPUPrimitiveState;
2372
+ depthStencil?: gpuGPUDepthStencilState;
2373
+ multisample?: gpuGPUMultisampleState;
2374
+ fragment?: gpuGPUFragmentState;
2375
+ }
2376
+ declare interface gpuGPUVertexState {
2377
+ module: gpuGPUShaderModule;
2378
+ entryPoint: string;
2379
+ constants?: Record<string, number>;
2380
+ buffers?: gpuGPUVertexBufferLayout[];
2381
+ }
2382
+ declare interface gpuGPUVertexBufferLayout {
2383
+ arrayStride: number | bigint;
2384
+ stepMode?: string;
2385
+ attributes: gpuGPUVertexAttribute[];
2386
+ }
2387
+ declare interface gpuGPUVertexAttribute {
2388
+ format: string;
2389
+ offset: number | bigint;
2390
+ shaderLocation: number;
2391
+ }
2392
+ declare interface gpuGPUPrimitiveState {
2393
+ topology?: string;
2394
+ stripIndexFormat?: string;
2395
+ frontFace?: string;
2396
+ cullMode?: string;
2397
+ unclippedDepth?: boolean;
2398
+ }
2399
+ declare interface gpuGPUStencilFaceState {
2400
+ compare?: string;
2401
+ failOp?: string;
2402
+ depthFailOp?: string;
2403
+ passOp?: string;
2404
+ }
2405
+ declare interface gpuGPUDepthStencilState {
2406
+ format: string;
2407
+ depthWriteEnabled: boolean;
2408
+ depthCompare: string;
2409
+ stencilFront?: gpuGPUStencilFaceState;
2410
+ stencilBack?: gpuGPUStencilFaceState;
2411
+ stencilReadMask?: number;
2412
+ stencilWriteMask?: number;
2413
+ depthBias?: number;
2414
+ depthBiasSlopeScale?: number;
2415
+ depthBiasClamp?: number;
2416
+ }
2417
+ declare interface gpuGPUMultisampleState {
2418
+ count?: number;
2419
+ mask?: number;
2420
+ alphaToCoverageEnabled?: boolean;
2421
+ }
2422
+ declare interface gpuGPUFragmentState {
2423
+ module: gpuGPUShaderModule;
2424
+ entryPoint: string;
2425
+ constants?: Record<string, number>;
2426
+ targets: gpuGPUColorTargetState[];
2427
+ }
2428
+ declare interface gpuGPUColorTargetState {
2429
+ format: string;
2430
+ blend: gpuGPUBlendState;
2431
+ writeMask?: number;
2432
+ }
2433
+ declare interface gpuGPUBlendState {
2434
+ color: gpuGPUBlendComponent;
2435
+ alpha: gpuGPUBlendComponent;
2436
+ }
2437
+ declare interface gpuGPUBlendComponent {
2438
+ operation?: string;
2439
+ srcFactor?: string;
2440
+ dstFactor?: string;
2441
+ }
2309
2442
  declare interface BasicImageTransformations {
2310
2443
  /**
2311
2444
  * Maximum width in image pixels. The value must be an integer.
@@ -247,6 +247,8 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
247
247
  GPUBufferUsage: typeof gpuGPUBufferUsage;
248
248
  GPUShaderStage: typeof gpuGPUShaderStage;
249
249
  GPUMapMode: typeof gpuGPUMapMode;
250
+ GPUTextureUsage: typeof gpuGPUTextureUsage;
251
+ GPUColorWrite: typeof gpuGPUColorWrite;
250
252
  }
251
253
  export declare function addEventListener<
252
254
  Type extends keyof WorkerGlobalScopeEventMap
@@ -2039,9 +2041,13 @@ export interface gpuGPUDevice extends EventTarget {
2039
2041
  createComputePipeline(
2040
2042
  descriptor: gpuGPUComputePipelineDescriptor
2041
2043
  ): gpuGPUComputePipeline;
2044
+ createRenderPipeline(
2045
+ descriptor: gpuGPURenderPipelineDescriptor
2046
+ ): gpuGPURenderPipeline;
2042
2047
  createCommandEncoder(
2043
2048
  descriptor?: gpuGPUCommandEncoderDescriptor
2044
2049
  ): gpuGPUCommandEncoder;
2050
+ createTexture(param1: gpuGPUTextureDescriptor): gpuGPUTexture;
2045
2051
  destroy(): void;
2046
2052
  createQuerySet(descriptor: gpuGPUQuerySetDescriptor): gpuGPUQuerySet;
2047
2053
  pushErrorScope(filter: string): void;
@@ -2311,6 +2317,133 @@ export interface gpuGPUCompilationMessage {
2311
2317
  export interface gpuGPUCompilationInfo {
2312
2318
  get messages(): gpuGPUCompilationMessage[];
2313
2319
  }
2320
+ export declare abstract class gpuGPUTextureUsage {
2321
+ static readonly COPY_SRC: number;
2322
+ static readonly COPY_DST: number;
2323
+ static readonly TEXTURE_BINDING: number;
2324
+ static readonly STORAGE_BINDING: number;
2325
+ static readonly RENDER_ATTACHMENT: number;
2326
+ }
2327
+ export interface gpuGPUTextureDescriptor {
2328
+ label: string;
2329
+ size: number[] | gpuGPUExtent3DDict;
2330
+ mipLevelCount?: number;
2331
+ sampleCount?: number;
2332
+ dimension?: string;
2333
+ format: string;
2334
+ usage: number;
2335
+ viewFormats?: string[];
2336
+ }
2337
+ export interface gpuGPUExtent3DDict {
2338
+ width: number;
2339
+ height?: number;
2340
+ depthOrArrayLayers?: number;
2341
+ }
2342
+ export interface gpuGPUTexture {
2343
+ createView(descriptor?: gpuGPUTextureViewDescriptor): gpuGPUTextureView;
2344
+ destroy(): void;
2345
+ get width(): number;
2346
+ get height(): number;
2347
+ get depthOrArrayLayers(): number;
2348
+ get mipLevelCount(): number;
2349
+ get dimension(): string;
2350
+ get format(): string;
2351
+ get usage(): number;
2352
+ }
2353
+ export interface gpuGPUTextureView {}
2354
+ export interface gpuGPUTextureViewDescriptor {
2355
+ label: string;
2356
+ format: string;
2357
+ dimension: string;
2358
+ aspect?: string;
2359
+ baseMipLevel?: number;
2360
+ mipLevelCount: number;
2361
+ baseArrayLayer?: number;
2362
+ arrayLayerCount: number;
2363
+ }
2364
+ export declare abstract class gpuGPUColorWrite {
2365
+ static readonly RED: number;
2366
+ static readonly GREEN: number;
2367
+ static readonly BLUE: number;
2368
+ static readonly ALPHA: number;
2369
+ static readonly ALL: number;
2370
+ }
2371
+ export interface gpuGPURenderPipeline {}
2372
+ export interface gpuGPURenderPipelineDescriptor {
2373
+ label?: string;
2374
+ layout: string | gpuGPUPipelineLayout;
2375
+ vertex: gpuGPUVertexState;
2376
+ primitive?: gpuGPUPrimitiveState;
2377
+ depthStencil?: gpuGPUDepthStencilState;
2378
+ multisample?: gpuGPUMultisampleState;
2379
+ fragment?: gpuGPUFragmentState;
2380
+ }
2381
+ export interface gpuGPUVertexState {
2382
+ module: gpuGPUShaderModule;
2383
+ entryPoint: string;
2384
+ constants?: Record<string, number>;
2385
+ buffers?: gpuGPUVertexBufferLayout[];
2386
+ }
2387
+ export interface gpuGPUVertexBufferLayout {
2388
+ arrayStride: number | bigint;
2389
+ stepMode?: string;
2390
+ attributes: gpuGPUVertexAttribute[];
2391
+ }
2392
+ export interface gpuGPUVertexAttribute {
2393
+ format: string;
2394
+ offset: number | bigint;
2395
+ shaderLocation: number;
2396
+ }
2397
+ export interface gpuGPUPrimitiveState {
2398
+ topology?: string;
2399
+ stripIndexFormat?: string;
2400
+ frontFace?: string;
2401
+ cullMode?: string;
2402
+ unclippedDepth?: boolean;
2403
+ }
2404
+ export interface gpuGPUStencilFaceState {
2405
+ compare?: string;
2406
+ failOp?: string;
2407
+ depthFailOp?: string;
2408
+ passOp?: string;
2409
+ }
2410
+ export interface gpuGPUDepthStencilState {
2411
+ format: string;
2412
+ depthWriteEnabled: boolean;
2413
+ depthCompare: string;
2414
+ stencilFront?: gpuGPUStencilFaceState;
2415
+ stencilBack?: gpuGPUStencilFaceState;
2416
+ stencilReadMask?: number;
2417
+ stencilWriteMask?: number;
2418
+ depthBias?: number;
2419
+ depthBiasSlopeScale?: number;
2420
+ depthBiasClamp?: number;
2421
+ }
2422
+ export interface gpuGPUMultisampleState {
2423
+ count?: number;
2424
+ mask?: number;
2425
+ alphaToCoverageEnabled?: boolean;
2426
+ }
2427
+ export interface gpuGPUFragmentState {
2428
+ module: gpuGPUShaderModule;
2429
+ entryPoint: string;
2430
+ constants?: Record<string, number>;
2431
+ targets: gpuGPUColorTargetState[];
2432
+ }
2433
+ export interface gpuGPUColorTargetState {
2434
+ format: string;
2435
+ blend: gpuGPUBlendState;
2436
+ writeMask?: number;
2437
+ }
2438
+ export interface gpuGPUBlendState {
2439
+ color: gpuGPUBlendComponent;
2440
+ alpha: gpuGPUBlendComponent;
2441
+ }
2442
+ export interface gpuGPUBlendComponent {
2443
+ operation?: string;
2444
+ srcFactor?: string;
2445
+ dstFactor?: string;
2446
+ }
2314
2447
  export interface BasicImageTransformations {
2315
2448
  /**
2316
2449
  * Maximum width in image pixels. The value must be an integer.
package/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/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.