@types/web 0.0.334 → 0.0.335

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
@@ -47,4 +47,4 @@ Prior to `@types/web` the web APIs were deployed with a version of TypeScript, a
47
47
 
48
48
  ## Deploy Metadata
49
49
 
50
- You can read what changed in version 0.0.334 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.334.
50
+ You can read what changed in version 0.0.335 at https://github.com/microsoft/TypeScript-DOM-lib-generator/releases/tag/%40types%2Fweb%400.0.335.
package/index.d.ts CHANGED
@@ -818,6 +818,17 @@ interface GPUBindGroupEntry {
818
818
  resource: GPUBindingResource;
819
819
  }
820
820
 
821
+ interface GPUBlendComponent {
822
+ dstFactor?: GPUBlendFactor;
823
+ operation?: GPUBlendOperation;
824
+ srcFactor?: GPUBlendFactor;
825
+ }
826
+
827
+ interface GPUBlendState {
828
+ alpha: GPUBlendComponent;
829
+ color: GPUBlendComponent;
830
+ }
831
+
821
832
  interface GPUBufferBinding {
822
833
  buffer: GPUBuffer;
823
834
  offset?: GPUSize64;
@@ -851,6 +862,12 @@ interface GPUColorDict {
851
862
  r: number;
852
863
  }
853
864
 
865
+ interface GPUColorTargetState {
866
+ blend?: GPUBlendState;
867
+ format: GPUTextureFormat;
868
+ writeMask?: GPUColorWriteFlags;
869
+ }
870
+
854
871
  interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
855
872
  }
856
873
 
@@ -882,6 +899,19 @@ interface GPUCopyExternalImageSourceInfo {
882
899
  source: GPUCopyExternalImageSource;
883
900
  }
884
901
 
902
+ interface GPUDepthStencilState {
903
+ depthBias?: GPUDepthBias;
904
+ depthBiasClamp?: number;
905
+ depthBiasSlopeScale?: number;
906
+ depthCompare?: GPUCompareFunction;
907
+ depthWriteEnabled?: boolean;
908
+ format: GPUTextureFormat;
909
+ stencilBack?: GPUStencilFaceState;
910
+ stencilFront?: GPUStencilFaceState;
911
+ stencilReadMask?: GPUStencilValue;
912
+ stencilWriteMask?: GPUStencilValue;
913
+ }
914
+
885
915
  interface GPUExtent3DDict {
886
916
  depthOrArrayLayers?: GPUIntegerCoordinate;
887
917
  height?: GPUIntegerCoordinate;
@@ -893,6 +923,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
893
923
  source: HTMLVideoElement | VideoFrame;
894
924
  }
895
925
 
926
+ interface GPUFragmentState extends GPUProgrammableStage {
927
+ targets: (GPUColorTargetState | null)[];
928
+ }
929
+
930
+ interface GPUMultisampleState {
931
+ alphaToCoverageEnabled?: boolean;
932
+ count?: GPUSize32;
933
+ mask?: GPUSampleMask;
934
+ }
935
+
896
936
  interface GPUObjectDescriptorBase {
897
937
  label?: string;
898
938
  }
@@ -920,6 +960,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
920
960
  bindGroupLayouts: (GPUBindGroupLayout | null)[];
921
961
  }
922
962
 
963
+ interface GPUPrimitiveState {
964
+ cullMode?: GPUCullMode;
965
+ frontFace?: GPUFrontFace;
966
+ stripIndexFormat?: GPUIndexFormat;
967
+ topology?: GPUPrimitiveTopology;
968
+ unclippedDepth?: boolean;
969
+ }
970
+
923
971
  interface GPUProgrammableStage {
924
972
  constants?: Record<string, GPUPipelineConstantValue>;
925
973
  entryPoint?: string;
@@ -980,6 +1028,14 @@ interface GPURenderPassTimestampWrites {
980
1028
  querySet: GPUQuerySet;
981
1029
  }
982
1030
 
1031
+ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
1032
+ depthStencil?: GPUDepthStencilState;
1033
+ fragment?: GPUFragmentState;
1034
+ multisample?: GPUMultisampleState;
1035
+ primitive?: GPUPrimitiveState;
1036
+ vertex: GPUVertexState;
1037
+ }
1038
+
983
1039
  interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
984
1040
  addressModeU?: GPUAddressMode;
985
1041
  addressModeV?: GPUAddressMode;
@@ -997,6 +1053,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
997
1053
  code: string;
998
1054
  }
999
1055
 
1056
+ interface GPUStencilFaceState {
1057
+ compare?: GPUCompareFunction;
1058
+ depthFailOp?: GPUStencilOperation;
1059
+ failOp?: GPUStencilOperation;
1060
+ passOp?: GPUStencilOperation;
1061
+ }
1062
+
1000
1063
  interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
1001
1064
  buffer: GPUBuffer;
1002
1065
  }
@@ -1039,6 +1102,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
1039
1102
  error: GPUError;
1040
1103
  }
1041
1104
 
1105
+ interface GPUVertexAttribute {
1106
+ format: GPUVertexFormat;
1107
+ offset: GPUSize64;
1108
+ shaderLocation: GPUIndex32;
1109
+ }
1110
+
1111
+ interface GPUVertexBufferLayout {
1112
+ arrayStride: GPUSize64;
1113
+ attributes: GPUVertexAttribute[];
1114
+ stepMode?: GPUVertexStepMode;
1115
+ }
1116
+
1117
+ interface GPUVertexState extends GPUProgrammableStage {
1118
+ buffers?: (GPUVertexBufferLayout | null)[];
1119
+ }
1120
+
1042
1121
  interface GainOptions extends AudioNodeOptions {
1043
1122
  gain?: number;
1044
1123
  }
@@ -15460,6 +15539,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
15460
15539
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
15461
15540
  */
15462
15541
  createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
15542
+ /**
15543
+ * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
15544
+ *
15545
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
15546
+ */
15547
+ createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
15548
+ /**
15549
+ * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
15550
+ *
15551
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
15552
+ */
15553
+ createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
15463
15554
  /**
15464
15555
  * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
15465
15556
  *
@@ -43922,7 +44013,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
43922
44013
  type GPUBufferDynamicOffset = number;
43923
44014
  type GPUBufferUsageFlags = number;
43924
44015
  type GPUColor = number[] | GPUColorDict;
44016
+ type GPUColorWriteFlags = number;
43925
44017
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
44018
+ type GPUDepthBias = number;
43926
44019
  type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
43927
44020
  type GPUFlagsConstant = number;
43928
44021
  type GPUIndex32 = number;
@@ -43932,6 +44025,7 @@ type GPUMapModeFlags = number;
43932
44025
  type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
43933
44026
  type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
43934
44027
  type GPUPipelineConstantValue = number;
44028
+ type GPUSampleMask = number;
43935
44029
  type GPUSignedOffset32 = number;
43936
44030
  type GPUSize32 = number;
43937
44031
  type GPUSize32Out = number;
@@ -44047,24 +44141,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
44047
44141
  type FullscreenNavigationUI = "auto" | "hide" | "show";
44048
44142
  type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
44049
44143
  type GPUAutoLayoutMode = "auto";
44144
+ type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
44145
+ type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
44050
44146
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
44051
44147
  type GPUCanvasAlphaMode = "opaque" | "premultiplied";
44052
44148
  type GPUCanvasToneMappingMode = "extended" | "standard";
44053
44149
  type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
44054
44150
  type GPUCompilationMessageType = "error" | "info" | "warning";
44151
+ type GPUCullMode = "back" | "front" | "none";
44055
44152
  type GPUDeviceLostReason = "destroyed" | "unknown";
44056
44153
  type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
44057
44154
  type GPUFilterMode = "linear" | "nearest";
44155
+ type GPUFrontFace = "ccw" | "cw";
44058
44156
  type GPUIndexFormat = "uint16" | "uint32";
44059
44157
  type GPULoadOp = "clear" | "load";
44060
44158
  type GPUMipmapFilterMode = "linear" | "nearest";
44061
44159
  type GPUPipelineErrorReason = "internal" | "validation";
44160
+ type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
44062
44161
  type GPUQueryType = "occlusion" | "timestamp";
44162
+ type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
44063
44163
  type GPUStoreOp = "discard" | "store";
44064
44164
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
44065
44165
  type GPUTextureDimension = "1d" | "2d" | "3d";
44066
44166
  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";
44067
44167
  type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
44168
+ type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra";
44169
+ type GPUVertexStepMode = "instance" | "vertex";
44068
44170
  type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble";
44069
44171
  type GamepadHapticsResult = "complete" | "preempted";
44070
44172
  type GamepadMappingType = "" | "standard" | "xr-standard";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/web",
3
- "version": "0.0.334",
3
+ "version": "0.0.335",
4
4
  "description": "Types for the DOM, and other web technologies in browsers",
5
5
  "license": "Apache-2.0",
6
6
  "contributors": [],
package/ts5.5/index.d.ts CHANGED
@@ -815,6 +815,17 @@ interface GPUBindGroupEntry {
815
815
  resource: GPUBindingResource;
816
816
  }
817
817
 
818
+ interface GPUBlendComponent {
819
+ dstFactor?: GPUBlendFactor;
820
+ operation?: GPUBlendOperation;
821
+ srcFactor?: GPUBlendFactor;
822
+ }
823
+
824
+ interface GPUBlendState {
825
+ alpha: GPUBlendComponent;
826
+ color: GPUBlendComponent;
827
+ }
828
+
818
829
  interface GPUBufferBinding {
819
830
  buffer: GPUBuffer;
820
831
  offset?: GPUSize64;
@@ -848,6 +859,12 @@ interface GPUColorDict {
848
859
  r: number;
849
860
  }
850
861
 
862
+ interface GPUColorTargetState {
863
+ blend?: GPUBlendState;
864
+ format: GPUTextureFormat;
865
+ writeMask?: GPUColorWriteFlags;
866
+ }
867
+
851
868
  interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
852
869
  }
853
870
 
@@ -879,6 +896,19 @@ interface GPUCopyExternalImageSourceInfo {
879
896
  source: GPUCopyExternalImageSource;
880
897
  }
881
898
 
899
+ interface GPUDepthStencilState {
900
+ depthBias?: GPUDepthBias;
901
+ depthBiasClamp?: number;
902
+ depthBiasSlopeScale?: number;
903
+ depthCompare?: GPUCompareFunction;
904
+ depthWriteEnabled?: boolean;
905
+ format: GPUTextureFormat;
906
+ stencilBack?: GPUStencilFaceState;
907
+ stencilFront?: GPUStencilFaceState;
908
+ stencilReadMask?: GPUStencilValue;
909
+ stencilWriteMask?: GPUStencilValue;
910
+ }
911
+
882
912
  interface GPUExtent3DDict {
883
913
  depthOrArrayLayers?: GPUIntegerCoordinate;
884
914
  height?: GPUIntegerCoordinate;
@@ -890,6 +920,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
890
920
  source: HTMLVideoElement | VideoFrame;
891
921
  }
892
922
 
923
+ interface GPUFragmentState extends GPUProgrammableStage {
924
+ targets: (GPUColorTargetState | null)[];
925
+ }
926
+
927
+ interface GPUMultisampleState {
928
+ alphaToCoverageEnabled?: boolean;
929
+ count?: GPUSize32;
930
+ mask?: GPUSampleMask;
931
+ }
932
+
893
933
  interface GPUObjectDescriptorBase {
894
934
  label?: string;
895
935
  }
@@ -917,6 +957,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
917
957
  bindGroupLayouts: (GPUBindGroupLayout | null)[];
918
958
  }
919
959
 
960
+ interface GPUPrimitiveState {
961
+ cullMode?: GPUCullMode;
962
+ frontFace?: GPUFrontFace;
963
+ stripIndexFormat?: GPUIndexFormat;
964
+ topology?: GPUPrimitiveTopology;
965
+ unclippedDepth?: boolean;
966
+ }
967
+
920
968
  interface GPUProgrammableStage {
921
969
  constants?: Record<string, GPUPipelineConstantValue>;
922
970
  entryPoint?: string;
@@ -977,6 +1025,14 @@ interface GPURenderPassTimestampWrites {
977
1025
  querySet: GPUQuerySet;
978
1026
  }
979
1027
 
1028
+ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
1029
+ depthStencil?: GPUDepthStencilState;
1030
+ fragment?: GPUFragmentState;
1031
+ multisample?: GPUMultisampleState;
1032
+ primitive?: GPUPrimitiveState;
1033
+ vertex: GPUVertexState;
1034
+ }
1035
+
980
1036
  interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
981
1037
  addressModeU?: GPUAddressMode;
982
1038
  addressModeV?: GPUAddressMode;
@@ -994,6 +1050,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
994
1050
  code: string;
995
1051
  }
996
1052
 
1053
+ interface GPUStencilFaceState {
1054
+ compare?: GPUCompareFunction;
1055
+ depthFailOp?: GPUStencilOperation;
1056
+ failOp?: GPUStencilOperation;
1057
+ passOp?: GPUStencilOperation;
1058
+ }
1059
+
997
1060
  interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
998
1061
  buffer: GPUBuffer;
999
1062
  }
@@ -1036,6 +1099,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
1036
1099
  error: GPUError;
1037
1100
  }
1038
1101
 
1102
+ interface GPUVertexAttribute {
1103
+ format: GPUVertexFormat;
1104
+ offset: GPUSize64;
1105
+ shaderLocation: GPUIndex32;
1106
+ }
1107
+
1108
+ interface GPUVertexBufferLayout {
1109
+ arrayStride: GPUSize64;
1110
+ attributes: GPUVertexAttribute[];
1111
+ stepMode?: GPUVertexStepMode;
1112
+ }
1113
+
1114
+ interface GPUVertexState extends GPUProgrammableStage {
1115
+ buffers?: (GPUVertexBufferLayout | null)[];
1116
+ }
1117
+
1039
1118
  interface GainOptions extends AudioNodeOptions {
1040
1119
  gain?: number;
1041
1120
  }
@@ -15446,6 +15525,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
15446
15525
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
15447
15526
  */
15448
15527
  createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
15528
+ /**
15529
+ * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
15530
+ *
15531
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
15532
+ */
15533
+ createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
15534
+ /**
15535
+ * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
15536
+ *
15537
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
15538
+ */
15539
+ createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
15449
15540
  /**
15450
15541
  * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
15451
15542
  *
@@ -43896,7 +43987,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
43896
43987
  type GPUBufferDynamicOffset = number;
43897
43988
  type GPUBufferUsageFlags = number;
43898
43989
  type GPUColor = number[] | GPUColorDict;
43990
+ type GPUColorWriteFlags = number;
43899
43991
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
43992
+ type GPUDepthBias = number;
43900
43993
  type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
43901
43994
  type GPUFlagsConstant = number;
43902
43995
  type GPUIndex32 = number;
@@ -43906,6 +43999,7 @@ type GPUMapModeFlags = number;
43906
43999
  type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
43907
44000
  type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
43908
44001
  type GPUPipelineConstantValue = number;
44002
+ type GPUSampleMask = number;
43909
44003
  type GPUSignedOffset32 = number;
43910
44004
  type GPUSize32 = number;
43911
44005
  type GPUSize32Out = number;
@@ -44021,24 +44115,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
44021
44115
  type FullscreenNavigationUI = "auto" | "hide" | "show";
44022
44116
  type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
44023
44117
  type GPUAutoLayoutMode = "auto";
44118
+ type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
44119
+ type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
44024
44120
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
44025
44121
  type GPUCanvasAlphaMode = "opaque" | "premultiplied";
44026
44122
  type GPUCanvasToneMappingMode = "extended" | "standard";
44027
44123
  type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
44028
44124
  type GPUCompilationMessageType = "error" | "info" | "warning";
44125
+ type GPUCullMode = "back" | "front" | "none";
44029
44126
  type GPUDeviceLostReason = "destroyed" | "unknown";
44030
44127
  type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
44031
44128
  type GPUFilterMode = "linear" | "nearest";
44129
+ type GPUFrontFace = "ccw" | "cw";
44032
44130
  type GPUIndexFormat = "uint16" | "uint32";
44033
44131
  type GPULoadOp = "clear" | "load";
44034
44132
  type GPUMipmapFilterMode = "linear" | "nearest";
44035
44133
  type GPUPipelineErrorReason = "internal" | "validation";
44134
+ type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
44036
44135
  type GPUQueryType = "occlusion" | "timestamp";
44136
+ type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
44037
44137
  type GPUStoreOp = "discard" | "store";
44038
44138
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
44039
44139
  type GPUTextureDimension = "1d" | "2d" | "3d";
44040
44140
  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";
44041
44141
  type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
44142
+ type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra";
44143
+ type GPUVertexStepMode = "instance" | "vertex";
44042
44144
  type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble";
44043
44145
  type GamepadHapticsResult = "complete" | "preempted";
44044
44146
  type GamepadMappingType = "" | "standard" | "xr-standard";
package/ts5.6/index.d.ts CHANGED
@@ -815,6 +815,17 @@ interface GPUBindGroupEntry {
815
815
  resource: GPUBindingResource;
816
816
  }
817
817
 
818
+ interface GPUBlendComponent {
819
+ dstFactor?: GPUBlendFactor;
820
+ operation?: GPUBlendOperation;
821
+ srcFactor?: GPUBlendFactor;
822
+ }
823
+
824
+ interface GPUBlendState {
825
+ alpha: GPUBlendComponent;
826
+ color: GPUBlendComponent;
827
+ }
828
+
818
829
  interface GPUBufferBinding {
819
830
  buffer: GPUBuffer;
820
831
  offset?: GPUSize64;
@@ -848,6 +859,12 @@ interface GPUColorDict {
848
859
  r: number;
849
860
  }
850
861
 
862
+ interface GPUColorTargetState {
863
+ blend?: GPUBlendState;
864
+ format: GPUTextureFormat;
865
+ writeMask?: GPUColorWriteFlags;
866
+ }
867
+
851
868
  interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
852
869
  }
853
870
 
@@ -879,6 +896,19 @@ interface GPUCopyExternalImageSourceInfo {
879
896
  source: GPUCopyExternalImageSource;
880
897
  }
881
898
 
899
+ interface GPUDepthStencilState {
900
+ depthBias?: GPUDepthBias;
901
+ depthBiasClamp?: number;
902
+ depthBiasSlopeScale?: number;
903
+ depthCompare?: GPUCompareFunction;
904
+ depthWriteEnabled?: boolean;
905
+ format: GPUTextureFormat;
906
+ stencilBack?: GPUStencilFaceState;
907
+ stencilFront?: GPUStencilFaceState;
908
+ stencilReadMask?: GPUStencilValue;
909
+ stencilWriteMask?: GPUStencilValue;
910
+ }
911
+
882
912
  interface GPUExtent3DDict {
883
913
  depthOrArrayLayers?: GPUIntegerCoordinate;
884
914
  height?: GPUIntegerCoordinate;
@@ -890,6 +920,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
890
920
  source: HTMLVideoElement | VideoFrame;
891
921
  }
892
922
 
923
+ interface GPUFragmentState extends GPUProgrammableStage {
924
+ targets: (GPUColorTargetState | null)[];
925
+ }
926
+
927
+ interface GPUMultisampleState {
928
+ alphaToCoverageEnabled?: boolean;
929
+ count?: GPUSize32;
930
+ mask?: GPUSampleMask;
931
+ }
932
+
893
933
  interface GPUObjectDescriptorBase {
894
934
  label?: string;
895
935
  }
@@ -917,6 +957,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
917
957
  bindGroupLayouts: (GPUBindGroupLayout | null)[];
918
958
  }
919
959
 
960
+ interface GPUPrimitiveState {
961
+ cullMode?: GPUCullMode;
962
+ frontFace?: GPUFrontFace;
963
+ stripIndexFormat?: GPUIndexFormat;
964
+ topology?: GPUPrimitiveTopology;
965
+ unclippedDepth?: boolean;
966
+ }
967
+
920
968
  interface GPUProgrammableStage {
921
969
  constants?: Record<string, GPUPipelineConstantValue>;
922
970
  entryPoint?: string;
@@ -977,6 +1025,14 @@ interface GPURenderPassTimestampWrites {
977
1025
  querySet: GPUQuerySet;
978
1026
  }
979
1027
 
1028
+ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
1029
+ depthStencil?: GPUDepthStencilState;
1030
+ fragment?: GPUFragmentState;
1031
+ multisample?: GPUMultisampleState;
1032
+ primitive?: GPUPrimitiveState;
1033
+ vertex: GPUVertexState;
1034
+ }
1035
+
980
1036
  interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
981
1037
  addressModeU?: GPUAddressMode;
982
1038
  addressModeV?: GPUAddressMode;
@@ -994,6 +1050,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
994
1050
  code: string;
995
1051
  }
996
1052
 
1053
+ interface GPUStencilFaceState {
1054
+ compare?: GPUCompareFunction;
1055
+ depthFailOp?: GPUStencilOperation;
1056
+ failOp?: GPUStencilOperation;
1057
+ passOp?: GPUStencilOperation;
1058
+ }
1059
+
997
1060
  interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
998
1061
  buffer: GPUBuffer;
999
1062
  }
@@ -1036,6 +1099,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
1036
1099
  error: GPUError;
1037
1100
  }
1038
1101
 
1102
+ interface GPUVertexAttribute {
1103
+ format: GPUVertexFormat;
1104
+ offset: GPUSize64;
1105
+ shaderLocation: GPUIndex32;
1106
+ }
1107
+
1108
+ interface GPUVertexBufferLayout {
1109
+ arrayStride: GPUSize64;
1110
+ attributes: GPUVertexAttribute[];
1111
+ stepMode?: GPUVertexStepMode;
1112
+ }
1113
+
1114
+ interface GPUVertexState extends GPUProgrammableStage {
1115
+ buffers?: (GPUVertexBufferLayout | null)[];
1116
+ }
1117
+
1039
1118
  interface GainOptions extends AudioNodeOptions {
1040
1119
  gain?: number;
1041
1120
  }
@@ -15457,6 +15536,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
15457
15536
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
15458
15537
  */
15459
15538
  createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
15539
+ /**
15540
+ * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
15541
+ *
15542
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
15543
+ */
15544
+ createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
15545
+ /**
15546
+ * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
15547
+ *
15548
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
15549
+ */
15550
+ createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
15460
15551
  /**
15461
15552
  * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
15462
15553
  *
@@ -43919,7 +44010,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
43919
44010
  type GPUBufferDynamicOffset = number;
43920
44011
  type GPUBufferUsageFlags = number;
43921
44012
  type GPUColor = number[] | GPUColorDict;
44013
+ type GPUColorWriteFlags = number;
43922
44014
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
44015
+ type GPUDepthBias = number;
43923
44016
  type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
43924
44017
  type GPUFlagsConstant = number;
43925
44018
  type GPUIndex32 = number;
@@ -43929,6 +44022,7 @@ type GPUMapModeFlags = number;
43929
44022
  type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
43930
44023
  type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
43931
44024
  type GPUPipelineConstantValue = number;
44025
+ type GPUSampleMask = number;
43932
44026
  type GPUSignedOffset32 = number;
43933
44027
  type GPUSize32 = number;
43934
44028
  type GPUSize32Out = number;
@@ -44044,24 +44138,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
44044
44138
  type FullscreenNavigationUI = "auto" | "hide" | "show";
44045
44139
  type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
44046
44140
  type GPUAutoLayoutMode = "auto";
44141
+ type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
44142
+ type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
44047
44143
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
44048
44144
  type GPUCanvasAlphaMode = "opaque" | "premultiplied";
44049
44145
  type GPUCanvasToneMappingMode = "extended" | "standard";
44050
44146
  type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
44051
44147
  type GPUCompilationMessageType = "error" | "info" | "warning";
44148
+ type GPUCullMode = "back" | "front" | "none";
44052
44149
  type GPUDeviceLostReason = "destroyed" | "unknown";
44053
44150
  type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
44054
44151
  type GPUFilterMode = "linear" | "nearest";
44152
+ type GPUFrontFace = "ccw" | "cw";
44055
44153
  type GPUIndexFormat = "uint16" | "uint32";
44056
44154
  type GPULoadOp = "clear" | "load";
44057
44155
  type GPUMipmapFilterMode = "linear" | "nearest";
44058
44156
  type GPUPipelineErrorReason = "internal" | "validation";
44157
+ type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
44059
44158
  type GPUQueryType = "occlusion" | "timestamp";
44159
+ type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
44060
44160
  type GPUStoreOp = "discard" | "store";
44061
44161
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
44062
44162
  type GPUTextureDimension = "1d" | "2d" | "3d";
44063
44163
  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";
44064
44164
  type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
44165
+ type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra";
44166
+ type GPUVertexStepMode = "instance" | "vertex";
44065
44167
  type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble";
44066
44168
  type GamepadHapticsResult = "complete" | "preempted";
44067
44169
  type GamepadMappingType = "" | "standard" | "xr-standard";
package/ts5.9/index.d.ts CHANGED
@@ -815,6 +815,17 @@ interface GPUBindGroupEntry {
815
815
  resource: GPUBindingResource;
816
816
  }
817
817
 
818
+ interface GPUBlendComponent {
819
+ dstFactor?: GPUBlendFactor;
820
+ operation?: GPUBlendOperation;
821
+ srcFactor?: GPUBlendFactor;
822
+ }
823
+
824
+ interface GPUBlendState {
825
+ alpha: GPUBlendComponent;
826
+ color: GPUBlendComponent;
827
+ }
828
+
818
829
  interface GPUBufferBinding {
819
830
  buffer: GPUBuffer;
820
831
  offset?: GPUSize64;
@@ -848,6 +859,12 @@ interface GPUColorDict {
848
859
  r: number;
849
860
  }
850
861
 
862
+ interface GPUColorTargetState {
863
+ blend?: GPUBlendState;
864
+ format: GPUTextureFormat;
865
+ writeMask?: GPUColorWriteFlags;
866
+ }
867
+
851
868
  interface GPUCommandBufferDescriptor extends GPUObjectDescriptorBase {
852
869
  }
853
870
 
@@ -879,6 +896,19 @@ interface GPUCopyExternalImageSourceInfo {
879
896
  source: GPUCopyExternalImageSource;
880
897
  }
881
898
 
899
+ interface GPUDepthStencilState {
900
+ depthBias?: GPUDepthBias;
901
+ depthBiasClamp?: number;
902
+ depthBiasSlopeScale?: number;
903
+ depthCompare?: GPUCompareFunction;
904
+ depthWriteEnabled?: boolean;
905
+ format: GPUTextureFormat;
906
+ stencilBack?: GPUStencilFaceState;
907
+ stencilFront?: GPUStencilFaceState;
908
+ stencilReadMask?: GPUStencilValue;
909
+ stencilWriteMask?: GPUStencilValue;
910
+ }
911
+
882
912
  interface GPUExtent3DDict {
883
913
  depthOrArrayLayers?: GPUIntegerCoordinate;
884
914
  height?: GPUIntegerCoordinate;
@@ -890,6 +920,16 @@ interface GPUExternalTextureDescriptor extends GPUObjectDescriptorBase {
890
920
  source: HTMLVideoElement | VideoFrame;
891
921
  }
892
922
 
923
+ interface GPUFragmentState extends GPUProgrammableStage {
924
+ targets: (GPUColorTargetState | null)[];
925
+ }
926
+
927
+ interface GPUMultisampleState {
928
+ alphaToCoverageEnabled?: boolean;
929
+ count?: GPUSize32;
930
+ mask?: GPUSampleMask;
931
+ }
932
+
893
933
  interface GPUObjectDescriptorBase {
894
934
  label?: string;
895
935
  }
@@ -917,6 +957,14 @@ interface GPUPipelineLayoutDescriptor extends GPUObjectDescriptorBase {
917
957
  bindGroupLayouts: (GPUBindGroupLayout | null)[];
918
958
  }
919
959
 
960
+ interface GPUPrimitiveState {
961
+ cullMode?: GPUCullMode;
962
+ frontFace?: GPUFrontFace;
963
+ stripIndexFormat?: GPUIndexFormat;
964
+ topology?: GPUPrimitiveTopology;
965
+ unclippedDepth?: boolean;
966
+ }
967
+
920
968
  interface GPUProgrammableStage {
921
969
  constants?: Record<string, GPUPipelineConstantValue>;
922
970
  entryPoint?: string;
@@ -977,6 +1025,14 @@ interface GPURenderPassTimestampWrites {
977
1025
  querySet: GPUQuerySet;
978
1026
  }
979
1027
 
1028
+ interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase {
1029
+ depthStencil?: GPUDepthStencilState;
1030
+ fragment?: GPUFragmentState;
1031
+ multisample?: GPUMultisampleState;
1032
+ primitive?: GPUPrimitiveState;
1033
+ vertex: GPUVertexState;
1034
+ }
1035
+
980
1036
  interface GPUSamplerDescriptor extends GPUObjectDescriptorBase {
981
1037
  addressModeU?: GPUAddressMode;
982
1038
  addressModeV?: GPUAddressMode;
@@ -994,6 +1050,13 @@ interface GPUShaderModuleDescriptor extends GPUObjectDescriptorBase {
994
1050
  code: string;
995
1051
  }
996
1052
 
1053
+ interface GPUStencilFaceState {
1054
+ compare?: GPUCompareFunction;
1055
+ depthFailOp?: GPUStencilOperation;
1056
+ failOp?: GPUStencilOperation;
1057
+ passOp?: GPUStencilOperation;
1058
+ }
1059
+
997
1060
  interface GPUTexelCopyBufferInfo extends GPUTexelCopyBufferLayout {
998
1061
  buffer: GPUBuffer;
999
1062
  }
@@ -1036,6 +1099,22 @@ interface GPUUncapturedErrorEventInit extends EventInit {
1036
1099
  error: GPUError;
1037
1100
  }
1038
1101
 
1102
+ interface GPUVertexAttribute {
1103
+ format: GPUVertexFormat;
1104
+ offset: GPUSize64;
1105
+ shaderLocation: GPUIndex32;
1106
+ }
1107
+
1108
+ interface GPUVertexBufferLayout {
1109
+ arrayStride: GPUSize64;
1110
+ attributes: GPUVertexAttribute[];
1111
+ stepMode?: GPUVertexStepMode;
1112
+ }
1113
+
1114
+ interface GPUVertexState extends GPUProgrammableStage {
1115
+ buffers?: (GPUVertexBufferLayout | null)[];
1116
+ }
1117
+
1039
1118
  interface GainOptions extends AudioNodeOptions {
1040
1119
  gain?: number;
1041
1120
  }
@@ -15457,6 +15536,18 @@ interface GPUDevice extends EventTarget, GPUObjectBase {
15457
15536
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderBundleEncoder)
15458
15537
  */
15459
15538
  createRenderBundleEncoder(descriptor: GPURenderBundleEncoderDescriptor): GPURenderBundleEncoder;
15539
+ /**
15540
+ * The **`createRenderPipeline()`** method of the GPUDevice interface creates a GPURenderPipeline that can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder.
15541
+ *
15542
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipeline)
15543
+ */
15544
+ createRenderPipeline(descriptor: GPURenderPipelineDescriptor): GPURenderPipeline;
15545
+ /**
15546
+ * The **`createRenderPipelineAsync()`** method of the GPUDevice interface returns a Promise that fulfills with a GPURenderPipeline, which can control the vertex and fragment shader stages and be used in a GPURenderPassEncoder or GPURenderBundleEncoder, once the pipeline can be used without any stalling.
15547
+ *
15548
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUDevice/createRenderPipelineAsync)
15549
+ */
15550
+ createRenderPipelineAsync(descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
15460
15551
  /**
15461
15552
  * The **`createSampler()`** method of the GPUDevice interface creates a GPUSampler, which controls how shaders transform and filter texture resource data.
15462
15553
  *
@@ -43919,7 +44010,9 @@ type GPUBindingResource = GPUSampler | GPUTexture | GPUTextureView | GPUBuffer |
43919
44010
  type GPUBufferDynamicOffset = number;
43920
44011
  type GPUBufferUsageFlags = number;
43921
44012
  type GPUColor = number[] | GPUColorDict;
44013
+ type GPUColorWriteFlags = number;
43922
44014
  type GPUCopyExternalImageSource = ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas;
44015
+ type GPUDepthBias = number;
43923
44016
  type GPUExtent3D = GPUIntegerCoordinate[] | GPUExtent3DDict;
43924
44017
  type GPUFlagsConstant = number;
43925
44018
  type GPUIndex32 = number;
@@ -43929,6 +44022,7 @@ type GPUMapModeFlags = number;
43929
44022
  type GPUOrigin2D = GPUIntegerCoordinate[] | GPUOrigin2DDict;
43930
44023
  type GPUOrigin3D = GPUIntegerCoordinate[] | GPUOrigin3DDict;
43931
44024
  type GPUPipelineConstantValue = number;
44025
+ type GPUSampleMask = number;
43932
44026
  type GPUSignedOffset32 = number;
43933
44027
  type GPUSize32 = number;
43934
44028
  type GPUSize32Out = number;
@@ -44044,24 +44138,32 @@ type FontFaceSetLoadStatus = "loaded" | "loading";
44044
44138
  type FullscreenNavigationUI = "auto" | "hide" | "show";
44045
44139
  type GPUAddressMode = "clamp-to-edge" | "mirror-repeat" | "repeat";
44046
44140
  type GPUAutoLayoutMode = "auto";
44141
+ type GPUBlendFactor = "constant" | "dst" | "dst-alpha" | "one" | "one-minus-constant" | "one-minus-dst" | "one-minus-dst-alpha" | "one-minus-src" | "one-minus-src-alpha" | "src" | "src-alpha" | "src-alpha-saturated" | "zero";
44142
+ type GPUBlendOperation = "add" | "max" | "min" | "reverse-subtract" | "subtract";
44047
44143
  type GPUBufferMapState = "mapped" | "pending" | "unmapped";
44048
44144
  type GPUCanvasAlphaMode = "opaque" | "premultiplied";
44049
44145
  type GPUCanvasToneMappingMode = "extended" | "standard";
44050
44146
  type GPUCompareFunction = "always" | "equal" | "greater" | "greater-equal" | "less" | "less-equal" | "never" | "not-equal";
44051
44147
  type GPUCompilationMessageType = "error" | "info" | "warning";
44148
+ type GPUCullMode = "back" | "front" | "none";
44052
44149
  type GPUDeviceLostReason = "destroyed" | "unknown";
44053
44150
  type GPUErrorFilter = "internal" | "out-of-memory" | "validation";
44054
44151
  type GPUFilterMode = "linear" | "nearest";
44152
+ type GPUFrontFace = "ccw" | "cw";
44055
44153
  type GPUIndexFormat = "uint16" | "uint32";
44056
44154
  type GPULoadOp = "clear" | "load";
44057
44155
  type GPUMipmapFilterMode = "linear" | "nearest";
44058
44156
  type GPUPipelineErrorReason = "internal" | "validation";
44157
+ type GPUPrimitiveTopology = "line-list" | "line-strip" | "point-list" | "triangle-list" | "triangle-strip";
44059
44158
  type GPUQueryType = "occlusion" | "timestamp";
44159
+ type GPUStencilOperation = "decrement-clamp" | "decrement-wrap" | "increment-clamp" | "increment-wrap" | "invert" | "keep" | "replace" | "zero";
44060
44160
  type GPUStoreOp = "discard" | "store";
44061
44161
  type GPUTextureAspect = "all" | "depth-only" | "stencil-only";
44062
44162
  type GPUTextureDimension = "1d" | "2d" | "3d";
44063
44163
  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";
44064
44164
  type GPUTextureViewDimension = "1d" | "2d" | "2d-array" | "3d" | "cube" | "cube-array";
44165
+ type GPUVertexFormat = "float16" | "float16x2" | "float16x4" | "float32" | "float32x2" | "float32x3" | "float32x4" | "sint16" | "sint16x2" | "sint16x4" | "sint32" | "sint32x2" | "sint32x3" | "sint32x4" | "sint8" | "sint8x2" | "sint8x4" | "snorm16" | "snorm16x2" | "snorm16x4" | "snorm8" | "snorm8x2" | "snorm8x4" | "uint16" | "uint16x2" | "uint16x4" | "uint32" | "uint32x2" | "uint32x3" | "uint32x4" | "uint8" | "uint8x2" | "uint8x4" | "unorm10-10-10-2" | "unorm16" | "unorm16x2" | "unorm16x4" | "unorm8" | "unorm8x2" | "unorm8x4" | "unorm8x4-bgra";
44166
+ type GPUVertexStepMode = "instance" | "vertex";
44065
44167
  type GamepadHapticEffectType = "dual-rumble" | "trigger-rumble";
44066
44168
  type GamepadHapticsResult = "complete" | "preempted";
44067
44169
  type GamepadMappingType = "" | "standard" | "xr-standard";