typegpu 0.5.4 → 0.5.5

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/data/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7UUBX6MCcjs = require('../chunk-7UUBX6MC.cjs');exports.align = _chunk7UUBX6MCcjs.jb; exports.alignmentOf = _chunk7UUBX6MCcjs.eb; exports.arrayOf = _chunk7UUBX6MCcjs.qb; exports.atomic = _chunk7UUBX6MCcjs.zb; exports.bool = _chunk7UUBX6MCcjs.L; exports.builtin = _chunk7UUBX6MCcjs.Ab; exports.disarrayOf = _chunk7UUBX6MCcjs.xb; exports.f16 = _chunk7UUBX6MCcjs.P; exports.f32 = _chunk7UUBX6MCcjs.O; exports.float16 = _chunk7UUBX6MCcjs.Na; exports.float16x2 = _chunk7UUBX6MCcjs.Oa; exports.float16x4 = _chunk7UUBX6MCcjs.Pa; exports.float32 = _chunk7UUBX6MCcjs.Qa; exports.float32x2 = _chunk7UUBX6MCcjs.Ra; exports.float32x3 = _chunk7UUBX6MCcjs.Sa; exports.float32x4 = _chunk7UUBX6MCcjs.Ta; exports.formatToWGSLType = _chunk7UUBX6MCcjs.na; exports.i32 = _chunk7UUBX6MCcjs.N; exports.interpolate = _chunk7UUBX6MCcjs.mb; exports.isAlignAttrib = _chunk7UUBX6MCcjs.$; exports.isAtomic = _chunk7UUBX6MCcjs._; exports.isBuiltin = _chunk7UUBX6MCcjs.nb; exports.isBuiltinAttrib = _chunk7UUBX6MCcjs.da; exports.isData = _chunk7UUBX6MCcjs.ma; exports.isDecorated = _chunk7UUBX6MCcjs.ea; exports.isDisarray = _chunk7UUBX6MCcjs.ia; exports.isInterpolateAttrib = _chunk7UUBX6MCcjs.ca; exports.isLocationAttrib = _chunk7UUBX6MCcjs.ba; exports.isLooseData = _chunk7UUBX6MCcjs.ha; exports.isLooseDecorated = _chunk7UUBX6MCcjs.ka; exports.isPtr = _chunk7UUBX6MCcjs.Z; exports.isSizeAttrib = _chunk7UUBX6MCcjs.aa; exports.isUnstruct = _chunk7UUBX6MCcjs.ja; exports.isWgslArray = _chunk7UUBX6MCcjs.X; exports.isWgslData = _chunk7UUBX6MCcjs.W; exports.isWgslStruct = _chunk7UUBX6MCcjs.Y; exports.location = _chunk7UUBX6MCcjs.lb; exports.mat2x2f = _chunk7UUBX6MCcjs.F; exports.mat3x3f = _chunk7UUBX6MCcjs.G; exports.mat4x4f = _chunk7UUBX6MCcjs.H; exports.matToArray = _chunk7UUBX6MCcjs.I; exports.packedFormats = _chunk7UUBX6MCcjs.oa; exports.ptrFn = _chunk7UUBX6MCcjs.rb; exports.ptrHandle = _chunk7UUBX6MCcjs.wb; exports.ptrPrivate = _chunk7UUBX6MCcjs.sb; exports.ptrStorage = _chunk7UUBX6MCcjs.ub; exports.ptrUniform = _chunk7UUBX6MCcjs.vb; exports.ptrWorkgroup = _chunk7UUBX6MCcjs.tb; exports.sint16 = _chunk7UUBX6MCcjs.Ea; exports.sint16x2 = _chunk7UUBX6MCcjs.Fa; exports.sint16x4 = _chunk7UUBX6MCcjs.Ga; exports.sint32 = _chunk7UUBX6MCcjs.Ya; exports.sint32x2 = _chunk7UUBX6MCcjs.Za; exports.sint32x3 = _chunk7UUBX6MCcjs._a; exports.sint32x4 = _chunk7UUBX6MCcjs.$a; exports.sint8 = _chunk7UUBX6MCcjs.sa; exports.sint8x2 = _chunk7UUBX6MCcjs.ta; exports.sint8x4 = _chunk7UUBX6MCcjs.ua; exports.size = _chunk7UUBX6MCcjs.kb; exports.sizeOf = _chunk7UUBX6MCcjs.hb; exports.snorm16 = _chunk7UUBX6MCcjs.Ka; exports.snorm16x2 = _chunk7UUBX6MCcjs.La; exports.snorm16x4 = _chunk7UUBX6MCcjs.Ma; exports.snorm8 = _chunk7UUBX6MCcjs.ya; exports.snorm8x2 = _chunk7UUBX6MCcjs.za; exports.snorm8x4 = _chunk7UUBX6MCcjs.Aa; exports.struct = _chunk7UUBX6MCcjs.pb; exports.u32 = _chunk7UUBX6MCcjs.M; exports.uint16 = _chunk7UUBX6MCcjs.Ba; exports.uint16x2 = _chunk7UUBX6MCcjs.Ca; exports.uint16x4 = _chunk7UUBX6MCcjs.Da; exports.uint32 = _chunk7UUBX6MCcjs.Ua; exports.uint32x2 = _chunk7UUBX6MCcjs.Va; exports.uint32x3 = _chunk7UUBX6MCcjs.Wa; exports.uint32x4 = _chunk7UUBX6MCcjs.Xa; exports.uint8 = _chunk7UUBX6MCcjs.pa; exports.uint8x2 = _chunk7UUBX6MCcjs.qa; exports.uint8x4 = _chunk7UUBX6MCcjs.ra; exports.unorm10_10_10_2 = _chunk7UUBX6MCcjs.ab; exports.unorm16 = _chunk7UUBX6MCcjs.Ha; exports.unorm16x2 = _chunk7UUBX6MCcjs.Ia; exports.unorm16x4 = _chunk7UUBX6MCcjs.Ja; exports.unorm8 = _chunk7UUBX6MCcjs.va; exports.unorm8x2 = _chunk7UUBX6MCcjs.wa; exports.unorm8x4 = _chunk7UUBX6MCcjs.xa; exports.unorm8x4_bgra = _chunk7UUBX6MCcjs.bb; exports.unstruct = _chunk7UUBX6MCcjs.yb; exports.vec2b = _chunk7UUBX6MCcjs.u; exports.vec2f = _chunk7UUBX6MCcjs.q; exports.vec2h = _chunk7UUBX6MCcjs.r; exports.vec2i = _chunk7UUBX6MCcjs.s; exports.vec2u = _chunk7UUBX6MCcjs.t; exports.vec3b = _chunk7UUBX6MCcjs.z; exports.vec3f = _chunk7UUBX6MCcjs.v; exports.vec3h = _chunk7UUBX6MCcjs.w; exports.vec3i = _chunk7UUBX6MCcjs.x; exports.vec3u = _chunk7UUBX6MCcjs.y; exports.vec4b = _chunk7UUBX6MCcjs.E; exports.vec4f = _chunk7UUBX6MCcjs.A; exports.vec4h = _chunk7UUBX6MCcjs.B; exports.vec4i = _chunk7UUBX6MCcjs.C; exports.vec4u = _chunk7UUBX6MCcjs.D;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkA6AAWPBUcjs = require('../chunk-A6AAWPBU.cjs');var _chunkVUYQ2ZIKcjs = require('../chunk-VUYQ2ZIK.cjs');exports.align = _chunkA6AAWPBUcjs.ea; exports.alignmentOf = _chunkA6AAWPBUcjs.$; exports.arrayOf = _chunkA6AAWPBUcjs.la; exports.atomic = _chunkA6AAWPBUcjs.ua; exports.bool = _chunkVUYQ2ZIKcjs.M; exports.builtin = _chunkA6AAWPBUcjs.va; exports.disarrayOf = _chunkA6AAWPBUcjs.sa; exports.f16 = _chunkVUYQ2ZIKcjs.Q; exports.f32 = _chunkVUYQ2ZIKcjs.P; exports.float16 = _chunkA6AAWPBUcjs.I; exports.float16x2 = _chunkA6AAWPBUcjs.J; exports.float16x4 = _chunkA6AAWPBUcjs.K; exports.float32 = _chunkA6AAWPBUcjs.L; exports.float32x2 = _chunkA6AAWPBUcjs.M; exports.float32x3 = _chunkA6AAWPBUcjs.N; exports.float32x4 = _chunkA6AAWPBUcjs.O; exports.formatToWGSLType = _chunkA6AAWPBUcjs.i; exports.i32 = _chunkVUYQ2ZIKcjs.O; exports.interpolate = _chunkA6AAWPBUcjs.ha; exports.isAlignAttrib = _chunkVUYQ2ZIKcjs.ca; exports.isAtomic = _chunkVUYQ2ZIKcjs.ba; exports.isBuiltin = _chunkA6AAWPBUcjs.ia; exports.isBuiltinAttrib = _chunkVUYQ2ZIKcjs.ga; exports.isData = _chunkA6AAWPBUcjs.h; exports.isDecorated = _chunkVUYQ2ZIKcjs.ha; exports.isDisarray = _chunkA6AAWPBUcjs.d; exports.isInterpolateAttrib = _chunkVUYQ2ZIKcjs.fa; exports.isLocationAttrib = _chunkVUYQ2ZIKcjs.ea; exports.isLooseData = _chunkA6AAWPBUcjs.c; exports.isLooseDecorated = _chunkA6AAWPBUcjs.f; exports.isPtr = _chunkVUYQ2ZIKcjs.aa; exports.isSizeAttrib = _chunkVUYQ2ZIKcjs.da; exports.isUnstruct = _chunkA6AAWPBUcjs.e; exports.isWgslArray = _chunkVUYQ2ZIKcjs._; exports.isWgslData = _chunkVUYQ2ZIKcjs.Z; exports.isWgslStruct = _chunkVUYQ2ZIKcjs.$; exports.location = _chunkA6AAWPBUcjs.ga; exports.mat2x2f = _chunkVUYQ2ZIKcjs.G; exports.mat3x3f = _chunkVUYQ2ZIKcjs.H; exports.mat4x4f = _chunkVUYQ2ZIKcjs.I; exports.matToArray = _chunkVUYQ2ZIKcjs.J; exports.packedFormats = _chunkA6AAWPBUcjs.j; exports.ptrFn = _chunkA6AAWPBUcjs.ma; exports.ptrHandle = _chunkA6AAWPBUcjs.ra; exports.ptrPrivate = _chunkA6AAWPBUcjs.na; exports.ptrStorage = _chunkA6AAWPBUcjs.pa; exports.ptrUniform = _chunkA6AAWPBUcjs.qa; exports.ptrWorkgroup = _chunkA6AAWPBUcjs.oa; exports.sint16 = _chunkA6AAWPBUcjs.z; exports.sint16x2 = _chunkA6AAWPBUcjs.A; exports.sint16x4 = _chunkA6AAWPBUcjs.B; exports.sint32 = _chunkA6AAWPBUcjs.T; exports.sint32x2 = _chunkA6AAWPBUcjs.U; exports.sint32x3 = _chunkA6AAWPBUcjs.V; exports.sint32x4 = _chunkA6AAWPBUcjs.W; exports.sint8 = _chunkA6AAWPBUcjs.n; exports.sint8x2 = _chunkA6AAWPBUcjs.o; exports.sint8x4 = _chunkA6AAWPBUcjs.p; exports.size = _chunkA6AAWPBUcjs.fa; exports.sizeOf = _chunkA6AAWPBUcjs.ca; exports.snorm16 = _chunkA6AAWPBUcjs.F; exports.snorm16x2 = _chunkA6AAWPBUcjs.G; exports.snorm16x4 = _chunkA6AAWPBUcjs.H; exports.snorm8 = _chunkA6AAWPBUcjs.t; exports.snorm8x2 = _chunkA6AAWPBUcjs.u; exports.snorm8x4 = _chunkA6AAWPBUcjs.v; exports.struct = _chunkA6AAWPBUcjs.ka; exports.u32 = _chunkVUYQ2ZIKcjs.N; exports.uint16 = _chunkA6AAWPBUcjs.w; exports.uint16x2 = _chunkA6AAWPBUcjs.x; exports.uint16x4 = _chunkA6AAWPBUcjs.y; exports.uint32 = _chunkA6AAWPBUcjs.P; exports.uint32x2 = _chunkA6AAWPBUcjs.Q; exports.uint32x3 = _chunkA6AAWPBUcjs.R; exports.uint32x4 = _chunkA6AAWPBUcjs.S; exports.uint8 = _chunkA6AAWPBUcjs.k; exports.uint8x2 = _chunkA6AAWPBUcjs.l; exports.uint8x4 = _chunkA6AAWPBUcjs.m; exports.unorm10_10_10_2 = _chunkA6AAWPBUcjs.X; exports.unorm16 = _chunkA6AAWPBUcjs.C; exports.unorm16x2 = _chunkA6AAWPBUcjs.D; exports.unorm16x4 = _chunkA6AAWPBUcjs.E; exports.unorm8 = _chunkA6AAWPBUcjs.q; exports.unorm8x2 = _chunkA6AAWPBUcjs.r; exports.unorm8x4 = _chunkA6AAWPBUcjs.s; exports.unorm8x4_bgra = _chunkA6AAWPBUcjs.Y; exports.unstruct = _chunkA6AAWPBUcjs.ta; exports.vec2b = _chunkVUYQ2ZIKcjs.v; exports.vec2f = _chunkVUYQ2ZIKcjs.r; exports.vec2h = _chunkVUYQ2ZIKcjs.s; exports.vec2i = _chunkVUYQ2ZIKcjs.t; exports.vec2u = _chunkVUYQ2ZIKcjs.u; exports.vec3b = _chunkVUYQ2ZIKcjs.A; exports.vec3f = _chunkVUYQ2ZIKcjs.w; exports.vec3h = _chunkVUYQ2ZIKcjs.x; exports.vec3i = _chunkVUYQ2ZIKcjs.y; exports.vec3u = _chunkVUYQ2ZIKcjs.z; exports.vec4b = _chunkVUYQ2ZIKcjs.F; exports.vec4f = _chunkVUYQ2ZIKcjs.B; exports.vec4h = _chunkVUYQ2ZIKcjs.C; exports.vec4i = _chunkVUYQ2ZIKcjs.D; exports.vec4u = _chunkVUYQ2ZIKcjs.E;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/iwo/Projects/wigsill/packages/typegpu/dist/data/index.cjs"],"names":[],"mappings":"AAAA,kIAAo2B,ojIAAy8C","file":"/Users/iwo/Projects/wigsill/packages/typegpu/dist/data/index.cjs"}
1
+ {"version":3,"sources":["/Users/marcinhawryluk/Documents/wigsill/packages/typegpu/dist/data/index.cjs"],"names":[],"mappings":"AAAA,kIAAyjB,yDAAgS,sgIAAy8C","file":"/Users/marcinhawryluk/Documents/wigsill/packages/typegpu/dist/data/index.cjs"}
package/data/index.d.cts CHANGED
@@ -1,7 +1,6 @@
1
- import { z as Bool, F as F32, a as F16, b as I32, U as U32, A as AnyWgslData, W as WgslStruct, q as WgslArray, C as Ptr, V as Vec2f, e as Vec2h, h as Vec2i, k as Vec2u, E as Vec2b, c as Vec3f, f as Vec3h, i as Vec3i, l as Vec3u, G as Vec3b, d as Vec4f, g as Vec4h, j as Vec4i, m as Vec4u, H as Vec4b, B as BaseData, J as Mat2x2f, K as Mat3x3f, N as Mat4x4f, Q as m2x2f, R as m3x3f, S as m4x4f, X as Atomic } from '../wgslTypes-Bh2dG5qv.cjs';
2
- export { a9 as Align, aa as Builtin, D as Decorated, I as Infer, ab as Interpolate, L as Location, a8 as Size, a3 as isAlignAttrib, a1 as isAtomic, a4 as isBuiltinAttrib, a2 as isDecorated, a6 as isInterpolateAttrib, a5 as isLocationAttrib, a0 as isPtr, a7 as isSizeAttrib, Z as isWgslArray, Y as isWgslData, _ as isWgslStruct, ac as v2f, ad as v2i, ae as v2u, af as v3f, ag as v3i, ah as v3u, ai as v4f, aj as v4i, ak as v4u } from '../wgslTypes-Bh2dG5qv.cjs';
3
- import { f as AnyData, d as Disarray, U as Unstruct } from '../attributes-BdU8hyQq.cjs';
4
- export { A as AnyAttribute, J as AnyBuiltin, g as AnyLooseData, u as BuiltinClipDistances, w as BuiltinFragDepth, v as BuiltinFrontFacing, E as BuiltinGlobalInvocationId, r as BuiltinInstanceIndex, z as BuiltinLocalInvocationId, C as BuiltinLocalInvocationIndex, G as BuiltinNumWorkgroups, t as BuiltinPosition, x as BuiltinSampleIndex, y as BuiltinSampleMask, B as BuiltinVertexIndex, F as BuiltinWorkgroupId, M as FormatToWGSLType, H as HasCustomLocation, I as IsBuiltin, L as LooseDecorated, ax as PackedData, N as TgpuVertexFormatData, h as align, q as builtin, ag as float16, ah as float16x2, ai as float16x4, aj as float32, ak as float32x2, al as float32x3, am as float32x4, P as formatToWGSLType, i as interpolate, j as isBuiltin, o as isData, k as isDisarray, p as isLooseData, n as isLooseDecorated, m as isUnstruct, l as location, Q as packedFormats, a7 as sint16, a8 as sint16x2, a9 as sint16x4, ar as sint32, as as sint32x2, at as sint32x3, au as sint32x4, X as sint8, Y as sint8x2, Z as sint8x4, s as size, ad as snorm16, ae as snorm16x2, af as snorm16x4, a1 as snorm8, a2 as snorm8x2, a3 as snorm8x4, a4 as uint16, a5 as uint16x2, a6 as uint16x4, an as uint32, ao as uint32x2, ap as uint32x3, aq as uint32x4, R as uint8, S as uint8x2, W as uint8x4, av as unorm10_10_10_2, aa as unorm16, ab as unorm16x2, ac as unorm16x4, _ as unorm8, $ as unorm8x2, a0 as unorm8x4, aw as unorm8x4_bgra } from '../attributes-BdU8hyQq.cjs';
1
+ import { J as Bool, F as F32, a as F16, b as I32, U as U32, A as AnyWgslData, W as WgslStruct, p as WgslArray, v as AnyData, N as Ptr, V as Vec2f, e as Vec2h, h as Vec2i, k as Vec2u, Q as Vec2b, c as Vec3f, f as Vec3h, i as Vec3i, l as Vec3u, R as Vec3b, d as Vec4f, g as Vec4h, j as Vec4i, m as Vec4u, S as Vec4b, q as Disarray, B as BaseData, X as Unstruct, Y as Mat2x2f, Z as Mat3x3f, _ as Mat4x4f, a0 as m2x2f, a1 as m3x3f, a2 as m4x4f, a3 as Atomic } from '../dataTypes-ts2Ccted.cjs';
2
+ export { ag as Align, at as AnyLooseData, G as AnyVecInstance, ah as Builtin, D as Decorated, az as FormatToWGSLType, I as Infer, ai as Interpolate, L as Location, as as LooseDecorated, bg as PackedData, af as Size, aA as TgpuVertexFormatData, a$ as float16, b0 as float16x2, b1 as float16x4, b2 as float32, b3 as float32x2, b4 as float32x3, b5 as float32x4, aB as formatToWGSLType, aa as isAlignAttrib, a8 as isAtomic, ab as isBuiltinAttrib, ax as isData, a9 as isDecorated, au as isDisarray, ad as isInterpolateAttrib, ac as isLocationAttrib, ay as isLooseData, aw as isLooseDecorated, a7 as isPtr, ae as isSizeAttrib, av as isUnstruct, a5 as isWgslArray, a4 as isWgslData, a6 as isWgslStruct, aC as packedFormats, aS as sint16, aT as sint16x2, aU as sint16x4, ba as sint32, bb as sint32x2, bc as sint32x3, bd as sint32x4, aG as sint8, aH as sint8x2, aI as sint8x4, aY as snorm16, aZ as snorm16x2, a_ as snorm16x4, aM as snorm8, aN as snorm8x2, aO as snorm8x4, aP as uint16, aQ as uint16x2, aR as uint16x4, b6 as uint32, b7 as uint32x2, b8 as uint32x3, b9 as uint32x4, aD as uint8, aE as uint8x2, aF as uint8x4, be as unorm10_10_10_2, aV as unorm16, aW as unorm16x2, aX as unorm16x4, aJ as unorm8, aK as unorm8x2, aL as unorm8x4, bf as unorm8x4_bgra, aj as v2f, ak as v2i, al as v2u, am as v3f, an as v3i, ao as v3u, ap as v4f, aq as v4i, ar as v4u } from '../dataTypes-ts2Ccted.cjs';
3
+ export { A as AnyAttribute, v as AnyBuiltin, j as BuiltinClipDistances, m as BuiltinFragDepth, k as BuiltinFrontFacing, r as BuiltinGlobalInvocationId, g as BuiltinInstanceIndex, p as BuiltinLocalInvocationId, q as BuiltinLocalInvocationIndex, u as BuiltinNumWorkgroups, h as BuiltinPosition, n as BuiltinSampleIndex, o as BuiltinSampleMask, B as BuiltinVertexIndex, t as BuiltinWorkgroupId, H as HasCustomLocation, I as IsBuiltin, d as align, f as builtin, i as interpolate, e as isBuiltin, l as location, s as size } from '../attributes-BcDZsQCE.cjs';
5
4
 
6
5
  /**
7
6
  * A schema that represents a boolean value. (equivalent to `bool` in WGSL)
package/data/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { z as Bool, F as F32, a as F16, b as I32, U as U32, A as AnyWgslData, W as WgslStruct, q as WgslArray, C as Ptr, V as Vec2f, e as Vec2h, h as Vec2i, k as Vec2u, E as Vec2b, c as Vec3f, f as Vec3h, i as Vec3i, l as Vec3u, G as Vec3b, d as Vec4f, g as Vec4h, j as Vec4i, m as Vec4u, H as Vec4b, B as BaseData, J as Mat2x2f, K as Mat3x3f, N as Mat4x4f, Q as m2x2f, R as m3x3f, S as m4x4f, X as Atomic } from '../wgslTypes-Bh2dG5qv.js';
2
- export { a9 as Align, aa as Builtin, D as Decorated, I as Infer, ab as Interpolate, L as Location, a8 as Size, a3 as isAlignAttrib, a1 as isAtomic, a4 as isBuiltinAttrib, a2 as isDecorated, a6 as isInterpolateAttrib, a5 as isLocationAttrib, a0 as isPtr, a7 as isSizeAttrib, Z as isWgslArray, Y as isWgslData, _ as isWgslStruct, ac as v2f, ad as v2i, ae as v2u, af as v3f, ag as v3i, ah as v3u, ai as v4f, aj as v4i, ak as v4u } from '../wgslTypes-Bh2dG5qv.js';
3
- import { f as AnyData, d as Disarray, U as Unstruct } from '../attributes-CAsvE5Z9.js';
4
- export { A as AnyAttribute, J as AnyBuiltin, g as AnyLooseData, u as BuiltinClipDistances, w as BuiltinFragDepth, v as BuiltinFrontFacing, E as BuiltinGlobalInvocationId, r as BuiltinInstanceIndex, z as BuiltinLocalInvocationId, C as BuiltinLocalInvocationIndex, G as BuiltinNumWorkgroups, t as BuiltinPosition, x as BuiltinSampleIndex, y as BuiltinSampleMask, B as BuiltinVertexIndex, F as BuiltinWorkgroupId, M as FormatToWGSLType, H as HasCustomLocation, I as IsBuiltin, L as LooseDecorated, ax as PackedData, N as TgpuVertexFormatData, h as align, q as builtin, ag as float16, ah as float16x2, ai as float16x4, aj as float32, ak as float32x2, al as float32x3, am as float32x4, P as formatToWGSLType, i as interpolate, j as isBuiltin, o as isData, k as isDisarray, p as isLooseData, n as isLooseDecorated, m as isUnstruct, l as location, Q as packedFormats, a7 as sint16, a8 as sint16x2, a9 as sint16x4, ar as sint32, as as sint32x2, at as sint32x3, au as sint32x4, X as sint8, Y as sint8x2, Z as sint8x4, s as size, ad as snorm16, ae as snorm16x2, af as snorm16x4, a1 as snorm8, a2 as snorm8x2, a3 as snorm8x4, a4 as uint16, a5 as uint16x2, a6 as uint16x4, an as uint32, ao as uint32x2, ap as uint32x3, aq as uint32x4, R as uint8, S as uint8x2, W as uint8x4, av as unorm10_10_10_2, aa as unorm16, ab as unorm16x2, ac as unorm16x4, _ as unorm8, $ as unorm8x2, a0 as unorm8x4, aw as unorm8x4_bgra } from '../attributes-CAsvE5Z9.js';
1
+ import { J as Bool, F as F32, a as F16, b as I32, U as U32, A as AnyWgslData, W as WgslStruct, p as WgslArray, v as AnyData, N as Ptr, V as Vec2f, e as Vec2h, h as Vec2i, k as Vec2u, Q as Vec2b, c as Vec3f, f as Vec3h, i as Vec3i, l as Vec3u, R as Vec3b, d as Vec4f, g as Vec4h, j as Vec4i, m as Vec4u, S as Vec4b, q as Disarray, B as BaseData, X as Unstruct, Y as Mat2x2f, Z as Mat3x3f, _ as Mat4x4f, a0 as m2x2f, a1 as m3x3f, a2 as m4x4f, a3 as Atomic } from '../dataTypes-ts2Ccted.js';
2
+ export { ag as Align, at as AnyLooseData, G as AnyVecInstance, ah as Builtin, D as Decorated, az as FormatToWGSLType, I as Infer, ai as Interpolate, L as Location, as as LooseDecorated, bg as PackedData, af as Size, aA as TgpuVertexFormatData, a$ as float16, b0 as float16x2, b1 as float16x4, b2 as float32, b3 as float32x2, b4 as float32x3, b5 as float32x4, aB as formatToWGSLType, aa as isAlignAttrib, a8 as isAtomic, ab as isBuiltinAttrib, ax as isData, a9 as isDecorated, au as isDisarray, ad as isInterpolateAttrib, ac as isLocationAttrib, ay as isLooseData, aw as isLooseDecorated, a7 as isPtr, ae as isSizeAttrib, av as isUnstruct, a5 as isWgslArray, a4 as isWgslData, a6 as isWgslStruct, aC as packedFormats, aS as sint16, aT as sint16x2, aU as sint16x4, ba as sint32, bb as sint32x2, bc as sint32x3, bd as sint32x4, aG as sint8, aH as sint8x2, aI as sint8x4, aY as snorm16, aZ as snorm16x2, a_ as snorm16x4, aM as snorm8, aN as snorm8x2, aO as snorm8x4, aP as uint16, aQ as uint16x2, aR as uint16x4, b6 as uint32, b7 as uint32x2, b8 as uint32x3, b9 as uint32x4, aD as uint8, aE as uint8x2, aF as uint8x4, be as unorm10_10_10_2, aV as unorm16, aW as unorm16x2, aX as unorm16x4, aJ as unorm8, aK as unorm8x2, aL as unorm8x4, bf as unorm8x4_bgra, aj as v2f, ak as v2i, al as v2u, am as v3f, an as v3i, ao as v3u, ap as v4f, aq as v4i, ar as v4u } from '../dataTypes-ts2Ccted.js';
3
+ export { A as AnyAttribute, v as AnyBuiltin, j as BuiltinClipDistances, m as BuiltinFragDepth, k as BuiltinFrontFacing, r as BuiltinGlobalInvocationId, g as BuiltinInstanceIndex, p as BuiltinLocalInvocationId, q as BuiltinLocalInvocationIndex, u as BuiltinNumWorkgroups, h as BuiltinPosition, n as BuiltinSampleIndex, o as BuiltinSampleMask, B as BuiltinVertexIndex, t as BuiltinWorkgroupId, H as HasCustomLocation, I as IsBuiltin, d as align, f as builtin, i as interpolate, e as isBuiltin, l as location, s as size } from '../attributes-DsIdcdq4.js';
5
4
 
6
5
  /**
7
6
  * A schema that represents a boolean value. (equivalent to `bool` in WGSL)
package/data/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{$ as D,$a as Aa,A as k,Aa as $,Ab as Va,B as l,Ba as aa,C as m,Ca as ba,D as n,Da as ca,E as o,Ea as da,F as p,Fa as ea,G as q,Ga as fa,H as r,Ha as ga,I as s,Ia as ha,Ja as ia,Ka as ja,L as t,La as ka,M as u,Ma as la,N as v,Na as ma,O as w,Oa as na,P as x,Pa as oa,Qa as pa,Ra as qa,Sa as ra,Ta as sa,Ua as ta,Va as ua,W as y,Wa as va,X as z,Xa as wa,Y as A,Ya as xa,Z as B,Za as ya,_ as C,_a as za,aa as E,ab as Ba,ba as F,bb as Ca,ca as G,da as H,ea as I,eb as Da,ha as J,hb as Ea,ia as K,ja as L,jb as Fa,ka as M,kb as Ga,lb as Ha,ma as N,mb as Ia,na as O,nb as Ja,oa as P,pa as Q,pb as Ka,q as a,qa as R,qb as La,r as b,ra as S,rb as Ma,s as c,sa as T,sb as Na,t as d,ta as U,tb as Oa,u as e,ua as V,ub as Pa,v as f,va as W,vb as Qa,w as g,wa as X,wb as Ra,x as h,xa as Y,xb as Sa,y as i,ya as Z,yb as Ta,z as j,za as _,zb as Ua}from"../chunk-AKBL6GDL.js";export{Fa as align,Da as alignmentOf,La as arrayOf,Ua as atomic,t as bool,Va as builtin,Sa as disarrayOf,x as f16,w as f32,ma as float16,na as float16x2,oa as float16x4,pa as float32,qa as float32x2,ra as float32x3,sa as float32x4,O as formatToWGSLType,v as i32,Ia as interpolate,D as isAlignAttrib,C as isAtomic,Ja as isBuiltin,H as isBuiltinAttrib,N as isData,I as isDecorated,K as isDisarray,G as isInterpolateAttrib,F as isLocationAttrib,J as isLooseData,M as isLooseDecorated,B as isPtr,E as isSizeAttrib,L as isUnstruct,z as isWgslArray,y as isWgslData,A as isWgslStruct,Ha as location,p as mat2x2f,q as mat3x3f,r as mat4x4f,s as matToArray,P as packedFormats,Ma as ptrFn,Ra as ptrHandle,Na as ptrPrivate,Pa as ptrStorage,Qa as ptrUniform,Oa as ptrWorkgroup,da as sint16,ea as sint16x2,fa as sint16x4,xa as sint32,ya as sint32x2,za as sint32x3,Aa as sint32x4,T as sint8,U as sint8x2,V as sint8x4,Ga as size,Ea as sizeOf,ja as snorm16,ka as snorm16x2,la as snorm16x4,Z as snorm8,_ as snorm8x2,$ as snorm8x4,Ka as struct,u as u32,aa as uint16,ba as uint16x2,ca as uint16x4,ta as uint32,ua as uint32x2,va as uint32x3,wa as uint32x4,Q as uint8,R as uint8x2,S as uint8x4,Ba as unorm10_10_10_2,ga as unorm16,ha as unorm16x2,ia as unorm16x4,W as unorm8,X as unorm8x2,Y as unorm8x4,Ca as unorm8x4_bgra,Ta as unstruct,e as vec2b,a as vec2f,b as vec2h,c as vec2i,d as vec2u,j as vec3b,f as vec3f,g as vec3h,h as vec3i,i as vec3u,o as vec4b,k as vec4f,l as vec4h,m as vec4i,n as vec4u};
1
+ import{$ as Da,A as ea,B as fa,C as ga,D as ha,E as ia,F as ja,G as ka,H as la,I as ma,J as na,K as oa,L as pa,M as qa,N as ra,O as sa,P as ta,Q as ua,R as va,S as wa,T as xa,U as ya,V as za,W as Aa,X as Ba,Y as Ca,c as J,ca as Ea,d as K,e as L,ea as Fa,f as M,fa as Ga,ga as Ha,h as N,ha as Ia,i as O,ia as Ja,j as P,k as Q,ka as Ka,l as R,la as La,m as S,ma as Ma,n as T,na as Na,o as U,oa as Oa,p as V,pa as Pa,q as W,qa as Qa,r as X,ra as Ra,s as Y,sa as Sa,t as Z,ta as Ta,u as _,ua as Ua,v as $,va as Va,w as aa,x as ba,y as ca,z as da}from"../chunk-HZAXWB4J.js";import{$ as A,A as j,B as k,C as l,D as m,E as n,F as o,G as p,H as q,I as r,J as s,M as t,N as u,O as v,P as w,Q as x,Z as y,_ as z,aa as B,ba as C,ca as D,da as E,ea as F,fa as G,ga as H,ha as I,r as a,s as b,t as c,u as d,v as e,w as f,x as g,y as h,z as i}from"../chunk-T5Y2EQPZ.js";export{Fa as align,Da as alignmentOf,La as arrayOf,Ua as atomic,t as bool,Va as builtin,Sa as disarrayOf,x as f16,w as f32,ma as float16,na as float16x2,oa as float16x4,pa as float32,qa as float32x2,ra as float32x3,sa as float32x4,O as formatToWGSLType,v as i32,Ia as interpolate,D as isAlignAttrib,C as isAtomic,Ja as isBuiltin,H as isBuiltinAttrib,N as isData,I as isDecorated,K as isDisarray,G as isInterpolateAttrib,F as isLocationAttrib,J as isLooseData,M as isLooseDecorated,B as isPtr,E as isSizeAttrib,L as isUnstruct,z as isWgslArray,y as isWgslData,A as isWgslStruct,Ha as location,p as mat2x2f,q as mat3x3f,r as mat4x4f,s as matToArray,P as packedFormats,Ma as ptrFn,Ra as ptrHandle,Na as ptrPrivate,Pa as ptrStorage,Qa as ptrUniform,Oa as ptrWorkgroup,da as sint16,ea as sint16x2,fa as sint16x4,xa as sint32,ya as sint32x2,za as sint32x3,Aa as sint32x4,T as sint8,U as sint8x2,V as sint8x4,Ga as size,Ea as sizeOf,ja as snorm16,ka as snorm16x2,la as snorm16x4,Z as snorm8,_ as snorm8x2,$ as snorm8x4,Ka as struct,u as u32,aa as uint16,ba as uint16x2,ca as uint16x4,ta as uint32,ua as uint32x2,va as uint32x3,wa as uint32x4,Q as uint8,R as uint8x2,S as uint8x4,Ba as unorm10_10_10_2,ga as unorm16,ha as unorm16x2,ia as unorm16x4,W as unorm8,X as unorm8x2,Y as unorm8x4,Ca as unorm8x4_bgra,Ta as unstruct,e as vec2b,a as vec2f,b as vec2h,c as vec2i,d as vec2u,j as vec3b,f as vec3f,g as vec3h,h as vec3i,i as vec3u,o as vec4b,k as vec4f,l as vec4h,m as vec4i,n as vec4u};
2
2
  //# sourceMappingURL=index.js.map
@@ -88,6 +88,11 @@ interface AbstractFloat {
88
88
  /** Type-token, not available at runtime */
89
89
  readonly [$repr]: number;
90
90
  }
91
+ interface Void {
92
+ readonly type: 'void';
93
+ readonly [$repr]: undefined;
94
+ }
95
+ declare const Void: Void;
91
96
  interface Swizzle2<T2, T3, T4> {
92
97
  readonly xx: T2;
93
98
  readonly xy: T2;
@@ -963,7 +968,7 @@ interface WgslStruct<TProps extends Record<string, BaseData> = Record<string, Ba
963
968
  /** Type-token, not available at runtime */
964
969
  readonly '~gpuRepr': Prettify<InferGPURecord<TProps>>;
965
970
  /** Type-token, not available at runtime */
966
- readonly '~memIdent': WgslStruct<MemIdentityRecord<TProps>>;
971
+ readonly '~memIdent': WgslStruct<Prettify<MemIdentityRecord<TProps>>>;
967
972
  /** Type-token, not available at runtime */
968
973
  readonly '~reprPartial': Prettify<Partial<InferPartialRecord<TProps>>>;
969
974
  }
@@ -1029,12 +1034,14 @@ interface Decorated<TInner extends BaseData = BaseData, TAttribs extends unknown
1029
1034
  readonly '~reprPartial': InferPartial<TInner>;
1030
1035
  readonly '~memIdent': TAttribs extends Location<number>[] ? MemIdentity<TInner> | Decorated<MemIdentity<TInner>, TAttribs> : Decorated<MemIdentity<TInner>, TAttribs>;
1031
1036
  }
1032
- declare const wgslTypeLiterals: readonly ["bool", "f32", "f16", "i32", "u32", "vec2f", "vec2h", "vec2i", "vec2u", "vec2<bool>", "vec3f", "vec3h", "vec3i", "vec3u", "vec3<bool>", "vec4f", "vec4h", "vec4i", "vec4u", "vec4<bool>", "mat2x2f", "mat3x3f", "mat4x4f", "struct", "array", "ptr", "atomic", "decorated", "abstractInt", "abstractFloat"];
1037
+ declare const wgslTypeLiterals: readonly ["bool", "f32", "f16", "i32", "u32", "vec2f", "vec2h", "vec2i", "vec2u", "vec2<bool>", "vec3f", "vec3h", "vec3i", "vec3u", "vec3<bool>", "vec4f", "vec4h", "vec4i", "vec4u", "vec4<bool>", "mat2x2f", "mat3x3f", "mat4x4f", "struct", "array", "ptr", "atomic", "decorated", "abstractInt", "abstractFloat", "void"];
1033
1038
  type WgslTypeLiteral = (typeof wgslTypeLiterals)[number];
1034
- type PerspectiveOrLinearInterpolatableData = F32 | F16 | Vec2f | Vec2h | Vec3f | Vec3h | Vec4f | Vec4h;
1035
- type FlatInterpolatableData = PerspectiveOrLinearInterpolatableData | I32 | U32 | Vec2i | Vec2u | Vec3i | Vec3u | Vec4i | Vec4u;
1039
+ type PerspectiveOrLinearInterpolatableBaseType = F32 | F16 | Vec2f | Vec2h | Vec3f | Vec3h | Vec4f | Vec4h;
1040
+ type PerspectiveOrLinearInterpolatableData = PerspectiveOrLinearInterpolatableBaseType | Decorated<PerspectiveOrLinearInterpolatableBaseType>;
1041
+ type FlatInterpolatableAdditionalBaseType = I32 | U32 | Vec2i | Vec2u | Vec3i | Vec3u | Vec4i | Vec4u;
1042
+ type FlatInterpolatableData = PerspectiveOrLinearInterpolatableData | FlatInterpolatableAdditionalBaseType | Decorated<FlatInterpolatableAdditionalBaseType>;
1036
1043
  type ScalarData = Bool | F32 | F16 | I32 | U32 | AbstractInt | AbstractFloat;
1037
- type AnyWgslData = Bool | F32 | F16 | I32 | U32 | Vec2f | Vec2h | Vec2i | Vec2u | Vec2b | Vec3f | Vec3h | Vec3i | Vec3u | Vec3b | Vec4f | Vec4h | Vec4i | Vec4u | Vec4b | Mat2x2f | Mat3x3f | Mat4x4f | AnyWgslStruct | WgslArray | Ptr | Atomic | Decorated | AbstractInt | AbstractFloat;
1044
+ type AnyWgslData = Bool | F32 | F16 | I32 | U32 | Vec2f | Vec2h | Vec2i | Vec2u | Vec2b | Vec3f | Vec3h | Vec3i | Vec3u | Vec3b | Vec4f | Vec4h | Vec4i | Vec4u | Vec4b | Mat2x2f | Mat3x3f | Mat4x4f | AnyWgslStruct | WgslArray | Ptr | Atomic | Decorated | AbstractInt | AbstractFloat | Void;
1038
1045
  declare function isWgslData(value: unknown): value is AnyWgslData;
1039
1046
  /**
1040
1047
  * Checks whether passed in value is an array schema,
@@ -1085,4 +1092,291 @@ declare function isInterpolateAttrib<T extends Interpolate<InterpolationType>>(v
1085
1092
  declare function isBuiltinAttrib<T extends Builtin<string>>(value: unknown | T): value is T;
1086
1093
  declare function isDecorated<T extends Decorated>(value: unknown | T): value is T;
1087
1094
 
1088
- export { $repr as $, type AnyWgslData as A, type BaseData as B, type Ptr as C, type Decorated as D, type Vec2b as E, type F32 as F, type Vec3b as G, type Vec4b as H, type Infer as I, type Mat2x2f as J, type Mat3x3f as K, type Location as L, type Mutable as M, type Mat4x4f as N, type OmitProps as O, type Prettify as P, type m2x2f as Q, type m3x3f as R, type m4x4f as S, type TgpuNamable as T, type U32 as U, type Vec2f as V, type WgslStruct as W, type Atomic as X, isWgslData as Y, isWgslArray as Z, isWgslStruct as _, type F16 as a, isPtr as a0, isAtomic as a1, isDecorated as a2, isAlignAttrib as a3, isBuiltinAttrib as a4, isLocationAttrib as a5, isInterpolateAttrib as a6, isSizeAttrib as a7, type Size as a8, type Align as a9, type v4b as aA, type AnyBooleanVecInstance as aB, type ScalarData as aC, type atomicI32 as aD, type atomicU32 as aE, type Builtin as aa, type Interpolate as ab, type v2f as ac, type v2i as ad, type v2u as ae, type v3f as af, type v3i as ag, type v3u as ah, type v4f as ai, type v4i as aj, type v4u as ak, type InferRecord as al, type InferPartialRecord as am, type InterpolationType as an, type PerspectiveOrLinearInterpolationType as ao, type PerspectiveOrLinearInterpolatableData as ap, type FlatInterpolationType as aq, type FlatInterpolatableData as ar, type AnyNumericVecInstance as as, type vBaseForMat as at, type AnyFloatVecInstance as au, type v3h as av, type AnyVec2Instance as aw, type v2b as ax, type AnyVec3Instance as ay, type v3b as az, type I32 as b, type Vec3f as c, type Vec4f as d, type Vec2h as e, type Vec3h as f, type Vec4h as g, type Vec2i as h, type Vec3i as i, type Vec4i as j, type Vec2u as k, type Vec3u as l, type Vec4u as m, type AnyWgslStruct as n, type Default as o, type UnionToIntersection as p, type WgslArray as q, type WgslTypeLiteral as r, type InferPartial as s, type MemIdentity as t, type InferGPU as u, type AbstractInt as v, type AbstractFloat as w, type AnyVecInstance as x, type AnyMatInstance as y, type Bool as z };
1095
+ declare const $internal: unique symbol;
1096
+
1097
+ declare const vertexFormats: readonly ["uint8", "uint8x2", "uint8x4", "sint8", "sint8x2", "sint8x4", "unorm8", "unorm8x2", "unorm8x4", "snorm8", "snorm8x2", "snorm8x4", "uint16", "uint16x2", "uint16x4", "sint16", "sint16x2", "sint16x4", "unorm16", "unorm16x2", "unorm16x4", "snorm16", "snorm16x2", "snorm16x4", "float16", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4", "unorm10-10-10-2", "unorm8x4-bgra"];
1098
+ type VertexFormat = (typeof vertexFormats)[number];
1099
+ declare const kindToDefaultFormatMap: {
1100
+ readonly f32: "float32";
1101
+ readonly vec2f: "float32x2";
1102
+ readonly vec3f: "float32x3";
1103
+ readonly vec4f: "float32x4";
1104
+ readonly f16: "float16";
1105
+ readonly vec2h: "float16x2";
1106
+ readonly vec4h: "float16x4";
1107
+ readonly u32: "uint32";
1108
+ readonly vec2u: "uint32x2";
1109
+ readonly vec3u: "uint32x3";
1110
+ readonly vec4u: "uint32x4";
1111
+ readonly i32: "sint32";
1112
+ readonly vec2i: "sint32x2";
1113
+ readonly vec3i: "sint32x3";
1114
+ readonly vec4i: "sint32x4";
1115
+ };
1116
+ type KindToDefaultFormatMap = typeof kindToDefaultFormatMap;
1117
+ interface TgpuVertexAttrib<TFormat extends VertexFormat = VertexFormat> {
1118
+ readonly format: TFormat;
1119
+ readonly offset: number;
1120
+ }
1121
+ /**
1122
+ * All vertex attribute formats that can be interpreted as
1123
+ * an single or multi component u32 in a shader.
1124
+ * https://www.w3.org/TR/webgpu/#vertex-formats
1125
+ */
1126
+ type U32CompatibleFormats = TgpuVertexAttrib<'uint8'> | TgpuVertexAttrib<'uint8x2'> | TgpuVertexAttrib<'uint8x4'> | TgpuVertexAttrib<'uint16'> | TgpuVertexAttrib<'uint16x2'> | TgpuVertexAttrib<'uint16x4'> | TgpuVertexAttrib<'uint32'> | TgpuVertexAttrib<'uint32x2'> | TgpuVertexAttrib<'uint32x3'> | TgpuVertexAttrib<'uint32x4'>;
1127
+ /**
1128
+ * All vertex attribute formats that can be interpreted as
1129
+ * an single or multi component i32 in a shader.
1130
+ * https://www.w3.org/TR/webgpu/#vertex-formats
1131
+ */
1132
+ type I32CompatibleFormats = TgpuVertexAttrib<'sint8'> | TgpuVertexAttrib<'sint8x2'> | TgpuVertexAttrib<'sint8x4'> | TgpuVertexAttrib<'sint16'> | TgpuVertexAttrib<'sint16x2'> | TgpuVertexAttrib<'sint16x4'> | TgpuVertexAttrib<'sint32'> | TgpuVertexAttrib<'sint32x2'> | TgpuVertexAttrib<'sint32x3'> | TgpuVertexAttrib<'sint32x4'>;
1133
+ /**
1134
+ * All vertex attribute formats that can be interpreted as
1135
+ * an single or multi component f32 in a shader.
1136
+ * https://www.w3.org/TR/webgpu/#vertex-formats
1137
+ */
1138
+ type F32CompatibleFormats = TgpuVertexAttrib<'unorm8'> | TgpuVertexAttrib<'unorm8x2'> | TgpuVertexAttrib<'unorm8x4'> | TgpuVertexAttrib<'snorm8'> | TgpuVertexAttrib<'snorm8x2'> | TgpuVertexAttrib<'snorm8x4'> | TgpuVertexAttrib<'unorm16'> | TgpuVertexAttrib<'unorm16x2'> | TgpuVertexAttrib<'unorm16x4'> | TgpuVertexAttrib<'snorm16'> | TgpuVertexAttrib<'snorm16x2'> | TgpuVertexAttrib<'snorm16x4'> | TgpuVertexAttrib<'float16'> | TgpuVertexAttrib<'float16x2'> | TgpuVertexAttrib<'float16x4'> | TgpuVertexAttrib<'float32'> | TgpuVertexAttrib<'float32x2'> | TgpuVertexAttrib<'float32x3'> | TgpuVertexAttrib<'float32x4'> | TgpuVertexAttrib<'unorm10-10-10-2'> | TgpuVertexAttrib<'unorm8x4-bgra'>;
1139
+ /**
1140
+ * All vertex attribute formats that can be interpreted as
1141
+ * a single or multi component f16 in a shader. (same as f32 on the shader side)
1142
+ * https://www.w3.org/TR/webgpu/#vertex-formats
1143
+ */
1144
+ type F16CompatibleFormats = F32CompatibleFormats;
1145
+ type KindToAcceptedAttribMap = {
1146
+ u32: U32CompatibleFormats;
1147
+ vec2u: U32CompatibleFormats;
1148
+ vec3u: U32CompatibleFormats;
1149
+ vec4u: U32CompatibleFormats;
1150
+ i32: I32CompatibleFormats;
1151
+ vec2i: I32CompatibleFormats;
1152
+ vec3i: I32CompatibleFormats;
1153
+ vec4i: I32CompatibleFormats;
1154
+ f16: F16CompatibleFormats;
1155
+ vec2h: F16CompatibleFormats;
1156
+ vec3h: F16CompatibleFormats;
1157
+ vec4h: F16CompatibleFormats;
1158
+ f32: F32CompatibleFormats;
1159
+ vec2f: F32CompatibleFormats;
1160
+ vec3f: F32CompatibleFormats;
1161
+ vec4f: F32CompatibleFormats;
1162
+ };
1163
+
1164
+ type FormatToWGSLType<T extends VertexFormat> = (typeof formatToWGSLType)[T];
1165
+ interface TgpuVertexFormatData<T extends VertexFormat> {
1166
+ readonly type: T;
1167
+ /** Type-token, not available at runtime */
1168
+ readonly [$repr]: Infer<FormatToWGSLType<T>>;
1169
+ }
1170
+ declare const formatToWGSLType: {
1171
+ readonly uint8: U32;
1172
+ readonly uint8x2: Vec2u;
1173
+ readonly uint8x4: Vec4u;
1174
+ readonly sint8: I32;
1175
+ readonly sint8x2: Vec2i;
1176
+ readonly sint8x4: Vec4i;
1177
+ readonly unorm8: F32;
1178
+ readonly unorm8x2: Vec2f;
1179
+ readonly unorm8x4: Vec4f;
1180
+ readonly snorm8: F32;
1181
+ readonly snorm8x2: Vec2f;
1182
+ readonly snorm8x4: Vec4f;
1183
+ readonly uint16: U32;
1184
+ readonly uint16x2: Vec2u;
1185
+ readonly uint16x4: Vec4u;
1186
+ readonly sint16: I32;
1187
+ readonly sint16x2: Vec2i;
1188
+ readonly sint16x4: Vec4i;
1189
+ readonly unorm16: F32;
1190
+ readonly unorm16x2: Vec2f;
1191
+ readonly unorm16x4: Vec4f;
1192
+ readonly snorm16: F32;
1193
+ readonly snorm16x2: Vec2f;
1194
+ readonly snorm16x4: Vec4f;
1195
+ readonly float16: F32;
1196
+ readonly float16x2: Vec2f;
1197
+ readonly float16x4: Vec4f;
1198
+ readonly float32: F32;
1199
+ readonly float32x2: Vec2f;
1200
+ readonly float32x3: Vec3f;
1201
+ readonly float32x4: Vec4f;
1202
+ readonly uint32: U32;
1203
+ readonly uint32x2: Vec2u;
1204
+ readonly uint32x3: Vec3u;
1205
+ readonly uint32x4: Vec4u;
1206
+ readonly sint32: I32;
1207
+ readonly sint32x2: Vec2i;
1208
+ readonly sint32x3: Vec3i;
1209
+ readonly sint32x4: Vec4i;
1210
+ readonly 'unorm10-10-10-2': Vec4f;
1211
+ readonly 'unorm8x4-bgra': Vec4f;
1212
+ };
1213
+ declare const packedFormats: string[];
1214
+ type uint8 = TgpuVertexFormatData<'uint8'>;
1215
+ declare const uint8: uint8;
1216
+ type uint8x2 = TgpuVertexFormatData<'uint8x2'>;
1217
+ declare const uint8x2: uint8x2;
1218
+ type uint8x4 = TgpuVertexFormatData<'uint8x4'>;
1219
+ declare const uint8x4: uint8x4;
1220
+ type sint8 = TgpuVertexFormatData<'sint8'>;
1221
+ declare const sint8: sint8;
1222
+ type sint8x2 = TgpuVertexFormatData<'sint8x2'>;
1223
+ declare const sint8x2: sint8x2;
1224
+ type sint8x4 = TgpuVertexFormatData<'sint8x4'>;
1225
+ declare const sint8x4: sint8x4;
1226
+ type unorm8 = TgpuVertexFormatData<'unorm8'>;
1227
+ declare const unorm8: unorm8;
1228
+ type unorm8x2 = TgpuVertexFormatData<'unorm8x2'>;
1229
+ declare const unorm8x2: unorm8x2;
1230
+ type unorm8x4 = TgpuVertexFormatData<'unorm8x4'>;
1231
+ declare const unorm8x4: unorm8x4;
1232
+ type snorm8 = TgpuVertexFormatData<'snorm8'>;
1233
+ declare const snorm8: snorm8;
1234
+ type snorm8x2 = TgpuVertexFormatData<'snorm8x2'>;
1235
+ declare const snorm8x2: snorm8x2;
1236
+ type snorm8x4 = TgpuVertexFormatData<'snorm8x4'>;
1237
+ declare const snorm8x4: snorm8x4;
1238
+ type uint16 = TgpuVertexFormatData<'uint16'>;
1239
+ declare const uint16: uint16;
1240
+ type uint16x2 = TgpuVertexFormatData<'uint16x2'>;
1241
+ declare const uint16x2: uint16x2;
1242
+ type uint16x4 = TgpuVertexFormatData<'uint16x4'>;
1243
+ declare const uint16x4: uint16x4;
1244
+ type sint16 = TgpuVertexFormatData<'sint16'>;
1245
+ declare const sint16: sint16;
1246
+ type sint16x2 = TgpuVertexFormatData<'sint16x2'>;
1247
+ declare const sint16x2: sint16x2;
1248
+ type sint16x4 = TgpuVertexFormatData<'sint16x4'>;
1249
+ declare const sint16x4: sint16x4;
1250
+ type unorm16 = TgpuVertexFormatData<'unorm16'>;
1251
+ declare const unorm16: unorm16;
1252
+ type unorm16x2 = TgpuVertexFormatData<'unorm16x2'>;
1253
+ declare const unorm16x2: unorm16x2;
1254
+ type unorm16x4 = TgpuVertexFormatData<'unorm16x4'>;
1255
+ declare const unorm16x4: unorm16x4;
1256
+ type snorm16 = TgpuVertexFormatData<'snorm16'>;
1257
+ declare const snorm16: snorm16;
1258
+ type snorm16x2 = TgpuVertexFormatData<'snorm16x2'>;
1259
+ declare const snorm16x2: snorm16x2;
1260
+ type snorm16x4 = TgpuVertexFormatData<'snorm16x4'>;
1261
+ declare const snorm16x4: snorm16x4;
1262
+ type float16 = TgpuVertexFormatData<'float16'>;
1263
+ declare const float16: float16;
1264
+ type float16x2 = TgpuVertexFormatData<'float16x2'>;
1265
+ declare const float16x2: float16x2;
1266
+ type float16x4 = TgpuVertexFormatData<'float16x4'>;
1267
+ declare const float16x4: float16x4;
1268
+ type float32 = TgpuVertexFormatData<'float32'>;
1269
+ declare const float32: float32;
1270
+ type float32x2 = TgpuVertexFormatData<'float32x2'>;
1271
+ declare const float32x2: float32x2;
1272
+ type float32x3 = TgpuVertexFormatData<'float32x3'>;
1273
+ declare const float32x3: float32x3;
1274
+ type float32x4 = TgpuVertexFormatData<'float32x4'>;
1275
+ declare const float32x4: float32x4;
1276
+ type uint32 = TgpuVertexFormatData<'uint32'>;
1277
+ declare const uint32: uint32;
1278
+ type uint32x2 = TgpuVertexFormatData<'uint32x2'>;
1279
+ declare const uint32x2: uint32x2;
1280
+ type uint32x3 = TgpuVertexFormatData<'uint32x3'>;
1281
+ declare const uint32x3: uint32x3;
1282
+ type uint32x4 = TgpuVertexFormatData<'uint32x4'>;
1283
+ declare const uint32x4: uint32x4;
1284
+ type sint32 = TgpuVertexFormatData<'sint32'>;
1285
+ declare const sint32: sint32;
1286
+ type sint32x2 = TgpuVertexFormatData<'sint32x2'>;
1287
+ declare const sint32x2: sint32x2;
1288
+ type sint32x3 = TgpuVertexFormatData<'sint32x3'>;
1289
+ declare const sint32x3: sint32x3;
1290
+ type sint32x4 = TgpuVertexFormatData<'sint32x4'>;
1291
+ declare const sint32x4: sint32x4;
1292
+ type unorm10_10_10_2 = TgpuVertexFormatData<'unorm10-10-10-2'>;
1293
+ declare const unorm10_10_10_2: unorm10_10_10_2;
1294
+ type unorm8x4_bgra = TgpuVertexFormatData<'unorm8x4-bgra'>;
1295
+ declare const unorm8x4_bgra: unorm8x4_bgra;
1296
+ type PackedData = uint8 | uint8x2 | uint8x4 | sint8 | sint8x2 | sint8x4 | unorm8 | unorm8x2 | unorm8x4 | snorm8 | snorm8x2 | snorm8x4 | uint16 | uint16x2 | uint16x4 | sint16 | sint16x2 | sint16x4 | unorm16 | unorm16x2 | unorm16x4 | snorm16 | snorm16x2 | snorm16x4 | float16 | float16x2 | float16x4 | float32 | float32x2 | float32x3 | float32x4 | uint32 | uint32x2 | uint32x3 | uint32x4 | sint32 | sint32x2 | sint32x3 | sint32x4 | unorm10_10_10_2 | unorm8x4_bgra;
1297
+
1298
+ type TgpuDualFn<TImpl extends (...args: unknown[]) => unknown> = TImpl & {
1299
+ [$internal]: {
1300
+ implementation: TImpl | string;
1301
+ };
1302
+ };
1303
+ /**
1304
+ * Array schema constructed via `d.disarrayOf` function.
1305
+ *
1306
+ * Useful for defining vertex buffers.
1307
+ * Elements in the schema are not aligned in respect to their `byteAlignment`,
1308
+ * unless they are explicitly decorated with the custom align attribute
1309
+ * via `d.align` function.
1310
+ */
1311
+ interface Disarray<TElement extends BaseData = BaseData> {
1312
+ readonly type: 'disarray';
1313
+ readonly elementCount: number;
1314
+ readonly elementType: TElement;
1315
+ readonly [$repr]: Infer<TElement>[];
1316
+ readonly '~reprPartial': {
1317
+ idx: number;
1318
+ value: InferPartial<TElement>;
1319
+ }[];
1320
+ }
1321
+ /**
1322
+ * Struct schema constructed via `d.unstruct` function.
1323
+ *
1324
+ * Useful for defining vertex buffers, as the standard layout restrictions do not apply.
1325
+ * Members are not aligned in respect to their `byteAlignment`,
1326
+ * unless they are explicitly decorated with the custom align attribute
1327
+ * via `d.align` function.
1328
+ */
1329
+ interface Unstruct<TProps extends Record<string, BaseData> = Record<string, BaseData>> extends TgpuNamable {
1330
+ (props: Prettify<InferRecord<TProps>>): Prettify<InferRecord<TProps>>;
1331
+ readonly label?: string | undefined;
1332
+ readonly type: 'unstruct';
1333
+ readonly propTypes: TProps;
1334
+ readonly [$repr]: Prettify<InferRecord<TProps>>;
1335
+ readonly '~gpuRepr': Prettify<InferGPURecord<TProps>>;
1336
+ readonly '~memIdent': Unstruct<Prettify<MemIdentityRecord<TProps>>>;
1337
+ readonly '~reprPartial': Prettify<Partial<InferPartialRecord<TProps>>>;
1338
+ }
1339
+ type AnyUnstruct = Unstruct<any>;
1340
+ interface LooseDecorated<TInner extends BaseData = BaseData, TAttribs extends unknown[] = unknown[]> {
1341
+ readonly type: 'loose-decorated';
1342
+ readonly inner: TInner;
1343
+ readonly attribs: TAttribs;
1344
+ readonly [$repr]: Infer<TInner>;
1345
+ }
1346
+ declare const looseTypeLiterals: readonly ["unstruct", "disarray", "loose-decorated", "uint8", "uint8x2", "uint8x4", "sint8", "sint8x2", "sint8x4", "unorm8", "unorm8x2", "unorm8x4", "snorm8", "snorm8x2", "snorm8x4", "uint16", "uint16x2", "uint16x4", "sint16", "sint16x2", "sint16x4", "unorm16", "unorm16x2", "unorm16x4", "snorm16", "snorm16x2", "snorm16x4", "float16", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4", "unorm10-10-10-2", "unorm8x4-bgra"];
1347
+ type LooseTypeLiteral = (typeof looseTypeLiterals)[number];
1348
+ type AnyLooseData = Disarray | AnyUnstruct | LooseDecorated | PackedData;
1349
+ declare function isLooseData(data: unknown): data is AnyLooseData;
1350
+ /**
1351
+ * Checks whether the passed in value is a disarray schema,
1352
+ * as opposed to, e.g., a regular array schema.
1353
+ *
1354
+ * Array schemas can be used to describe uniform and storage buffers,
1355
+ * whereas disarray schemas cannot. Disarrays are useful for
1356
+ * defining vertex buffers instead.
1357
+ *
1358
+ * @example
1359
+ * isDisarray(d.arrayOf(d.u32, 4)) // false
1360
+ * isDisarray(d.disarrayOf(d.u32, 4)) // true
1361
+ * isDisarray(d.vec3f) // false
1362
+ */
1363
+ declare function isDisarray<T extends Disarray>(schema: T | unknown): schema is T;
1364
+ /**
1365
+ * Checks whether passed in value is a unstruct schema,
1366
+ * as opposed to, e.g., a struct schema.
1367
+ *
1368
+ * Struct schemas can be used to describe uniform and storage buffers,
1369
+ * whereas unstruct schemas cannot. Unstructs are useful for
1370
+ * defining vertex buffers instead.
1371
+ *
1372
+ * @example
1373
+ * isUnstruct(d.struct({ a: d.u32 })) // false
1374
+ * isUnstruct(d.unstruct({ a: d.u32 })) // true
1375
+ * isUnstruct(d.vec3f) // false
1376
+ */
1377
+ declare function isUnstruct<T extends Unstruct>(schema: T | unknown): schema is T;
1378
+ declare function isLooseDecorated<T extends LooseDecorated>(value: T | unknown): value is T;
1379
+ declare function isData(value: unknown): value is AnyData;
1380
+ type AnyData = AnyWgslData | AnyLooseData;
1381
+
1382
+ export { $internal as $, type AnyWgslData as A, type BaseData as B, type Default as C, type Decorated as D, type InferGPU as E, type F32 as F, type AnyVecInstance as G, type AnyMatInstance as H, type Infer as I, type Bool as J, type KindToDefaultFormatMap as K, type Location as L, type Mutable as M, type Ptr as N, type OmitProps as O, type Prettify as P, type Vec2b as Q, type Vec3b as R, type Vec4b as S, type TgpuNamable as T, type U32 as U, type Vec2f as V, type WgslStruct as W, type Unstruct as X, type Mat2x2f as Y, type Mat3x3f as Z, type Mat4x4f as _, type F16 as a, float16 as a$, type m2x2f as a0, type m3x3f as a1, type m4x4f as a2, type Atomic as a3, isWgslData as a4, isWgslArray as a5, isWgslStruct as a6, isPtr as a7, isAtomic as a8, isDecorated as a9, type TgpuVertexFormatData as aA, formatToWGSLType as aB, packedFormats as aC, uint8 as aD, uint8x2 as aE, uint8x4 as aF, sint8 as aG, sint8x2 as aH, sint8x4 as aI, unorm8 as aJ, unorm8x2 as aK, unorm8x4 as aL, snorm8 as aM, snorm8x2 as aN, snorm8x4 as aO, uint16 as aP, uint16x2 as aQ, uint16x4 as aR, sint16 as aS, sint16x2 as aT, sint16x4 as aU, unorm16 as aV, unorm16x2 as aW, unorm16x4 as aX, snorm16 as aY, snorm16x2 as aZ, snorm16x4 as a_, isAlignAttrib as aa, isBuiltinAttrib as ab, isLocationAttrib as ac, isInterpolateAttrib as ad, isSizeAttrib as ae, type Size as af, type Align as ag, type Builtin as ah, type Interpolate as ai, type v2f as aj, type v2i as ak, type v2u as al, type v3f as am, type v3i as an, type v3u as ao, type v4f as ap, type v4i as aq, type v4u as ar, type LooseDecorated as as, type AnyLooseData as at, isDisarray as au, isUnstruct as av, isLooseDecorated as aw, isData as ax, isLooseData as ay, type FormatToWGSLType as az, type I32 as b, float16x2 as b0, float16x4 as b1, float32 as b2, float32x2 as b3, float32x3 as b4, float32x4 as b5, uint32 as b6, uint32x2 as b7, uint32x3 as b8, uint32x4 as b9, type atomicU32 as bA, sint32 as ba, sint32x2 as bb, sint32x3 as bc, sint32x4 as bd, unorm10_10_10_2 as be, unorm8x4_bgra as bf, type PackedData as bg, type InterpolationType as bh, type LooseTypeLiteral as bi, type PerspectiveOrLinearInterpolationType as bj, type PerspectiveOrLinearInterpolatableData as bk, type FlatInterpolationType as bl, type FlatInterpolatableData as bm, type TgpuDualFn as bn, type AnyNumericVecInstance as bo, type vBaseForMat as bp, type AnyFloatVecInstance as bq, type v3h as br, type AnyVec2Instance as bs, type v2b as bt, type AnyVec3Instance as bu, type v3b as bv, type v4b as bw, type AnyBooleanVecInstance as bx, type ScalarData as by, type atomicI32 as bz, type Vec3f as c, type Vec4f as d, type Vec2h as e, type Vec3h as f, type Vec4h as g, type Vec2i as h, type Vec3i as i, type Vec4i as j, type Vec2u as k, type Vec3u as l, type Vec4u as m, type AnyWgslStruct as n, $repr as o, type WgslArray as p, type Disarray as q, type AnyUnstruct as r, type VertexFormat as s, type TgpuVertexAttrib as t, type KindToAcceptedAttribMap as u, type AnyData as v, type WgslTypeLiteral as w, type UnionToIntersection as x, type InferPartial as y, type MemIdentity as z };