typegpu 0.9.0 → 0.10.1

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.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/builtin-DdtWpk2t.js +818 -0
  3. package/builtin-DdtWpk2t.js.map +1 -0
  4. package/chunk-BYypO7fO.js +18 -0
  5. package/common/index.d.ts +8 -23
  6. package/common/index.d.ts.map +1 -0
  7. package/common/index.js +7 -5
  8. package/common/index.js.map +1 -1
  9. package/data/index.d.ts +7 -401
  10. package/data/index.d.ts.map +1 -0
  11. package/data/index.js +164 -1
  12. package/data/index.js.map +1 -1
  13. package/deepEqual-DQxK4vdp.js +413 -0
  14. package/deepEqual-DQxK4vdp.js.map +1 -0
  15. package/extensions-DIVuAfBM.js +2032 -0
  16. package/extensions-DIVuAfBM.js.map +1 -0
  17. package/fullScreenTriangle-CfFyQd_0.js +543 -0
  18. package/fullScreenTriangle-CfFyQd_0.js.map +1 -0
  19. package/index.d.ts +124 -310
  20. package/index.d.ts.map +1 -0
  21. package/index.js +6282 -153
  22. package/index.js.map +1 -1
  23. package/indexNamedExports-oL6tyaJ9.d.ts +5697 -0
  24. package/indexNamedExports-oL6tyaJ9.d.ts.map +1 -0
  25. package/operators-d-PMVTo7.js +4158 -0
  26. package/operators-d-PMVTo7.js.map +1 -0
  27. package/package.json +3 -2
  28. package/std/index.d.ts +7 -621
  29. package/std/index.d.ts.map +1 -0
  30. package/std/index.js +165 -1
  31. package/std/index.js.map +1 -1
  32. package/texture-BagDrrks.js +205 -0
  33. package/texture-BagDrrks.js.map +1 -0
  34. package/chunk-5ABKYSJD.js +0 -2
  35. package/chunk-5ABKYSJD.js.map +0 -1
  36. package/chunk-D5UYO3OX.js +0 -3
  37. package/chunk-D5UYO3OX.js.map +0 -1
  38. package/chunk-EHLRP4V2.js +0 -2
  39. package/chunk-EHLRP4V2.js.map +0 -1
  40. package/chunk-LMPPDGRD.js +0 -2
  41. package/chunk-LMPPDGRD.js.map +0 -1
  42. package/chunk-MBB2XFH6.js +0 -2
  43. package/chunk-MBB2XFH6.js.map +0 -1
  44. package/chunk-SHSILTWI.js +0 -10
  45. package/chunk-SHSILTWI.js.map +0 -1
  46. package/comptime-DKpw1IVu.d.ts +0 -28
  47. package/matrix-C4IFKU1R.d.ts +0 -123
  48. package/tgpuConstant-BOn7U_lv.d.ts +0 -4031
package/data/index.d.ts CHANGED
@@ -1,403 +1,9 @@
1
- import { aU as Bool, aV as F16, aW as F32, aX as I32, aY as U16, aZ as U32, k as AnyWgslData, a_ as WgslStruct, r as WgslArray, a$ as StorableData, b0 as Ptr, b1 as Vec2b, aT as Vec2f, b2 as Vec2h, b3 as Vec2i, b4 as Vec2u, b5 as Vec3b, b6 as Vec3f, b7 as Vec3h, b8 as Vec3i, b9 as Vec3u, ba as Vec4b, bb as Vec4f, bc as Vec4h, bd as Vec4i, be as Vec4u, A as AnyData, D as Disarray, bf as BaseData, bg as Unstruct, bh as Atomic } from '../tgpuConstant-BOn7U_lv.js';
2
- export { bu as Align, cB as AnyAttribute, cP as AnyBuiltin, bU as AnyLooseData, bv as AnyVecInstance, bw as AnyWgslStruct, bx as Builtin, cQ as BuiltinClipDistances, cR as BuiltinFragDepth, cS as BuiltinFrontFacing, cT as BuiltinGlobalInvocationId, cU as BuiltinInstanceIndex, cV as BuiltinLocalInvocationId, cW as BuiltinLocalInvocationIndex, cX as BuiltinNumWorkgroups, cY as BuiltinPosition, cZ as BuiltinSampleIndex, c_ as BuiltinSampleMask, c$ as BuiltinVertexIndex, d0 as BuiltinWorkgroupId, by as Decorated, d2 as FormatToWGSLType, cC as HasCustomLocation, o as Infer, I as InferGPU, d1 as InferPartial, bz as Interpolate, cF as IsBuiltin, bA as Location, bV as LooseDecorated, bE as Mat2x2f, bF as Mat3x3f, bG as Mat4x4f, dM as PackedData, bH as Size, d3 as TgpuVertexFormatData, bt as Void, cx as WgslComparisonSampler, cb as WgslExternalTexture, cy as WgslSampler, cc as WgslStorageTexture, cd as WgslStorageTexture1d, ce as WgslStorageTexture2d, cf as WgslStorageTexture2dArray, cg as WgslStorageTexture3d, ch as WgslStorageTextureProps, ci as WgslTexture, cj as WgslTexture1d, ck as WgslTexture2d, cl as WgslTexture2dArray, cm as WgslTexture3d, cn as WgslTextureCube, co as WgslTextureCubeArray, cp as WgslTextureDepth2d, cq as WgslTextureDepth2dArray, cr as WgslTextureDepthCube, cs as WgslTextureDepthCubeArray, ct as WgslTextureDepthMultisampled2d, cu as WgslTextureMultisampled2d, cA as align, cO as builtin, cv as comparisonSampler, dv as float16, dw as float16x2, dx as float16x4, dy as float32, dz as float32x2, dA as float32x3, dB as float32x4, d4 as formatToWGSLType, cD as interpolate, cE as invariant, bi as isAlignAttrib, bj as isAtomic, cG as isBuiltin, bk as isBuiltinAttrib, cJ as isData, bl as isDecorated, cK as isDisarray, bm as isInterpolateAttrib, bn as isLocationAttrib, cL as isLooseData, cM as isLooseDecorated, dN as isPackedData, bo as isPtr, bp as isSizeAttrib, cN as isUnstruct, bq as isWgslArray, br as isWgslData, bs as isWgslStruct, cH as location, bB as m2x2f, bC as m3x3f, bD as m4x4f, d5 as packedFormats, cz as ref, cw as sampler, dl as sint16, dm as sint16x2, dn as sint16x4, dG as sint32, dH as sint32x2, dI as sint32x3, dJ as sint32x4, d9 as sint8, da as sint8x2, db as sint8x4, cI as size, ds as snorm16, dt as snorm16x2, du as snorm16x4, df as snorm8, dg as snorm8x2, dh as snorm8x4, bW as texture1d, bX as texture2d, bY as texture2dArray, bZ as texture3d, b_ as textureCube, b$ as textureCubeArray, c0 as textureDepth2d, c1 as textureDepth2dArray, c2 as textureDepthCube, c3 as textureDepthCubeArray, c4 as textureDepthMultisampled2d, c5 as textureExternal, c6 as textureMultisampled2d, c7 as textureStorage1d, c8 as textureStorage2d, c9 as textureStorage2dArray, ca as textureStorage3d, di as uint16, dj as uint16x2, dk as uint16x4, dC as uint32, dD as uint32x2, dE as uint32x3, dF as uint32x4, d6 as uint8, d7 as uint8x2, d8 as uint8x4, dK as unorm10_10_10_2, dp as unorm16, dq as unorm16x2, dr as unorm16x4, dc as unorm8, dd as unorm8x2, de as unorm8x4, dL as unorm8x4_bgra, bI as v2b, bJ as v2f, bK as v2i, bL as v2u, bM as v3b, bN as v3f, bO as v3i, bP as v3u, bQ as v4b, bR as v4f, bS as v4i, bT as v4u } from '../tgpuConstant-BOn7U_lv.js';
3
- import { T as TgpuComptime } from '../comptime-DKpw1IVu.js';
4
- export { m as mat2x2f, a as mat3x3f, b as mat4x4f, c as matToArray } from '../matrix-C4IFKU1R.js';
5
- import 'tinyest';
1
+ import { $a as m3x3f, $c as align, $i as textureStorage2dArray, $n as atomic, $s as uint32x2, Aa as Vec3h, Ai as WgslTextureCube, Ar as ptrHandle, As as formatToWGSLType, Ba as WgslStruct, Bi as texture2dArray, Br as i32, Bs as sint8, Ca as Vec2b, Ci as WgslStorageTexture3d, Cl as BuiltinNumWorkgroups, Cr as vec3u, Cs as float16, Da as Vec2u, Di as WgslTexture2d, Dl as BuiltinVertexIndex, Dr as vec4i, Ds as float32x2, Ea as Vec2i, Ei as WgslTexture1d, El as BuiltinSampleMask, Er as vec4h, Es as float32, Fa as Vec4h, Fi as WgslTextureDepthCubeArray, Fl as comparisonSampler, Fr as arrayOf, Fs as sint16x4, Ga as isInterpolateAttrib, Gi as textureDepth2dArray, Gs as snorm16x4, Ha as isAtomic, Hi as textureCube, Hr as u32, Hs as sint8x4, Ia as Vec4i, Ii as WgslTextureDepthMultisampled2d, Il as sampler, Ir as struct, Is as sint32, Ja as isSizeAttrib, Ji as textureDepthMultisampled2d, Jn as deepEqual, Js as snorm8x4, Ka as isLocationAttrib, Ki as textureDepthCube, Ks as snorm8, La as Vec4u, Li as WgslTextureMultisampled2d, Lr as bool, Ls as sint32x2, Ma as Vec3u, Mi as WgslTextureDepth2d, Mr as ptrStorage, Ms as packedFormats, Na as Vec4b, Ni as WgslTextureDepth2dArray, Nl as WgslComparisonSampler, Nr as ptrUniform, Ns as sint16, Oa as Vec3b, Oi as WgslTexture2dArray, Ol as BuiltinWorkgroupId, Or as vec4u, Os as float32x3, Pa as Vec4f, Pi as WgslTextureDepthCube, Pl as WgslSampler, Pr as ptrWorkgroup, Ps as sint16x2, Qa as m2x2f, Qc as IsBuiltin, Qi as textureStorage2d, Qn as PUBLIC_sizeOf, Qs as uint32, Ra as Void, Ri as texture1d, Rr as f16, Rs as sint32x3, Sa as U32, Si as WgslStorageTexture2dArray, Sl as BuiltinLocalInvocationIndex, Sr as vec3i, Ss as TgpuVertexFormatData, Ta as Vec2h, Ti as WgslTexture, Tl as BuiltinSampleIndex, Tr as vec4f, Ts as float16x4, Ua as isBuiltinAttrib, Ui as textureCubeArray, Us as snorm16, Va as isAlignAttrib, Vi as texture3d, Vr as u16, Vs as sint8x2, Wa as isDecorated, Wi as textureDepth2d, Ws as snorm16x2, Xa as isWgslData, Xc as AnyAttribute, Xi as textureMultisampled2d, Xn as PUBLIC_getLongestContiguousPrefix, Xs as uint16x2, Ya as isWgslArray, Yi as textureExternal, Yn as PUBLIC_alignmentOf, Ys as uint16, Za as isWgslStruct, Zc as HasCustomLocation, Zi as textureStorage1d, Zn as PUBLIC_isContiguous, Zs as uint16x4, _a as Mat4x4f, _l as BuiltinFragDepth, _r as vec2i, aa as Atomic, ac as unorm10_10_10_2, ai as LooseDecorated, ao as v2u, ar as mat4x4f, ba as StorableData, bi as WgslStorageTexture1d, bl as BuiltinInstanceIndex, br as vec3f, bs as FormatToWGSLType, ca as Builtin, cc as unorm16x4, ci as isDisarray, co as v3i, da as F32, dc as unorm8x4, di as isUnstruct, do as v4f, ea as textureStorage3d, ec as uint32x3, el as interpolate, eo as m4x4f, fa as I32, fc as unorm8x4_bgra, fi as Infer, fo as v4i, fr as unstruct, ga as Mat3x3f, gl as BuiltinClipDistances, gr as vec2h, ha as Mat2x2f, hl as AnyBuiltin, ho as _ref, hr as vec2f, ia as AnyWgslStruct, ic as uint8x4, ii as Disarray, il as size, io as v2i, ir as mat3x3f, ja as Vec3i, jc as memoryLayoutOf, ji as WgslTextureCubeArray, jr as ptrPrivate, js as isPackedData, ka as Vec3f, ki as WgslTexture3d, kl as builtin, kr as ptrFn, ks as float32x4, la as Decorated, lc as unorm8, li as isLooseData, lo as v3u, ma as Location, mi as InferPartial, mo as vecBase, mr as vec2b, na as AnyVecInstance, nc as uint8, ni as AnyData, nl as isBuiltin, no as v2b, oa as BaseData, oc as unorm16, oi as Unstruct, oo as v3b, or as matToArray, pa as Interpolate, pi as InferGPU, po as v4u, pr as disarrayOf, qa as isPtr, qi as textureDepthCubeArray, qs as snorm8x2, ra as AnyWgslData, rc as uint8x2, ri as AnyLooseData, rl as location, ro as v2f, rr as mat2x2f, sa as Bool, sc as unorm16x2, si as isData, so as v3f, ta as Align, tc as uint32x4, tl as invariant, to as matBase, ua as F16, uc as unorm8x2, ui as isLooseDecorated, uo as v4b, va as Ptr, vi as WgslExternalTexture, vl as BuiltinFrontFacing, vr as vec2u, wa as Vec2f, wi as WgslStorageTextureProps, wl as BuiltinPosition, wr as vec4b, ws as float16x2, xa as U16, xi as WgslStorageTexture2d, xl as BuiltinLocalInvocationId, xr as vec3h, xs as PackedData, ya as Size, yi as WgslStorageTexture, yl as BuiltinGlobalInvocationId, yr as vec3b, ys as FormatToAcceptedData, za as WgslArray, zi as texture2d, zr as f32, zs as sint32x4 } from "../indexNamedExports-oL6tyaJ9.js";
6
2
 
7
- /**
8
- * A schema that represents a boolean value. (equivalent to `bool` in WGSL)
9
- *
10
- * Can also be called to cast a value to a bool in accordance with WGSL casting rules.
11
- *
12
- * @example
13
- * const value = bool(); // false
14
- * @example
15
- * const value = bool(0); // false
16
- * @example
17
- * const value = bool(-0); // false
18
- * @example
19
- * const value = bool(21.37); // true
20
- */
21
- declare const bool: Bool;
22
- /**
23
- * A schema that represents an unsigned 32-bit integer value. (equivalent to `u32` in WGSL)
24
- *
25
- * Can also be called to cast a value to an u32 in accordance with WGSL casting rules.
26
- *
27
- * @example
28
- * const value = u32(); // 0
29
- * @example
30
- * const value = u32(7); // 7
31
- * @example
32
- * const value = u32(3.14); // 3
33
- * @example
34
- * const value = u32(-1); // 4294967295
35
- * @example
36
- * const value = u32(-3.1); // 0
37
- */
38
- declare const u32: U32;
39
- declare const u16: U16;
40
- /**
41
- * A schema that represents a signed 32-bit integer value. (equivalent to `i32` in WGSL)
42
- *
43
- * Can also be called to cast a value to an i32 in accordance with WGSL casting rules.
44
- *
45
- * @example
46
- * const value = i32(); // 0
47
- * @example
48
- * const value = i32(3.14); // 3
49
- * @example
50
- * const value = i32(-3.9); // -3
51
- * @example
52
- * const value = i32(10000000000) // 1410065408
53
- */
54
- declare const i32: I32;
55
- /**
56
- * A schema that represents a 32-bit float value. (equivalent to `f32` in WGSL)
57
- *
58
- * Can also be called to cast a value to an f32.
59
- *
60
- * @example
61
- * const value = f32(); // 0
62
- * @example
63
- * const value = f32(1.23); // 1.23
64
- * @example
65
- * const value = f32(true); // 1
66
- */
67
- declare const f32: F32;
68
- /**
69
- * A schema that represents a 16-bit float value. (equivalent to `f16` in WGSL)
70
- *
71
- * Can also be called to cast a value to an f16.
72
- *
73
- * @example
74
- * const value = f16(); // 0
75
- * @example
76
- * const value = f32(1.23); // 1.23
77
- * @example
78
- * const value = f16(true); // 1
79
- * @example
80
- * const value = f16(21877.5); // 21872
81
- */
82
- declare const f16: F16;
83
-
84
- /**
85
- * Creates a struct schema that can be used to construct GPU buffers.
86
- * Ensures proper alignment and padding of properties (as opposed to a `d.unstruct` schema).
87
- * The order of members matches the passed in properties object.
88
- *
89
- * @example
90
- * const CircleStruct = d.struct({ radius: d.f32, pos: d.vec3f });
91
- *
92
- * @param props Record with `string` keys and `TgpuData` values,
93
- * each entry describing one struct member.
94
- */
95
- declare function struct<TProps extends Record<string, AnyWgslData>>(props: TProps): WgslStruct<TProps>;
96
-
97
- interface WgslArrayConstructor {
98
- <TElement extends AnyWgslData>(elementType: TElement): (elementCount: number) => WgslArray<TElement>;
99
- <TElement extends AnyWgslData>(elementType: TElement, elementCount: number): WgslArray<TElement>;
100
- }
101
- /**
102
- * Creates an array schema that can be used to construct gpu buffers.
103
- * Describes arrays with fixed-size length, storing elements of the same type.
104
- *
105
- * @example
106
- * const LENGTH = 3;
107
- * const array = d.arrayOf(d.u32, LENGTH);
108
- *
109
- * If `elementCount` is not specified, a partially applied function is returned.
110
- * @example
111
- * const array = d.arrayOf(d.vec3f);
112
- * // ^? (n: number) => WgslArray<d.Vec3f>
113
- *
114
- * @param elementType The type of elements in the array.
115
- * @param elementCount The number of elements in the array.
116
- */
117
- declare const arrayOf: TgpuComptime<WgslArrayConstructor>;
118
-
119
- declare function ptrFn<T extends StorableData>(inner: T): Ptr<'function', T, 'read-write'>;
120
- declare function ptrPrivate<T extends StorableData>(inner: T): Ptr<'private', T, 'read-write'>;
121
- declare function ptrWorkgroup<T extends StorableData>(inner: T): Ptr<'workgroup', T, 'read-write'>;
122
- declare function ptrStorage<T extends StorableData, TAccess extends 'read' | 'read-write' = 'read'>(inner: T, access?: TAccess): Ptr<'storage', T, TAccess>;
123
- declare function ptrUniform<T extends StorableData>(inner: T): Ptr<'uniform', T, 'read'>;
124
- declare function ptrHandle<T extends StorableData>(inner: T): Ptr<'handle', T, 'read'>;
125
-
126
- /**
127
- * Schema representing vec2f - a vector with 2 elements of type f32.
128
- * Also a constructor function for this vector value.
129
- *
130
- * @example
131
- * const vector = d.vec2f(); // (0.0, 0.0)
132
- * const vector = d.vec2f(1); // (1.0, 1.0)
133
- * const vector = d.vec2f(0.5, 0.1); // (0.5, 0.1)
134
- *
135
- * @example
136
- * const buffer = root.createBuffer(d.vec2f, d.vec2f(0, 1)); // buffer holding a d.vec2f value, with an initial value of vec2f(0, 1);
137
- */
138
- declare const vec2f: Vec2f;
139
- /**
140
- * Schema representing vec2h - a vector with 2 elements of type f16.
141
- * Also a constructor function for this vector value.
142
- *
143
- * @example
144
- * const vector = d.vec2h(); // (0.0, 0.0)
145
- * const vector = d.vec2h(1); // (1.0, 1.0)
146
- * const vector = d.vec2h(0.5, 0.1); // (0.5, 0.1)
147
- *
148
- * @example
149
- * const buffer = root.createBuffer(d.vec2h, d.vec2h(0, 1)); // buffer holding a d.vec2h value, with an initial value of vec2h(0, 1);
150
- */
151
- declare const vec2h: Vec2h;
152
- /**
153
- * Schema representing vec2i - a vector with 2 elements of type i32.
154
- * Also a constructor function for this vector value.
155
- *
156
- * @example
157
- * const vector = d.vec2i(); // (0, 0)
158
- * const vector = d.vec2i(1); // (1, 1)
159
- * const vector = d.vec2i(-1, 1); // (-1, 1)
160
- *
161
- * @example
162
- * const buffer = root.createBuffer(d.vec2i, d.vec2i(0, 1)); // buffer holding a d.vec2i value, with an initial value of vec2i(0, 1);
163
- */
164
- declare const vec2i: Vec2i;
165
- /**
166
- * Schema representing vec2u - a vector with 2 elements of type u32.
167
- * Also a constructor function for this vector value.
168
- *
169
- * @example
170
- * const vector = d.vec2u(); // (0, 0)
171
- * const vector = d.vec2u(1); // (1, 1)
172
- * const vector = d.vec2u(1, 2); // (1, 2)
173
- *
174
- * @example
175
- * const buffer = root.createBuffer(d.vec2u, d.vec2u(0, 1)); // buffer holding a d.vec2u value, with an initial value of vec2u(0, 1);
176
- */
177
- declare const vec2u: Vec2u;
178
- /**
179
- * Schema representing `vec2<bool>` - a vector with 2 elements of type `bool`.
180
- * Also a constructor function for this vector value.
181
- *
182
- * @example
183
- * const vector = d.vec2b(); // (false, false)
184
- * const vector = d.vec2b(true); // (true, true)
185
- * const vector = d.vec2b(false, true); // (false, true)
186
- */
187
- declare const vec2b: Vec2b;
188
- /**
189
- * Schema representing vec3f - a vector with 3 elements of type f32.
190
- * Also a constructor function for this vector value.
191
- *
192
- * @example
193
- * const vector = d.vec3f(); // (0.0, 0.0, 0.0)
194
- * const vector = d.vec3f(1); // (1.0, 1.0, 1.0)
195
- * const vector = d.vec3f(1, 2, 3.5); // (1.0, 2.0, 3.5)
196
- *
197
- * @example
198
- * const buffer = root.createBuffer(d.vec3f, d.vec3f(0, 1, 2)); // buffer holding a d.vec3f value, with an initial value of vec3f(0, 1, 2);
199
- */
200
- declare const vec3f: Vec3f;
201
- /**
202
- * Schema representing vec3h - a vector with 3 elements of type f16.
203
- * Also a constructor function for this vector value.
204
- *
205
- * @example
206
- * const vector = d.vec3h(); // (0.0, 0.0, 0.0)
207
- * const vector = d.vec3h(1); // (1.0, 1.0, 1.0)
208
- * const vector = d.vec3h(1, 2, 3.5); // (1.0, 2.0, 3.5)
209
- *
210
- * @example
211
- * const buffer = root.createBuffer(d.vec3h, d.vec3h(0, 1, 2)); // buffer holding a d.vec3h value, with an initial value of vec3h(0, 1, 2);
212
- */
213
- declare const vec3h: Vec3h;
214
- /**
215
- * Schema representing vec3i - a vector with 3 elements of type i32.
216
- * Also a constructor function for this vector value.
217
- *
218
- * @example
219
- * const vector = d.vec3i(); // (0, 0, 0)
220
- * const vector = d.vec3i(1); // (1, 1, 1)
221
- * const vector = d.vec3i(1, 2, -3); // (1, 2, -3)
222
- *
223
- * @example
224
- * const buffer = root.createBuffer(d.vec3i, d.vec3i(0, 1, 2)); // buffer holding a d.vec3i value, with an initial value of vec3i(0, 1, 2);
225
- */
226
- declare const vec3i: Vec3i;
227
- /**
228
- * Schema representing vec3u - a vector with 3 elements of type u32.
229
- * Also a constructor function for this vector value.
230
- *
231
- * @example
232
- * const vector = d.vec3u(); // (0, 0, 0)
233
- * const vector = d.vec3u(1); // (1, 1, 1)
234
- * const vector = d.vec3u(1, 2, 3); // (1, 2, 3)
235
- *
236
- * @example
237
- * const buffer = root.createBuffer(d.vec3u, d.vec3u(0, 1, 2)); // buffer holding a d.vec3u value, with an initial value of vec3u(0, 1, 2);
238
- */
239
- declare const vec3u: Vec3u;
240
- /**
241
- * Schema representing `vec3<bool>` - a vector with 3 elements of type `bool`.
242
- * Also a constructor function for this vector value.
243
- *
244
- * @example
245
- * const vector = d.vec3b(); // (false, false, false)
246
- * const vector = d.vec3b(true); // (true, true, true)
247
- * const vector = d.vec3b(false, true, false); // (false, true, false)
248
- */
249
- declare const vec3b: Vec3b;
250
- /**
251
- * Schema representing vec4f - a vector with 4 elements of type f32.
252
- * Also a constructor function for this vector value.
253
- *
254
- * @example
255
- * const vector = d.vec4f(); // (0.0, 0.0, 0.0, 0.0)
256
- * const vector = d.vec4f(1); // (1.0, 1.0, 1.0, 1.0)
257
- * const vector = d.vec4f(1, 2, 3, 4.5); // (1.0, 2.0, 3.0, 4.5)
258
- *
259
- * @example
260
- * const buffer = root.createBuffer(d.vec4f, d.vec4f(0, 1, 2, 3)); // buffer holding a d.vec4f value, with an initial value of vec4f(0, 1, 2, 3);
261
- */
262
- declare const vec4f: Vec4f;
263
- /**
264
- * Schema representing vec4h - a vector with 4 elements of type f16.
265
- * Also a constructor function for this vector value.
266
- *
267
- * @example
268
- * const vector = d.vec4h(); // (0.0, 0.0, 0.0, 0.0)
269
- * const vector = d.vec4h(1); // (1.0, 1.0, 1.0, 1.0)
270
- * const vector = d.vec4h(1, 2, 3, 4.5); // (1.0, 2.0, 3.0, 4.5)
271
- *
272
- * @example
273
- * const buffer = root.createBuffer(d.vec4h, d.vec4h(0, 1, 2, 3)); // buffer holding a d.vec4h value, with an initial value of vec4h(0, 1, 2, 3);
274
- */
275
- declare const vec4h: Vec4h;
276
- /**
277
- * Schema representing vec4i - a vector with 4 elements of type i32.
278
- * Also a constructor function for this vector value.
279
- *
280
- * @example
281
- * const vector = d.vec4i(); // (0, 0, 0, 0)
282
- * const vector = d.vec4i(1); // (1, 1, 1, 1)
283
- * const vector = d.vec4i(1, 2, 3, -4); // (1, 2, 3, -4)
284
- *
285
- * @example
286
- * const buffer = root.createBuffer(d.vec4i, d.vec4i(0, 1, 2, 3)); // buffer holding a d.vec4i value, with an initial value of vec4i(0, 1, 2, 3);
287
- */
288
- declare const vec4i: Vec4i;
289
- /**
290
- * Schema representing vec4u - a vector with 4 elements of type u32.
291
- * Also a constructor function for this vector value.
292
- *
293
- * @example
294
- * const vector = d.vec4u(); // (0, 0, 0, 0)
295
- * const vector = d.vec4u(1); // (1, 1, 1, 1)
296
- * const vector = d.vec4u(1, 2, 3, 4); // (1, 2, 3, 4)
297
- *
298
- * @example
299
- * const buffer = root.createBuffer(d.vec4u, d.vec4u(0, 1, 2, 3)); // buffer holding a d.vec4u value, with an initial value of vec4u(0, 1, 2, 3);
300
- */
301
- declare const vec4u: Vec4u;
302
- /**
303
- * Schema representing `vec4<bool>` - a vector with 4 elements of type `bool`.
304
- * Also a constructor function for this vector value.
305
- *
306
- * @example
307
- * const vector = d.vec4b(); // (false, false, false, false)
308
- * const vector = d.vec4b(true); // (true, true, true, true)
309
- * const vector = d.vec4b(false, true, false, true); // (false, true, false, true)
310
- */
311
- declare const vec4b: Vec4b;
312
-
313
- interface DisarrayConstructor {
314
- <TElement extends AnyData>(elementType: TElement): (elementCount: number) => Disarray<TElement>;
315
- <TElement extends AnyData>(elementType: TElement, elementCount: number): Disarray<TElement>;
3
+ //#region src/data/index.d.ts
4
+ declare namespace index_d_exports {
5
+ export { Align, AnyAttribute, AnyBuiltin, AnyData, AnyLooseData, AnyVecInstance, AnyWgslData, AnyWgslStruct, Atomic, BaseData, BaseData as BaseWgslData, Bool, Builtin, BuiltinClipDistances, BuiltinFragDepth, BuiltinFrontFacing, BuiltinGlobalInvocationId, BuiltinInstanceIndex, BuiltinLocalInvocationId, BuiltinLocalInvocationIndex, BuiltinNumWorkgroups, BuiltinPosition, BuiltinSampleIndex, BuiltinSampleMask, BuiltinVertexIndex, BuiltinWorkgroupId, Decorated, Disarray, F16, F32, FormatToAcceptedData, FormatToWGSLType, HasCustomLocation, I32, Infer, InferGPU, InferPartial, Interpolate, IsBuiltin, Location, LooseDecorated, Mat2x2f, Mat3x3f, Mat4x4f, PackedData, Ptr, Size, StorableData, TgpuVertexFormatData, U16, U32, Unstruct, Vec2b, Vec2f, Vec2h, Vec2i, Vec2u, Vec3b, Vec3f, Vec3h, Vec3i, Vec3u, Vec4b, Vec4f, Vec4h, Vec4i, Vec4u, Void, WgslArray, WgslComparisonSampler, WgslExternalTexture, WgslSampler, WgslStorageTexture, WgslStorageTexture1d, WgslStorageTexture2d, WgslStorageTexture2dArray, WgslStorageTexture3d, WgslStorageTextureProps, WgslStruct, WgslTexture, WgslTexture1d, WgslTexture2d, WgslTexture2dArray, WgslTexture3d, WgslTextureCube, WgslTextureCubeArray, WgslTextureDepth2d, WgslTextureDepth2dArray, WgslTextureDepthCube, WgslTextureDepthCubeArray, WgslTextureDepthMultisampled2d, WgslTextureMultisampled2d, align, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, bool, builtin, comparisonSampler, deepEqual, disarrayOf, f16, f32, float16, float16x2, float16x4, float32, float32x2, float32x3, float32x4, formatToWGSLType, PUBLIC_getLongestContiguousPrefix as getLongestContiguousPrefix, i32, interpolate, invariant, isAlignAttrib, isAtomic, isBuiltin, isBuiltinAttrib, PUBLIC_isContiguous as isContiguous, isData, isDecorated, isDisarray, isInterpolateAttrib, isLocationAttrib, isLooseData, isLooseDecorated, isPackedData, isPtr, isSizeAttrib, isUnstruct, isWgslArray, isWgslData, isWgslStruct, location, m2x2f, m3x3f, m4x4f, mat2x2f, mat3x3f, mat4x4f, matBase, matToArray, memoryLayoutOf, packedFormats, ptrFn, ptrHandle, ptrPrivate, ptrStorage, ptrUniform, ptrWorkgroup, _ref as ref, sampler, sint16, sint16x2, sint16x4, sint32, sint32x2, sint32x3, sint32x4, sint8, sint8x2, sint8x4, size, PUBLIC_sizeOf as sizeOf, snorm16, snorm16x2, snorm16x4, snorm8, snorm8x2, snorm8x4, struct, texture1d, texture2d, texture2dArray, texture3d, textureCube, textureCubeArray, textureDepth2d, textureDepth2dArray, textureDepthCube, textureDepthCubeArray, textureDepthMultisampled2d, textureExternal, textureMultisampled2d, textureStorage1d, textureStorage2d, textureStorage2dArray, textureStorage3d, u16, u32, uint16, uint16x2, uint16x4, uint32, uint32x2, uint32x3, uint32x4, uint8, uint8x2, uint8x4, unorm10_10_10_2, unorm16, unorm16x2, unorm16x4, unorm8, unorm8x2, unorm8x4, unorm8x4_bgra, unstruct, v2b, v2f, v2i, v2u, v3b, v3f, v3i, v3u, v4b, v4f, v4i, v4u, vec2b, vec2f, vec2h, vec2i, vec2u, vec3b, vec3f, vec3h, vec3i, vec3u, vec4b, vec4f, vec4h, vec4i, vec4u, vecBase };
316
6
  }
317
- /**
318
- * Creates an array schema that can be used to construct vertex buffers.
319
- * Describes arrays with fixed-size length, storing elements of the same type.
320
- *
321
- * Elements in the schema are not aligned in respect to their `byteAlignment`,
322
- * unless they are explicitly decorated with the custom align attribute
323
- * via `d.align` function.
324
- *
325
- * @example
326
- * const disarray = d.disarrayOf(d.vec3f, 3); // packed array of vec3f
327
- *
328
- * @example
329
- * const disarray = d.disarrayOf(d.align(16, d.vec3f), 3);
330
- *
331
- * If `elementCount` is not specified, a partially applied function is returned.
332
- * @example
333
- * const disarray = d.disarrayOf(d.vec3f);
334
- * // ^? (n: number) => Disarray<d.Vec3f>
335
- *
336
- * @param elementType The type of elements in the array.
337
- * @param elementCount The number of elements in the array.
338
- */
339
- declare const disarrayOf: TgpuComptime<DisarrayConstructor>;
340
-
341
- /**
342
- * Creates a loose struct schema that can be used to construct vertex buffers.
343
- * Describes structs with members of both loose and non-loose types.
344
- *
345
- * The order of members matches the passed in properties object.
346
- * Members are not aligned in respect to their `byteAlignment`,
347
- * unless they are explicitly decorated with the custom align attribute
348
- * via `d.align` function.
349
- *
350
- * @example
351
- * const CircleStruct = d.unstruct({ radius: d.f32, pos: d.vec3f }); // packed struct with no padding
352
- *
353
- * @example
354
- * const CircleStruct = d.unstruct({ radius: d.f32, pos: d.align(16, d.vec3f) });
355
- *
356
- * @param properties Record with `string` keys and `TgpuData` or `TgpuLooseData` values,
357
- * each entry describing one struct member.
358
- */
359
- declare function unstruct<TProps extends Record<string, BaseData>>(properties: TProps): Unstruct<TProps>;
360
-
361
- /**
362
- * Marks a concrete integer scalar type schema (u32 or i32) as a WGSL atomic.
363
- *
364
- * @example
365
- * const atomicU32 = d.atomic(d.u32);
366
- * const atomicI32 = d.atomic(d.i32);
367
- *
368
- * @param data Underlying type schema.
369
- */
370
- declare function atomic<TSchema extends U32 | I32>(data: TSchema): Atomic<TSchema>;
371
-
372
- /**
373
- * Returns the size (in bytes) of data represented by the `schema`.
374
- */
375
- declare function PUBLIC_sizeOf(schema: AnyData): number;
376
-
377
- /**
378
- * Returns the alignment (in bytes) of data represented by the `schema`.
379
- */
380
- declare function PUBLIC_alignmentOf(schema: AnyData): number;
381
-
382
- /**
383
- * Performs a deep comparison of two TypeGPU data schemas.
384
- *
385
- * @param a The first data schema to compare.
386
- * @param b The second data schema to compare.
387
- * @returns `true` if the schemas are deeply equal, `false` otherwise.
388
- *
389
- * @example
390
- * ```ts
391
- * import { vec3f, struct, deepEqual } from 'typegpu/data';
392
- *
393
- * const schema1 = struct({ a: vec3f });
394
- * const schema2 = struct({ a: vec3f });
395
- * const schema3 = struct({ b: vec3f });
396
- *
397
- * console.log(deepEqual(schema1, schema2)); // true
398
- * console.log(deepEqual(schema1, schema3)); // false
399
- * ```
400
- */
401
- declare function deepEqual(a: AnyData, b: AnyData): boolean;
402
-
403
- export { AnyData, AnyWgslData, Atomic, BaseData, BaseData as BaseWgslData, Bool, Disarray, F16, F32, I32, Ptr, StorableData, U16, U32, Unstruct, Vec2b, Vec2f, Vec2h, Vec2i, Vec2u, Vec3b, Vec3f, Vec3h, Vec3i, Vec3u, Vec4b, Vec4f, Vec4h, Vec4i, Vec4u, WgslArray, WgslStruct, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, bool, deepEqual, disarrayOf, f16, f32, i32, ptrFn, ptrHandle, ptrPrivate, ptrStorage, ptrUniform, ptrWorkgroup, PUBLIC_sizeOf as sizeOf, struct, u16, u32, unstruct, vec2b, vec2f, vec2h, vec2i, vec2u, vec3b, vec3f, vec3h, vec3i, vec3u, vec4b, vec4f, vec4h, vec4i, vec4u };
7
+ //#endregion
8
+ export { type Align, type AnyAttribute, type AnyBuiltin, type AnyData, type AnyLooseData, type AnyVecInstance, type AnyWgslData, type AnyWgslStruct, type Atomic, type BaseData, type BaseData as BaseWgslData, type Bool, type Builtin, type BuiltinClipDistances, type BuiltinFragDepth, type BuiltinFrontFacing, type BuiltinGlobalInvocationId, type BuiltinInstanceIndex, type BuiltinLocalInvocationId, type BuiltinLocalInvocationIndex, type BuiltinNumWorkgroups, type BuiltinPosition, type BuiltinSampleIndex, type BuiltinSampleMask, type BuiltinVertexIndex, type BuiltinWorkgroupId, type Decorated, type Disarray, type F16, type F32, FormatToAcceptedData, FormatToWGSLType, type HasCustomLocation, type I32, type Infer, type InferGPU, type InferPartial, type Interpolate, type IsBuiltin, type Location, type LooseDecorated, type Mat2x2f, type Mat3x3f, type Mat4x4f, PackedData, type Ptr, type Size, type StorableData, TgpuVertexFormatData, type U16, type U32, type Unstruct, type Vec2b, type Vec2f, type Vec2h, type Vec2i, type Vec2u, type Vec3b, type Vec3f, type Vec3h, type Vec3i, type Vec3u, type Vec4b, type Vec4f, type Vec4h, type Vec4i, type Vec4u, Void, type WgslArray, type WgslComparisonSampler, type WgslExternalTexture, type WgslSampler, type WgslStorageTexture, type WgslStorageTexture1d, type WgslStorageTexture2d, type WgslStorageTexture2dArray, type WgslStorageTexture3d, type WgslStorageTextureProps, type WgslStruct, type WgslTexture, type WgslTexture1d, type WgslTexture2d, type WgslTexture2dArray, type WgslTexture3d, type WgslTextureCube, type WgslTextureCubeArray, type WgslTextureDepth2d, type WgslTextureDepth2dArray, type WgslTextureDepthCube, type WgslTextureDepthCubeArray, type WgslTextureDepthMultisampled2d, type WgslTextureMultisampled2d, align, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, bool, builtin, comparisonSampler, deepEqual, disarrayOf, f16, f32, float16, float16x2, float16x4, float32, float32x2, float32x3, float32x4, formatToWGSLType, PUBLIC_getLongestContiguousPrefix as getLongestContiguousPrefix, i32, interpolate, invariant, isAlignAttrib, isAtomic, isBuiltin, isBuiltinAttrib, PUBLIC_isContiguous as isContiguous, isData, isDecorated, isDisarray, isInterpolateAttrib, isLocationAttrib, isLooseData, isLooseDecorated, isPackedData, isPtr, isSizeAttrib, isUnstruct, isWgslArray, isWgslData, isWgslStruct, location, type m2x2f, type m3x3f, type m4x4f, mat2x2f, mat3x3f, mat4x4f, type matBase, matToArray, memoryLayoutOf, packedFormats, ptrFn, ptrHandle, ptrPrivate, ptrStorage, ptrUniform, ptrWorkgroup, _ref as ref, sampler, sint16, sint16x2, sint16x4, sint32, sint32x2, sint32x3, sint32x4, sint8, sint8x2, sint8x4, size, PUBLIC_sizeOf as sizeOf, snorm16, snorm16x2, snorm16x4, snorm8, snorm8x2, snorm8x4, struct, index_d_exports as t, texture1d, texture2d, texture2dArray, texture3d, textureCube, textureCubeArray, textureDepth2d, textureDepth2dArray, textureDepthCube, textureDepthCubeArray, textureDepthMultisampled2d, textureExternal, textureMultisampled2d, textureStorage1d, textureStorage2d, textureStorage2dArray, textureStorage3d, u16, u32, uint16, uint16x2, uint16x4, uint32, uint32x2, uint32x3, uint32x4, uint8, uint8x2, uint8x4, unorm10_10_10_2, unorm16, unorm16x2, unorm16x4, unorm8, unorm8x2, unorm8x4, unorm8x4_bgra, unstruct, type v2b, type v2f, type v2i, type v2u, type v3b, type v3f, type v3i, type v3u, type v4b, type v4f, type v4i, type v4u, vec2b, vec2f, vec2h, vec2i, vec2u, vec3b, vec3f, vec3h, vec3i, vec3u, vec4b, vec4f, vec4h, vec4i, vec4u, type vecBase };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/data/index.ts"],"mappings":""}
package/data/index.js CHANGED
@@ -1,2 +1,165 @@
1
- import{a as B,c as vt,d as bt,g as _t}from"../chunk-LMPPDGRD.js";import{c as xt,f as dt,g as gt,h as Dt,i as At,j as Tt,k as ht,l as Wt,n as Nt,o as qt}from"../chunk-MBB2XFH6.js";import{A as St,B as Ot,C as Vt,D as Pt,E as Et,F as wt,G as Ct,H as kt,I as $t,J as Ut,K as Lt,L as Mt,M as jt,N as Ft,O as zt,P as Kt,a as A,j as yt,k as mt,l as ct,m as ft,z as Bt}from"../chunk-EHLRP4V2.js";import{$b as ce,Ab as ut,Ac as T,B as V,Bb as lt,Bc as It,C as y,D as m,E as c,F as f,G as P,H as E,Hb as b,I as w,J as C,K as k,Kb as Qt,L as x,Lb as Xt,Ma as L,Mb as Yt,Na as M,Nb as Zt,Oa as j,Ob as te,Pa as F,Pb as ee,Qa as z,Qb as re,Ra as K,Rb as ae,S as $,Sb as ne,T as d,Tb as se,U as g,Ua as N,Ub as oe,V as D,Vb as ie,Wb as pe,Xb as ue,Yb as le,Z as U,Zb as ye,_b as me,a as p,ac as fe,bc as xe,cc as de,dc as ge,ec as De,fc as Ae,gb as _,gc as Te,hb as q,hc as he,ib as G,ic as We,j as I,jb as H,jc as Ie,k as v,kb as R,kc as ve,lb as J,lc as be,mb as l,mc as Be,nb as Q,nc as Se,ob as X,oc as Oe,pb as Y,pc as Ve,q as O,qb as Z,qc as Pe,rb as tt,rc as Ee,sb as et,sc as we,tb as rt,tc as Ce,ub as at,uc as ke,vb as nt,vc as $e,wb as st,wc as Ue,xb as ot,xc as Le,yb as it,yc as Me,zb as pt,zc as je}from"../chunk-SHSILTWI.js";var Gt=b(((e,t)=>t===void 0?r=>S(e,r):S(e,t))).$name("disarrayOf");function S(e,t){let r=a=>{if(a&&a.length!==t)throw new Error(`Disarray schema of ${t} elements of type ${e.type} called with ${a.length} argument(s).`);return Array.from({length:t},(s,n)=>T(e,a?.[n]))};if(Object.setPrototypeOf(r,Ht),r.elementType=e,!Number.isInteger(t)||t<0)throw new Error(`Cannot create disarray schema with invalid element count: ${t}.`);return r.elementCount=t,r}var Ht={[p]:!0,type:"disarray",toString(){return`disarrayOf(${this.elementType}, ${this.elementCount})`}};function Rt(e){let t=r=>Object.fromEntries(Object.entries(e).map(([a,s])=>[a,T(s,r?.[a])]));return Object.setPrototypeOf(t,Jt),t.propTypes=e,t}var Jt={[p]:!0,type:"unstruct",$name(e){return v(this,e),this},toString(){return`unstruct:${I(this)??"<unnamed>"}`}};function u(e,t){if(e===t)return!0;if(e.type!==t.type)return!1;if(m(e)&&m(t)||g(e)&&g(t)){let r=e.propTypes,a=t.propTypes,s=Object.keys(r),n=Object.keys(a);if(s.length!==n.length)return!1;for(let o=0;o<s.length;o++){let h=s[o],W=n[o];if(h!==W||!h||!W||!u(r[h],a[W]))return!1}return!0}if(y(e)&&y(t)||d(e)&&d(t))return e.elementCount===t.elementCount&&u(e.elementType,t.elementType);if(c(e)&&c(t))return e.addressSpace===t.addressSpace&&e.access===t.access&&u(e.inner,t.inner);if(f(e)&&f(t))return u(e.inner,t.inner);if(x(e)&&x(t)||D(e)&&D(t)){if(!u(e.inner,t.inner)||e.attribs.length!==t.attribs.length)return!1;let r=n=>{let o=n;return`${o.type}(${(o.params??[]).join(",")})`},a=e.attribs.map(r),s=t.attribs.map(r);for(let n=0;n<a.length;n++)if(a[n]!==s[n])return!1}return!0}function i(e,t){let r=e.prototype,a=B[t][p].jsImpl;r[t]=function(s){return a(this,s)}}i(l,"add");i(l,"sub");i(l,"mul");i(l,"div");i(A,"add");i(A,"sub");i(A,"mul");export{O as Void,gt as align,xt as alignmentOf,Nt as arrayOf,_t as atomic,_ as bool,qt as builtin,bt as comparisonSampler,u as deepEqual,Gt as disarrayOf,J as f16,R as f32,We as float16,Ie as float16x2,ve as float16x4,be as float32,Be as float32x2,Se as float32x3,Oe as float32x4,Qt as formatToWGSLType,H as i32,Tt as interpolate,ht as invariant,P as isAlignAttrib,f as isAtomic,Wt as isBuiltin,k as isBuiltinAttrib,U as isData,x as isDecorated,d as isDisarray,C as isInterpolateAttrib,w as isLocationAttrib,$ as isLooseData,D as isLooseDecorated,je as isPackedData,c as isPtr,E as isSizeAttrib,g as isUnstruct,y as isWgslArray,V as isWgslData,m as isWgslStruct,At as location,yt as mat2x2f,mt as mat3x3f,ct as mat4x4f,ft as matToArray,Xt as packedFormats,L as ptrFn,K as ptrHandle,M as ptrPrivate,F as ptrStorage,z as ptrUniform,j as ptrWorkgroup,N as ref,vt as sampler,ce as sint16,fe as sint16x2,xe as sint16x4,Ce as sint32,ke as sint32x2,$e as sint32x3,Ue as sint32x4,ee as sint8,re as sint8x2,ae as sint8x4,Dt as size,dt as sizeOf,Ae as snorm16,Te as snorm16x2,he as snorm16x4,ie as snorm8,pe as snorm8x2,ue as snorm8x4,It as struct,Bt as texture1d,St as texture2d,Vt as texture2dArray,wt as texture3d,Pt as textureCube,Et as textureCubeArray,Lt as textureDepth2d,jt as textureDepth2dArray,Ft as textureDepthCube,zt as textureDepthCubeArray,Mt as textureDepthMultisampled2d,Kt as textureExternal,Ot as textureMultisampled2d,Ct as textureStorage1d,kt as textureStorage2d,$t as textureStorage2dArray,Ut as textureStorage3d,G as u16,q as u32,le as uint16,ye as uint16x2,me as uint16x4,Ve as uint32,Pe as uint32x2,Ee as uint32x3,we as uint32x4,Yt as uint8,Zt as uint8x2,te as uint8x4,Le as unorm10_10_10_2,de as unorm16,ge as unorm16x2,De as unorm16x4,ne as unorm8,se as unorm8x2,oe as unorm8x4,Me as unorm8x4_bgra,Rt as unstruct,tt as vec2b,Q as vec2f,X as vec2h,Y as vec2i,Z as vec2u,st as vec3b,et as vec3f,rt as vec3h,at as vec3i,nt as vec3u,lt as vec4b,ot as vec4f,it as vec4h,pt as vec4i,ut as vec4u};
1
+ import { t as __exportAll } from "../chunk-BYypO7fO.js";
2
+ import { $ as VecBase, An as isAlignAttrib, B as vec2h, Cn as isDisarray, Dt as ptrStorage, En as isUnstruct, Et as ptrPrivate, Fn as isInterpolateAttrib, G as vec3h, H as vec2u, Hn as isSizeAttrib, In as isLocationAttrib, J as vec4b, Jn as isWgslData, K as vec3i, Mn as isBuiltinAttrib, Nn as isDecorated, Ot as ptrUniform, P as struct, Q as vec4u, R as vec2b, Sn as isData, Tn as isLooseDecorated, Tt as ptrHandle, U as vec3b, V as vec2i, Vn as isPtr, W as vec3f, X as vec4h, Y as vec4f, Yn as isWgslStruct, Z as vec4i, _ as mat4x4f, at as i32, d as MatBase, g as mat3x3f, h as mat2x2f, it as f32, jn as isAtomic, kn as Void, kt as ptrWorkgroup, nt as bool, ot as u16, q as vec3u, qn as isWgslArray, rt as f16, st as u32, v as matToArray, wn as isLooseData, wt as ptrFn, yt as _ref, z as vec2f } from "../operators-d-PMVTo7.js";
3
+ import { $ as uint32x4, A as packedFormats, B as sint8x4, C as float16x4, D as float32x4, E as float32x3, F as sint32x2, G as snorm8x2, H as snorm16x2, I as sint32x3, J as uint16x2, K as snorm8x4, L as sint32x4, M as sint16x2, N as sint16x4, O as formatToWGSLType, P as sint32, Q as uint32x3, R as sint8, S as float16x2, T as float32x2, U as snorm16x4, V as snorm16, W as snorm8, X as uint32, Y as uint16x4, Z as uint32x2, at as unorm16x2, ct as unorm8x2, d as isBuiltin, et as uint8, f as location, i as infixOperators, it as unorm16, j as sint16, k as isPackedData, l as interpolate, lt as unorm8x4, m as PUBLIC_sizeOf, n as arrayOf, nt as uint8x4, ot as unorm16x4, p as size, q as uint16, rt as unorm10_10_10_2, s as align, st as unorm8, t as builtin, tt as uint8x2, u as invariant, ut as unorm8x4_bgra, v as PUBLIC_alignmentOf, w as float32, x as float16, z as sint8x2 } from "../builtin-DdtWpk2t.js";
4
+ import { a as PUBLIC_getLongestContiguousPrefix, i as memoryLayoutOf, n as unstruct, o as PUBLIC_isContiguous, p as sampler, r as disarrayOf, s as atomic, t as deepEqual, u as comparisonSampler } from "../deepEqual-DQxK4vdp.js";
5
+ import { _ as textureMultisampled2d, a as texture2d, b as textureStorage2dArray, c as textureCube, d as textureDepth2dArray, f as textureDepthCube, g as textureExternal, i as texture1d, l as textureCubeArray, m as textureDepthMultisampled2d, o as texture2dArray, p as textureDepthCubeArray, s as texture3d, u as textureDepth2d, v as textureStorage1d, x as textureStorage3d, y as textureStorage2d } from "../texture-BagDrrks.js";
6
+ import { Operator } from "tsover-runtime";
7
+
8
+ //#region src/data/index.ts
9
+ /**
10
+ * @module typegpu/data
11
+ */
12
+ var data_exports = /* @__PURE__ */ __exportAll({
13
+ Void: () => Void,
14
+ align: () => align,
15
+ alignmentOf: () => PUBLIC_alignmentOf,
16
+ arrayOf: () => arrayOf,
17
+ atomic: () => atomic,
18
+ bool: () => bool,
19
+ builtin: () => builtin,
20
+ comparisonSampler: () => comparisonSampler,
21
+ deepEqual: () => deepEqual,
22
+ disarrayOf: () => disarrayOf,
23
+ f16: () => f16,
24
+ f32: () => f32,
25
+ float16: () => float16,
26
+ float16x2: () => float16x2,
27
+ float16x4: () => float16x4,
28
+ float32: () => float32,
29
+ float32x2: () => float32x2,
30
+ float32x3: () => float32x3,
31
+ float32x4: () => float32x4,
32
+ formatToWGSLType: () => formatToWGSLType,
33
+ getLongestContiguousPrefix: () => PUBLIC_getLongestContiguousPrefix,
34
+ i32: () => i32,
35
+ interpolate: () => interpolate,
36
+ invariant: () => invariant,
37
+ isAlignAttrib: () => isAlignAttrib,
38
+ isAtomic: () => isAtomic,
39
+ isBuiltin: () => isBuiltin,
40
+ isBuiltinAttrib: () => isBuiltinAttrib,
41
+ isContiguous: () => PUBLIC_isContiguous,
42
+ isData: () => isData,
43
+ isDecorated: () => isDecorated,
44
+ isDisarray: () => isDisarray,
45
+ isInterpolateAttrib: () => isInterpolateAttrib,
46
+ isLocationAttrib: () => isLocationAttrib,
47
+ isLooseData: () => isLooseData,
48
+ isLooseDecorated: () => isLooseDecorated,
49
+ isPackedData: () => isPackedData,
50
+ isPtr: () => isPtr,
51
+ isSizeAttrib: () => isSizeAttrib,
52
+ isUnstruct: () => isUnstruct,
53
+ isWgslArray: () => isWgslArray,
54
+ isWgslData: () => isWgslData,
55
+ isWgslStruct: () => isWgslStruct,
56
+ location: () => location,
57
+ mat2x2f: () => mat2x2f,
58
+ mat3x3f: () => mat3x3f,
59
+ mat4x4f: () => mat4x4f,
60
+ matToArray: () => matToArray,
61
+ memoryLayoutOf: () => memoryLayoutOf,
62
+ packedFormats: () => packedFormats,
63
+ ptrFn: () => ptrFn,
64
+ ptrHandle: () => ptrHandle,
65
+ ptrPrivate: () => ptrPrivate,
66
+ ptrStorage: () => ptrStorage,
67
+ ptrUniform: () => ptrUniform,
68
+ ptrWorkgroup: () => ptrWorkgroup,
69
+ ref: () => _ref,
70
+ sampler: () => sampler,
71
+ sint16: () => sint16,
72
+ sint16x2: () => sint16x2,
73
+ sint16x4: () => sint16x4,
74
+ sint32: () => sint32,
75
+ sint32x2: () => sint32x2,
76
+ sint32x3: () => sint32x3,
77
+ sint32x4: () => sint32x4,
78
+ sint8: () => sint8,
79
+ sint8x2: () => sint8x2,
80
+ sint8x4: () => sint8x4,
81
+ size: () => size,
82
+ sizeOf: () => PUBLIC_sizeOf,
83
+ snorm16: () => snorm16,
84
+ snorm16x2: () => snorm16x2,
85
+ snorm16x4: () => snorm16x4,
86
+ snorm8: () => snorm8,
87
+ snorm8x2: () => snorm8x2,
88
+ snorm8x4: () => snorm8x4,
89
+ struct: () => struct,
90
+ texture1d: () => texture1d,
91
+ texture2d: () => texture2d,
92
+ texture2dArray: () => texture2dArray,
93
+ texture3d: () => texture3d,
94
+ textureCube: () => textureCube,
95
+ textureCubeArray: () => textureCubeArray,
96
+ textureDepth2d: () => textureDepth2d,
97
+ textureDepth2dArray: () => textureDepth2dArray,
98
+ textureDepthCube: () => textureDepthCube,
99
+ textureDepthCubeArray: () => textureDepthCubeArray,
100
+ textureDepthMultisampled2d: () => textureDepthMultisampled2d,
101
+ textureExternal: () => textureExternal,
102
+ textureMultisampled2d: () => textureMultisampled2d,
103
+ textureStorage1d: () => textureStorage1d,
104
+ textureStorage2d: () => textureStorage2d,
105
+ textureStorage2dArray: () => textureStorage2dArray,
106
+ textureStorage3d: () => textureStorage3d,
107
+ u16: () => u16,
108
+ u32: () => u32,
109
+ uint16: () => uint16,
110
+ uint16x2: () => uint16x2,
111
+ uint16x4: () => uint16x4,
112
+ uint32: () => uint32,
113
+ uint32x2: () => uint32x2,
114
+ uint32x3: () => uint32x3,
115
+ uint32x4: () => uint32x4,
116
+ uint8: () => uint8,
117
+ uint8x2: () => uint8x2,
118
+ uint8x4: () => uint8x4,
119
+ unorm10_10_10_2: () => unorm10_10_10_2,
120
+ unorm16: () => unorm16,
121
+ unorm16x2: () => unorm16x2,
122
+ unorm16x4: () => unorm16x4,
123
+ unorm8: () => unorm8,
124
+ unorm8x2: () => unorm8x2,
125
+ unorm8x4: () => unorm8x4,
126
+ unorm8x4_bgra: () => unorm8x4_bgra,
127
+ unstruct: () => unstruct,
128
+ vec2b: () => vec2b,
129
+ vec2f: () => vec2f,
130
+ vec2h: () => vec2h,
131
+ vec2i: () => vec2i,
132
+ vec2u: () => vec2u,
133
+ vec3b: () => vec3b,
134
+ vec3f: () => vec3f,
135
+ vec3h: () => vec3h,
136
+ vec3i: () => vec3i,
137
+ vec3u: () => vec3u,
138
+ vec4b: () => vec4b,
139
+ vec4f: () => vec4f,
140
+ vec4h: () => vec4h,
141
+ vec4i: () => vec4i,
142
+ vec4u: () => vec4u
143
+ });
144
+ function assignInfixOperator(object, operator, operatorSymbol) {
145
+ const proto = object.prototype;
146
+ const opImpl = infixOperators[operator];
147
+ proto[operator] = function(other) {
148
+ return opImpl(this, other);
149
+ };
150
+ proto[operatorSymbol] = (lhs, rhs) => {
151
+ return opImpl(lhs, rhs);
152
+ };
153
+ }
154
+ assignInfixOperator(VecBase, "add", Operator.plus);
155
+ assignInfixOperator(VecBase, "sub", Operator.minus);
156
+ assignInfixOperator(VecBase, "mul", Operator.star);
157
+ assignInfixOperator(VecBase, "div", Operator.slash);
158
+ assignInfixOperator(VecBase, "mod", Operator.percent);
159
+ assignInfixOperator(MatBase, "add", Operator.plus);
160
+ assignInfixOperator(MatBase, "sub", Operator.minus);
161
+ assignInfixOperator(MatBase, "mul", Operator.star);
162
+
163
+ //#endregion
164
+ export { Void, align, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, bool, builtin, comparisonSampler, deepEqual, disarrayOf, f16, f32, float16, float16x2, float16x4, float32, float32x2, float32x3, float32x4, formatToWGSLType, PUBLIC_getLongestContiguousPrefix as getLongestContiguousPrefix, i32, interpolate, invariant, isAlignAttrib, isAtomic, isBuiltin, isBuiltinAttrib, PUBLIC_isContiguous as isContiguous, isData, isDecorated, isDisarray, isInterpolateAttrib, isLocationAttrib, isLooseData, isLooseDecorated, isPackedData, isPtr, isSizeAttrib, isUnstruct, isWgslArray, isWgslData, isWgslStruct, location, mat2x2f, mat3x3f, mat4x4f, matToArray, memoryLayoutOf, packedFormats, ptrFn, ptrHandle, ptrPrivate, ptrStorage, ptrUniform, ptrWorkgroup, _ref as ref, sampler, sint16, sint16x2, sint16x4, sint32, sint32x2, sint32x3, sint32x4, sint8, sint8x2, sint8x4, size, PUBLIC_sizeOf as sizeOf, snorm16, snorm16x2, snorm16x4, snorm8, snorm8x2, snorm8x4, struct, data_exports as t, texture1d, texture2d, texture2dArray, texture3d, textureCube, textureCubeArray, textureDepth2d, textureDepth2dArray, textureDepthCube, textureDepthCubeArray, textureDepthMultisampled2d, textureExternal, textureMultisampled2d, textureStorage1d, textureStorage2d, textureStorage2dArray, textureStorage3d, u16, u32, uint16, uint16x2, uint16x4, uint32, uint32x2, uint32x3, uint32x4, uint8, uint8x2, uint8x4, unorm10_10_10_2, unorm16, unorm16x2, unorm16x4, unorm8, unorm8x2, unorm8x4, unorm8x4_bgra, unstruct, vec2b, vec2f, vec2h, vec2i, vec2u, vec3b, vec3f, vec3h, vec3i, vec3u, vec4b, vec4f, vec4h, vec4i, vec4u };
2
165
  //# sourceMappingURL=index.js.map