typegpu 0.3.0-alpha.5 → 0.3.0-alpha.7
Sign up to get free protection for your applications and to get access to all the features.
- package/chunk-5DF7EEAZ.cjs +4 -0
- package/chunk-5DF7EEAZ.cjs.map +1 -0
- package/chunk-PN2EAL4B.js +4 -0
- package/chunk-PN2EAL4B.js.map +1 -0
- package/data/index.cjs +1 -1
- package/data/index.d.cts +122 -121
- package/data/index.d.ts +122 -121
- package/data/index.js +1 -1
- package/index.cjs +10 -14
- package/index.cjs.map +1 -1
- package/index.d.cts +51 -535
- package/index.d.ts +51 -535
- package/index.js +10 -14
- package/index.js.map +1 -1
- package/package.json +9 -9
- package/{utilityTypes-CRzYf73j.d.cts → wgslTypes-BsqIvRBG.d.cts} +1661 -1107
- package/{utilityTypes-CRzYf73j.d.ts → wgslTypes-BsqIvRBG.d.ts} +1661 -1107
- package/chunk-CXTZVSMH.cjs +0 -2
- package/chunk-CXTZVSMH.cjs.map +0 -1
- package/chunk-R4KCT3GE.js +0 -2
- package/chunk-R4KCT3GE.js.map +0 -1
package/data/index.d.cts
CHANGED
@@ -1,116 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
export {
|
3
|
-
|
4
|
-
declare const builtinNames: readonly ["vertex_index", "instance_index", "position", "clip_distances", "front_facing", "frag_depth", "sample_index", "sample_mask", "fragment", "local_invocation_id", "local_invocation_index", "global_invocation_id", "workgroup_id", "num_workgroups"];
|
5
|
-
type BuiltinName = (typeof builtinNames)[number];
|
6
|
-
type AnyAttribute = Align<number> | Size<number> | Location<number> | Builtin<BuiltinName>;
|
7
|
-
type ExtractAttributes<T> = T extends {
|
8
|
-
readonly attribs: unknown[];
|
9
|
-
} ? T['attribs'] : [];
|
10
|
-
type Undecorate<T> = T extends {
|
11
|
-
readonly inner: infer TInner;
|
12
|
-
} ? TInner : T;
|
13
|
-
/**
|
14
|
-
* Decorates a data-type `TData` with an attribute `TAttrib`.
|
15
|
-
*
|
16
|
-
* - if `TData` is loose
|
17
|
-
* - if `TData` is already `LooseDecorated`
|
18
|
-
* - Prepend `TAttrib` to the existing attribute tuple.
|
19
|
-
* - else
|
20
|
-
* - Wrap `TData` with `LooseDecorated` and a single attribute `[TAttrib]`
|
21
|
-
* - else
|
22
|
-
* - if `TData` is already `Decorated`
|
23
|
-
* - Prepend `TAttrib` to the existing attribute tuple.
|
24
|
-
* - else
|
25
|
-
* - Wrap `TData` with `Decorated` and a single attribute `[TAttrib]`
|
26
|
-
*/
|
27
|
-
type Decorate<TData extends BaseWgslData, TAttrib extends AnyAttribute> = TData['type'] extends WgslTypeLiteral ? Decorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]> : TData['type'] extends LooseTypeLiteral ? LooseDecorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]> : never;
|
28
|
-
type IsBuiltin<T> = ExtractAttributes<T>[number] extends [] ? false : ExtractAttributes<T>[number] extends Builtin<BuiltinName> ? true : false;
|
29
|
-
type HasCustomLocation<T> = ExtractAttributes<T>[number] extends [] ? false : ExtractAttributes<T>[number] extends Location<number> ? true : false;
|
30
|
-
/**
|
31
|
-
* Gives the wrapped data-type a custom byte alignment. Useful in order to
|
32
|
-
* fulfill uniform alignment requirements.
|
33
|
-
*
|
34
|
-
* @example
|
35
|
-
* const Data = d.struct({
|
36
|
-
* a: u32, // takes up 4 bytes
|
37
|
-
* // 12 bytes of padding, because `b` is custom aligned to multiples of 16 bytes
|
38
|
-
* b: d.align(16, u32),
|
39
|
-
* });
|
40
|
-
*
|
41
|
-
* @param alignment The multiple of bytes this data should align itself to.
|
42
|
-
* @param data The data-type to align.
|
43
|
-
*/
|
44
|
-
declare function align<TAlign extends number, TData extends AnyData>(alignment: TAlign, data: TData): Decorate<Exotic<TData>, Align<TAlign>>;
|
45
|
-
/**
|
46
|
-
* Adds padding bytes after the wrapped data-type, until the whole value takes up `size` bytes.
|
47
|
-
*
|
48
|
-
* @example
|
49
|
-
* const Data = d.struct({
|
50
|
-
* a: d.size(16, u32), // takes up 16 bytes, instead of 4
|
51
|
-
* b: u32, // starts at byte 16, because `a` has a custom size
|
52
|
-
* });
|
53
|
-
*
|
54
|
-
* @param size The amount of bytes that should be reserved for this data-type.
|
55
|
-
* @param data The data-type to wrap.
|
56
|
-
*/
|
57
|
-
declare function size<TSize extends number, TData extends AnyData>(size: TSize, data: TData): Decorate<Exotic<TData>, Size<TSize>>;
|
58
|
-
/**
|
59
|
-
* Assigns an explicit numeric location to a struct member or a parameter that has this type.
|
60
|
-
*
|
61
|
-
* @example
|
62
|
-
* const Data = d.ioStruct({
|
63
|
-
* a: d.u32, // has implicit location 0
|
64
|
-
* b: d.location(5, d.u32),
|
65
|
-
* c: d.u32, // has implicit location 6
|
66
|
-
* });
|
67
|
-
*
|
68
|
-
* @param location The explicit numeric location.
|
69
|
-
* @param data The data-type to wrap.
|
70
|
-
*/
|
71
|
-
declare function location<TLocation extends number, TData extends AnyData>(location: TLocation, data: TData): Decorate<Exotic<TData>, Location<TLocation>>;
|
72
|
-
declare function isBuiltin<T extends Decorated<AnyWgslData, AnyAttribute[]> | LooseDecorated<AnyLooseData, AnyAttribute[]>>(value: T | unknown): value is T;
|
73
|
-
|
74
|
-
type BuiltinVertexIndex = Decorated<U32, [Builtin<'vertex_index'>]>;
|
75
|
-
type BuiltinInstanceIndex = Decorated<U32, [Builtin<'instance_index'>]>;
|
76
|
-
type BuiltinPosition = Decorated<Vec4f, [Builtin<'position'>]>;
|
77
|
-
type BuiltinClipDistances = Decorated<WgslArray<U32>, [
|
78
|
-
Builtin<'clip_distances'>
|
79
|
-
]>;
|
80
|
-
type BuiltinFrontFacing = Decorated<F32, [Builtin<'front_facing'>]>;
|
81
|
-
type BuiltinFragDepth = Decorated<F32, [Builtin<'frag_depth'>]>;
|
82
|
-
type BuiltinSampleIndex = Decorated<U32, [Builtin<'sample_index'>]>;
|
83
|
-
type BuiltinSampleMask = Decorated<U32, [Builtin<'sample_mask'>]>;
|
84
|
-
type BuiltinFragment = Decorated<Vec4f, [Builtin<'fragment'>]>;
|
85
|
-
type BuiltinLocalInvocationId = Decorated<Vec3u, [
|
86
|
-
Builtin<'local_invocation_id'>
|
87
|
-
]>;
|
88
|
-
type BuiltinLocalInvocationIndex = Decorated<U32, [
|
89
|
-
Builtin<'local_invocation_index'>
|
90
|
-
]>;
|
91
|
-
type BuiltinGlobalInvocationId = Decorated<Vec3u, [
|
92
|
-
Builtin<'global_invocation_id'>
|
93
|
-
]>;
|
94
|
-
type BuiltinWorkgroupId = Decorated<Vec3u, [Builtin<'workgroup_id'>]>;
|
95
|
-
type BuiltinNumWorkgroups = Decorated<Vec3u, [
|
96
|
-
Builtin<'num_workgroups'>
|
97
|
-
]>;
|
98
|
-
declare const builtin: {
|
99
|
-
readonly vertexIndex: BuiltinVertexIndex;
|
100
|
-
readonly instanceIndex: BuiltinInstanceIndex;
|
101
|
-
readonly position: BuiltinPosition;
|
102
|
-
readonly clipDistances: BuiltinClipDistances;
|
103
|
-
readonly frontFacing: BuiltinFrontFacing;
|
104
|
-
readonly fragDepth: BuiltinFragDepth;
|
105
|
-
readonly sampleIndex: BuiltinSampleIndex;
|
106
|
-
readonly sampleMask: BuiltinSampleMask;
|
107
|
-
readonly localInvocationId: BuiltinLocalInvocationId;
|
108
|
-
readonly localInvocationIndex: BuiltinLocalInvocationIndex;
|
109
|
-
readonly globalInvocationId: BuiltinGlobalInvocationId;
|
110
|
-
readonly workgroupId: BuiltinWorkgroupId;
|
111
|
-
readonly numWorkgroups: BuiltinNumWorkgroups;
|
112
|
-
};
|
113
|
-
type AnyBuiltin = (typeof builtin)[keyof typeof builtin];
|
1
|
+
import { J as BaseWgslData, W as WgslStruct, K as TgpuNamable, M as ExoticRecord, e as AnyWgslData, P as Prettify, N as WgslArray, E as Exotic, A as AnyData, Q as Disarray, R as Unstruct, X as m2x2f, Y as m3x3f, Z as m4x4f, _ as Mat2x2f, $ as v2f, a0 as Mat3x3f, a1 as v3f, a2 as Mat4x4f, a3 as v4f, a4 as U32, a5 as I32, a6 as Atomic, a7 as Align, a8 as Size, a9 as Location, aa as Builtin, ab as Decorated, ac as LooseDecorated, ad as AnyLooseData, ae as WgslTypeLiteral, af as LooseTypeLiteral, ag as Vec4f, ah as F32, ai as Vec3u, I as Infer$1 } from '../wgslTypes-BsqIvRBG.cjs';
|
2
|
+
export { ax as Bool, ay as F16, b4 as FormatToWGSLType, bM as PackedData, b5 as TgpuVertexFormatData, az as Vec2f, aA as Vec2h, aB as Vec2i, aC as Vec2u, aD as Vec3f, aE as Vec3h, aF as Vec3i, aG as Vec4h, aH as Vec4i, aI as Vec4u, aj as bool, al as f16, ak as f32, bv as float16, bw as float16x2, bx as float16x4, by as float32, bz as float32x2, bA as float32x3, bB as float32x4, am as i32, at as isAlignAttrib, ar as isAtomic, au as isBuiltinAttrib, b2 as isData, as as isDecorated, a$ as isDisarray, av as isLocationAttrib, b3 as isLooseData, b1 as isLooseDecorated, aw as isSizeAttrib, b0 as isUnstruct, ap as isWgslArray, ao as isWgslData, aq as isWgslStruct, b6 as packedFormats, bm as sint16, bn as sint16x2, bo as sint16x4, bG as sint32, bH as sint32x2, bI as sint32x3, bJ as sint32x4, ba as sint8, bb as sint8x2, bc as sint8x4, bs as snorm16, bt as snorm16x2, bu as snorm16x4, bg as snorm8, bh as snorm8x2, bi as snorm8x4, an as u32, bj as uint16, bk as uint16x2, bl as uint16x4, bC as uint32, bD as uint32x2, bE as uint32x3, bF as uint32x4, b7 as uint8, b8 as uint8x2, b9 as uint8x4, bK as unorm10_10_10_2, bp as unorm16, bq as unorm16x2, br as unorm16x4, bd as unorm8, be as unorm8x2, bf as unorm8x4, bL as unorm8x4_bgra, aJ as v2i, aK as v2u, aL as v3i, aM as v3u, aN as v4i, aO as v4u, aP as vec2f, aQ as vec2h, aR as vec2i, aS as vec2u, aT as vec3f, aU as vec3h, aV as vec3i, aW as vec3u, aX as vec4f, aY as vec4h, aZ as vec4i, a_ as vec4u } from '../wgslTypes-BsqIvRBG.cjs';
|
3
|
+
import 'tinyest';
|
114
4
|
|
115
5
|
/**
|
116
6
|
* Struct schema constructed via `d.struct` function.
|
@@ -124,7 +14,7 @@ interface TgpuStruct<TProps extends Record<string, BaseWgslData>> extends WgslSt
|
|
124
14
|
}
|
125
15
|
/**
|
126
16
|
* Creates a struct schema that can be used to construct GPU buffers.
|
127
|
-
* Ensures proper alignment and padding of properties (as opposed to a `d.
|
17
|
+
* Ensures proper alignment and padding of properties (as opposed to a `d.unstruct` schema).
|
128
18
|
* The order of members matches the passed in properties object.
|
129
19
|
*
|
130
20
|
* @example
|
@@ -167,15 +57,15 @@ declare const arrayOf: <TElement extends AnyWgslData>(elementType: TElement, ele
|
|
167
57
|
* via `d.align` function.
|
168
58
|
*
|
169
59
|
* @example
|
170
|
-
* const
|
60
|
+
* const disarray = d.disarrayOf(d.vec3f, 3); // packed array of vec3f
|
171
61
|
*
|
172
62
|
* @example
|
173
|
-
* const
|
63
|
+
* const disarray = d.disarrayOf(d.align(16, d.vec3f), 3);
|
174
64
|
*
|
175
65
|
* @param elementType The type of elements in the array.
|
176
66
|
* @param count The number of elements in the array.
|
177
67
|
*/
|
178
|
-
declare const
|
68
|
+
declare const disarrayOf: <TElement extends AnyData>(elementType: TElement, count: number) => Disarray<Exotic<TElement>>;
|
179
69
|
|
180
70
|
/**
|
181
71
|
* Creates a loose struct schema that can be used to construct vertex buffers.
|
@@ -187,15 +77,15 @@ declare const looseArrayOf: <TElement extends AnyData>(elementType: TElement, co
|
|
187
77
|
* via `d.align` function.
|
188
78
|
*
|
189
79
|
* @example
|
190
|
-
* const CircleStruct = d.
|
80
|
+
* const CircleStruct = d.unstruct({ radius: d.f32, pos: d.vec3f }); // packed struct with no padding
|
191
81
|
*
|
192
82
|
* @example
|
193
|
-
* const CircleStruct = d.
|
83
|
+
* const CircleStruct = d.unstruct({ radius: d.f32, pos: d.align(16, d.vec3f) });
|
194
84
|
*
|
195
85
|
* @param properties Record with `string` keys and `TgpuData` or `TgpuLooseData` values,
|
196
86
|
* each entry describing one struct member.
|
197
87
|
*/
|
198
|
-
declare const
|
88
|
+
declare const unstruct: <TProps extends Record<string, BaseWgslData>>(properties: TProps) => Unstruct<ExoticRecord<TProps>>;
|
199
89
|
|
200
90
|
/**
|
201
91
|
* Type of the `d.mat2x2f` object/function: matrix data type schema/constructor
|
@@ -303,6 +193,76 @@ declare function matToArray(mat: m2x2f | m3x3f | m4x4f): number[];
|
|
303
193
|
*/
|
304
194
|
declare function atomic<TSchema extends U32 | I32>(data: TSchema): Atomic<Exotic<TSchema>>;
|
305
195
|
|
196
|
+
declare const builtinNames: readonly ["vertex_index", "instance_index", "position", "clip_distances", "front_facing", "frag_depth", "sample_index", "sample_mask", "fragment", "local_invocation_id", "local_invocation_index", "global_invocation_id", "workgroup_id", "num_workgroups"];
|
197
|
+
type BuiltinName = (typeof builtinNames)[number];
|
198
|
+
type AnyAttribute = Align<number> | Size<number> | Location<number> | Builtin<BuiltinName>;
|
199
|
+
type ExtractAttributes<T> = T extends {
|
200
|
+
readonly attribs: unknown[];
|
201
|
+
} ? T['attribs'] : [];
|
202
|
+
type Undecorate<T> = T extends {
|
203
|
+
readonly inner: infer TInner;
|
204
|
+
} ? TInner : T;
|
205
|
+
/**
|
206
|
+
* Decorates a data-type `TData` with an attribute `TAttrib`.
|
207
|
+
*
|
208
|
+
* - if `TData` is loose
|
209
|
+
* - if `TData` is already `LooseDecorated`
|
210
|
+
* - Prepend `TAttrib` to the existing attribute tuple.
|
211
|
+
* - else
|
212
|
+
* - Wrap `TData` with `LooseDecorated` and a single attribute `[TAttrib]`
|
213
|
+
* - else
|
214
|
+
* - if `TData` is already `Decorated`
|
215
|
+
* - Prepend `TAttrib` to the existing attribute tuple.
|
216
|
+
* - else
|
217
|
+
* - Wrap `TData` with `Decorated` and a single attribute `[TAttrib]`
|
218
|
+
*/
|
219
|
+
type Decorate<TData extends BaseWgslData, TAttrib extends AnyAttribute> = TData['type'] extends WgslTypeLiteral ? Decorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]> : TData['type'] extends LooseTypeLiteral ? LooseDecorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]> : never;
|
220
|
+
type IsBuiltin<T> = ExtractAttributes<T>[number] extends [] ? false : ExtractAttributes<T>[number] extends Builtin<BuiltinName> ? true : false;
|
221
|
+
type HasCustomLocation<T> = ExtractAttributes<T>[number] extends [] ? false : ExtractAttributes<T>[number] extends Location<number> ? true : false;
|
222
|
+
/**
|
223
|
+
* Gives the wrapped data-type a custom byte alignment. Useful in order to
|
224
|
+
* fulfill uniform alignment requirements.
|
225
|
+
*
|
226
|
+
* @example
|
227
|
+
* const Data = d.struct({
|
228
|
+
* a: u32, // takes up 4 bytes
|
229
|
+
* // 12 bytes of padding, because `b` is custom aligned to multiples of 16 bytes
|
230
|
+
* b: d.align(16, u32),
|
231
|
+
* });
|
232
|
+
*
|
233
|
+
* @param alignment The multiple of bytes this data should align itself to.
|
234
|
+
* @param data The data-type to align.
|
235
|
+
*/
|
236
|
+
declare function align<TAlign extends number, TData extends AnyData>(alignment: TAlign, data: TData): Decorate<Exotic<TData>, Align<TAlign>>;
|
237
|
+
/**
|
238
|
+
* Adds padding bytes after the wrapped data-type, until the whole value takes up `size` bytes.
|
239
|
+
*
|
240
|
+
* @example
|
241
|
+
* const Data = d.struct({
|
242
|
+
* a: d.size(16, u32), // takes up 16 bytes, instead of 4
|
243
|
+
* b: u32, // starts at byte 16, because `a` has a custom size
|
244
|
+
* });
|
245
|
+
*
|
246
|
+
* @param size The amount of bytes that should be reserved for this data-type.
|
247
|
+
* @param data The data-type to wrap.
|
248
|
+
*/
|
249
|
+
declare function size<TSize extends number, TData extends AnyData>(size: TSize, data: TData): Decorate<Exotic<TData>, Size<TSize>>;
|
250
|
+
/**
|
251
|
+
* Assigns an explicit numeric location to a struct member or a parameter that has this type.
|
252
|
+
*
|
253
|
+
* @example
|
254
|
+
* const Data = d.ioStruct({
|
255
|
+
* a: d.u32, // has implicit location 0
|
256
|
+
* b: d.location(5, d.u32),
|
257
|
+
* c: d.u32, // has implicit location 6
|
258
|
+
* });
|
259
|
+
*
|
260
|
+
* @param location The explicit numeric location.
|
261
|
+
* @param data The data-type to wrap.
|
262
|
+
*/
|
263
|
+
declare function location<TLocation extends number, TData extends AnyData>(location: TLocation, data: TData): Decorate<Exotic<TData>, Location<TLocation>>;
|
264
|
+
declare function isBuiltin<T extends Decorated<AnyWgslData, AnyAttribute[]> | LooseDecorated<AnyLooseData, AnyAttribute[]>>(value: T | unknown): value is T;
|
265
|
+
|
306
266
|
/**
|
307
267
|
* Returns the size (in bytes) of data represented by the `schema`.
|
308
268
|
*/
|
@@ -313,6 +273,47 @@ declare function PUBLIC_sizeOf(schema: AnyData): number;
|
|
313
273
|
*/
|
314
274
|
declare function PUBLIC_alignmentOf(schema: AnyData): number;
|
315
275
|
|
276
|
+
type BuiltinVertexIndex = Decorated<U32, [Builtin<'vertex_index'>]>;
|
277
|
+
type BuiltinInstanceIndex = Decorated<U32, [Builtin<'instance_index'>]>;
|
278
|
+
type BuiltinPosition = Decorated<Vec4f, [Builtin<'position'>]>;
|
279
|
+
type BuiltinClipDistances = Decorated<WgslArray<U32>, [
|
280
|
+
Builtin<'clip_distances'>
|
281
|
+
]>;
|
282
|
+
type BuiltinFrontFacing = Decorated<F32, [Builtin<'front_facing'>]>;
|
283
|
+
type BuiltinFragDepth = Decorated<F32, [Builtin<'frag_depth'>]>;
|
284
|
+
type BuiltinSampleIndex = Decorated<U32, [Builtin<'sample_index'>]>;
|
285
|
+
type BuiltinSampleMask = Decorated<U32, [Builtin<'sample_mask'>]>;
|
286
|
+
type BuiltinFragment = Decorated<Vec4f, [Builtin<'fragment'>]>;
|
287
|
+
type BuiltinLocalInvocationId = Decorated<Vec3u, [
|
288
|
+
Builtin<'local_invocation_id'>
|
289
|
+
]>;
|
290
|
+
type BuiltinLocalInvocationIndex = Decorated<U32, [
|
291
|
+
Builtin<'local_invocation_index'>
|
292
|
+
]>;
|
293
|
+
type BuiltinGlobalInvocationId = Decorated<Vec3u, [
|
294
|
+
Builtin<'global_invocation_id'>
|
295
|
+
]>;
|
296
|
+
type BuiltinWorkgroupId = Decorated<Vec3u, [Builtin<'workgroup_id'>]>;
|
297
|
+
type BuiltinNumWorkgroups = Decorated<Vec3u, [
|
298
|
+
Builtin<'num_workgroups'>
|
299
|
+
]>;
|
300
|
+
declare const builtin: {
|
301
|
+
readonly vertexIndex: BuiltinVertexIndex;
|
302
|
+
readonly instanceIndex: BuiltinInstanceIndex;
|
303
|
+
readonly position: BuiltinPosition;
|
304
|
+
readonly clipDistances: BuiltinClipDistances;
|
305
|
+
readonly frontFacing: BuiltinFrontFacing;
|
306
|
+
readonly fragDepth: BuiltinFragDepth;
|
307
|
+
readonly sampleIndex: BuiltinSampleIndex;
|
308
|
+
readonly sampleMask: BuiltinSampleMask;
|
309
|
+
readonly localInvocationId: BuiltinLocalInvocationId;
|
310
|
+
readonly localInvocationIndex: BuiltinLocalInvocationIndex;
|
311
|
+
readonly globalInvocationId: BuiltinGlobalInvocationId;
|
312
|
+
readonly workgroupId: BuiltinWorkgroupId;
|
313
|
+
readonly numWorkgroups: BuiltinNumWorkgroups;
|
314
|
+
};
|
315
|
+
type AnyBuiltin = (typeof builtin)[keyof typeof builtin];
|
316
|
+
|
316
317
|
/**
|
317
318
|
* @module typegpu/data
|
318
319
|
*/
|
@@ -325,4 +326,4 @@ declare function PUBLIC_alignmentOf(schema: AnyData): number;
|
|
325
326
|
*/
|
326
327
|
type Infer<T> = Infer$1<Exotic<T>>;
|
327
328
|
|
328
|
-
export { Align, type AnyAttribute, type AnyBuiltin, AnyData, AnyLooseData, AnyWgslData, Atomic, Builtin, type BuiltinClipDistances, type BuiltinFragDepth, type BuiltinFragment, type BuiltinFrontFacing, type BuiltinGlobalInvocationId, type BuiltinInstanceIndex, type BuiltinLocalInvocationId, type BuiltinLocalInvocationIndex, type BuiltinNumWorkgroups, type BuiltinPosition, type BuiltinSampleIndex, type BuiltinSampleMask, type BuiltinVertexIndex, type BuiltinWorkgroupId, Decorated, F32, type HasCustomLocation, I32, type Infer, type IsBuiltin, Location,
|
329
|
+
export { Align, type AnyAttribute, type AnyBuiltin, AnyData, AnyLooseData, AnyWgslData, Atomic, BaseWgslData, Builtin, type BuiltinClipDistances, type BuiltinFragDepth, type BuiltinFragment, type BuiltinFrontFacing, type BuiltinGlobalInvocationId, type BuiltinInstanceIndex, type BuiltinLocalInvocationId, type BuiltinLocalInvocationIndex, type BuiltinNumWorkgroups, type BuiltinPosition, type BuiltinSampleIndex, type BuiltinSampleMask, type BuiltinVertexIndex, type BuiltinWorkgroupId, Decorated, Disarray, F32, type HasCustomLocation, I32, type Infer, type IsBuiltin, Location, LooseDecorated, Mat2x2f, Mat3x3f, Mat4x4f, Size, type TgpuArray, type TgpuStruct, U32, Unstruct, Vec3u, Vec4f, WgslArray, WgslStruct, align, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, builtin, disarrayOf, isBuiltin, location, m2x2f, m3x3f, m4x4f, mat2x2f, mat3x3f, mat4x4f, matToArray, size, PUBLIC_sizeOf as sizeOf, struct, unstruct, v2f, v3f, v4f };
|
package/data/index.d.ts
CHANGED
@@ -1,116 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
export {
|
3
|
-
|
4
|
-
declare const builtinNames: readonly ["vertex_index", "instance_index", "position", "clip_distances", "front_facing", "frag_depth", "sample_index", "sample_mask", "fragment", "local_invocation_id", "local_invocation_index", "global_invocation_id", "workgroup_id", "num_workgroups"];
|
5
|
-
type BuiltinName = (typeof builtinNames)[number];
|
6
|
-
type AnyAttribute = Align<number> | Size<number> | Location<number> | Builtin<BuiltinName>;
|
7
|
-
type ExtractAttributes<T> = T extends {
|
8
|
-
readonly attribs: unknown[];
|
9
|
-
} ? T['attribs'] : [];
|
10
|
-
type Undecorate<T> = T extends {
|
11
|
-
readonly inner: infer TInner;
|
12
|
-
} ? TInner : T;
|
13
|
-
/**
|
14
|
-
* Decorates a data-type `TData` with an attribute `TAttrib`.
|
15
|
-
*
|
16
|
-
* - if `TData` is loose
|
17
|
-
* - if `TData` is already `LooseDecorated`
|
18
|
-
* - Prepend `TAttrib` to the existing attribute tuple.
|
19
|
-
* - else
|
20
|
-
* - Wrap `TData` with `LooseDecorated` and a single attribute `[TAttrib]`
|
21
|
-
* - else
|
22
|
-
* - if `TData` is already `Decorated`
|
23
|
-
* - Prepend `TAttrib` to the existing attribute tuple.
|
24
|
-
* - else
|
25
|
-
* - Wrap `TData` with `Decorated` and a single attribute `[TAttrib]`
|
26
|
-
*/
|
27
|
-
type Decorate<TData extends BaseWgslData, TAttrib extends AnyAttribute> = TData['type'] extends WgslTypeLiteral ? Decorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]> : TData['type'] extends LooseTypeLiteral ? LooseDecorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]> : never;
|
28
|
-
type IsBuiltin<T> = ExtractAttributes<T>[number] extends [] ? false : ExtractAttributes<T>[number] extends Builtin<BuiltinName> ? true : false;
|
29
|
-
type HasCustomLocation<T> = ExtractAttributes<T>[number] extends [] ? false : ExtractAttributes<T>[number] extends Location<number> ? true : false;
|
30
|
-
/**
|
31
|
-
* Gives the wrapped data-type a custom byte alignment. Useful in order to
|
32
|
-
* fulfill uniform alignment requirements.
|
33
|
-
*
|
34
|
-
* @example
|
35
|
-
* const Data = d.struct({
|
36
|
-
* a: u32, // takes up 4 bytes
|
37
|
-
* // 12 bytes of padding, because `b` is custom aligned to multiples of 16 bytes
|
38
|
-
* b: d.align(16, u32),
|
39
|
-
* });
|
40
|
-
*
|
41
|
-
* @param alignment The multiple of bytes this data should align itself to.
|
42
|
-
* @param data The data-type to align.
|
43
|
-
*/
|
44
|
-
declare function align<TAlign extends number, TData extends AnyData>(alignment: TAlign, data: TData): Decorate<Exotic<TData>, Align<TAlign>>;
|
45
|
-
/**
|
46
|
-
* Adds padding bytes after the wrapped data-type, until the whole value takes up `size` bytes.
|
47
|
-
*
|
48
|
-
* @example
|
49
|
-
* const Data = d.struct({
|
50
|
-
* a: d.size(16, u32), // takes up 16 bytes, instead of 4
|
51
|
-
* b: u32, // starts at byte 16, because `a` has a custom size
|
52
|
-
* });
|
53
|
-
*
|
54
|
-
* @param size The amount of bytes that should be reserved for this data-type.
|
55
|
-
* @param data The data-type to wrap.
|
56
|
-
*/
|
57
|
-
declare function size<TSize extends number, TData extends AnyData>(size: TSize, data: TData): Decorate<Exotic<TData>, Size<TSize>>;
|
58
|
-
/**
|
59
|
-
* Assigns an explicit numeric location to a struct member or a parameter that has this type.
|
60
|
-
*
|
61
|
-
* @example
|
62
|
-
* const Data = d.ioStruct({
|
63
|
-
* a: d.u32, // has implicit location 0
|
64
|
-
* b: d.location(5, d.u32),
|
65
|
-
* c: d.u32, // has implicit location 6
|
66
|
-
* });
|
67
|
-
*
|
68
|
-
* @param location The explicit numeric location.
|
69
|
-
* @param data The data-type to wrap.
|
70
|
-
*/
|
71
|
-
declare function location<TLocation extends number, TData extends AnyData>(location: TLocation, data: TData): Decorate<Exotic<TData>, Location<TLocation>>;
|
72
|
-
declare function isBuiltin<T extends Decorated<AnyWgslData, AnyAttribute[]> | LooseDecorated<AnyLooseData, AnyAttribute[]>>(value: T | unknown): value is T;
|
73
|
-
|
74
|
-
type BuiltinVertexIndex = Decorated<U32, [Builtin<'vertex_index'>]>;
|
75
|
-
type BuiltinInstanceIndex = Decorated<U32, [Builtin<'instance_index'>]>;
|
76
|
-
type BuiltinPosition = Decorated<Vec4f, [Builtin<'position'>]>;
|
77
|
-
type BuiltinClipDistances = Decorated<WgslArray<U32>, [
|
78
|
-
Builtin<'clip_distances'>
|
79
|
-
]>;
|
80
|
-
type BuiltinFrontFacing = Decorated<F32, [Builtin<'front_facing'>]>;
|
81
|
-
type BuiltinFragDepth = Decorated<F32, [Builtin<'frag_depth'>]>;
|
82
|
-
type BuiltinSampleIndex = Decorated<U32, [Builtin<'sample_index'>]>;
|
83
|
-
type BuiltinSampleMask = Decorated<U32, [Builtin<'sample_mask'>]>;
|
84
|
-
type BuiltinFragment = Decorated<Vec4f, [Builtin<'fragment'>]>;
|
85
|
-
type BuiltinLocalInvocationId = Decorated<Vec3u, [
|
86
|
-
Builtin<'local_invocation_id'>
|
87
|
-
]>;
|
88
|
-
type BuiltinLocalInvocationIndex = Decorated<U32, [
|
89
|
-
Builtin<'local_invocation_index'>
|
90
|
-
]>;
|
91
|
-
type BuiltinGlobalInvocationId = Decorated<Vec3u, [
|
92
|
-
Builtin<'global_invocation_id'>
|
93
|
-
]>;
|
94
|
-
type BuiltinWorkgroupId = Decorated<Vec3u, [Builtin<'workgroup_id'>]>;
|
95
|
-
type BuiltinNumWorkgroups = Decorated<Vec3u, [
|
96
|
-
Builtin<'num_workgroups'>
|
97
|
-
]>;
|
98
|
-
declare const builtin: {
|
99
|
-
readonly vertexIndex: BuiltinVertexIndex;
|
100
|
-
readonly instanceIndex: BuiltinInstanceIndex;
|
101
|
-
readonly position: BuiltinPosition;
|
102
|
-
readonly clipDistances: BuiltinClipDistances;
|
103
|
-
readonly frontFacing: BuiltinFrontFacing;
|
104
|
-
readonly fragDepth: BuiltinFragDepth;
|
105
|
-
readonly sampleIndex: BuiltinSampleIndex;
|
106
|
-
readonly sampleMask: BuiltinSampleMask;
|
107
|
-
readonly localInvocationId: BuiltinLocalInvocationId;
|
108
|
-
readonly localInvocationIndex: BuiltinLocalInvocationIndex;
|
109
|
-
readonly globalInvocationId: BuiltinGlobalInvocationId;
|
110
|
-
readonly workgroupId: BuiltinWorkgroupId;
|
111
|
-
readonly numWorkgroups: BuiltinNumWorkgroups;
|
112
|
-
};
|
113
|
-
type AnyBuiltin = (typeof builtin)[keyof typeof builtin];
|
1
|
+
import { J as BaseWgslData, W as WgslStruct, K as TgpuNamable, M as ExoticRecord, e as AnyWgslData, P as Prettify, N as WgslArray, E as Exotic, A as AnyData, Q as Disarray, R as Unstruct, X as m2x2f, Y as m3x3f, Z as m4x4f, _ as Mat2x2f, $ as v2f, a0 as Mat3x3f, a1 as v3f, a2 as Mat4x4f, a3 as v4f, a4 as U32, a5 as I32, a6 as Atomic, a7 as Align, a8 as Size, a9 as Location, aa as Builtin, ab as Decorated, ac as LooseDecorated, ad as AnyLooseData, ae as WgslTypeLiteral, af as LooseTypeLiteral, ag as Vec4f, ah as F32, ai as Vec3u, I as Infer$1 } from '../wgslTypes-BsqIvRBG.js';
|
2
|
+
export { ax as Bool, ay as F16, b4 as FormatToWGSLType, bM as PackedData, b5 as TgpuVertexFormatData, az as Vec2f, aA as Vec2h, aB as Vec2i, aC as Vec2u, aD as Vec3f, aE as Vec3h, aF as Vec3i, aG as Vec4h, aH as Vec4i, aI as Vec4u, aj as bool, al as f16, ak as f32, bv as float16, bw as float16x2, bx as float16x4, by as float32, bz as float32x2, bA as float32x3, bB as float32x4, am as i32, at as isAlignAttrib, ar as isAtomic, au as isBuiltinAttrib, b2 as isData, as as isDecorated, a$ as isDisarray, av as isLocationAttrib, b3 as isLooseData, b1 as isLooseDecorated, aw as isSizeAttrib, b0 as isUnstruct, ap as isWgslArray, ao as isWgslData, aq as isWgslStruct, b6 as packedFormats, bm as sint16, bn as sint16x2, bo as sint16x4, bG as sint32, bH as sint32x2, bI as sint32x3, bJ as sint32x4, ba as sint8, bb as sint8x2, bc as sint8x4, bs as snorm16, bt as snorm16x2, bu as snorm16x4, bg as snorm8, bh as snorm8x2, bi as snorm8x4, an as u32, bj as uint16, bk as uint16x2, bl as uint16x4, bC as uint32, bD as uint32x2, bE as uint32x3, bF as uint32x4, b7 as uint8, b8 as uint8x2, b9 as uint8x4, bK as unorm10_10_10_2, bp as unorm16, bq as unorm16x2, br as unorm16x4, bd as unorm8, be as unorm8x2, bf as unorm8x4, bL as unorm8x4_bgra, aJ as v2i, aK as v2u, aL as v3i, aM as v3u, aN as v4i, aO as v4u, aP as vec2f, aQ as vec2h, aR as vec2i, aS as vec2u, aT as vec3f, aU as vec3h, aV as vec3i, aW as vec3u, aX as vec4f, aY as vec4h, aZ as vec4i, a_ as vec4u } from '../wgslTypes-BsqIvRBG.js';
|
3
|
+
import 'tinyest';
|
114
4
|
|
115
5
|
/**
|
116
6
|
* Struct schema constructed via `d.struct` function.
|
@@ -124,7 +14,7 @@ interface TgpuStruct<TProps extends Record<string, BaseWgslData>> extends WgslSt
|
|
124
14
|
}
|
125
15
|
/**
|
126
16
|
* Creates a struct schema that can be used to construct GPU buffers.
|
127
|
-
* Ensures proper alignment and padding of properties (as opposed to a `d.
|
17
|
+
* Ensures proper alignment and padding of properties (as opposed to a `d.unstruct` schema).
|
128
18
|
* The order of members matches the passed in properties object.
|
129
19
|
*
|
130
20
|
* @example
|
@@ -167,15 +57,15 @@ declare const arrayOf: <TElement extends AnyWgslData>(elementType: TElement, ele
|
|
167
57
|
* via `d.align` function.
|
168
58
|
*
|
169
59
|
* @example
|
170
|
-
* const
|
60
|
+
* const disarray = d.disarrayOf(d.vec3f, 3); // packed array of vec3f
|
171
61
|
*
|
172
62
|
* @example
|
173
|
-
* const
|
63
|
+
* const disarray = d.disarrayOf(d.align(16, d.vec3f), 3);
|
174
64
|
*
|
175
65
|
* @param elementType The type of elements in the array.
|
176
66
|
* @param count The number of elements in the array.
|
177
67
|
*/
|
178
|
-
declare const
|
68
|
+
declare const disarrayOf: <TElement extends AnyData>(elementType: TElement, count: number) => Disarray<Exotic<TElement>>;
|
179
69
|
|
180
70
|
/**
|
181
71
|
* Creates a loose struct schema that can be used to construct vertex buffers.
|
@@ -187,15 +77,15 @@ declare const looseArrayOf: <TElement extends AnyData>(elementType: TElement, co
|
|
187
77
|
* via `d.align` function.
|
188
78
|
*
|
189
79
|
* @example
|
190
|
-
* const CircleStruct = d.
|
80
|
+
* const CircleStruct = d.unstruct({ radius: d.f32, pos: d.vec3f }); // packed struct with no padding
|
191
81
|
*
|
192
82
|
* @example
|
193
|
-
* const CircleStruct = d.
|
83
|
+
* const CircleStruct = d.unstruct({ radius: d.f32, pos: d.align(16, d.vec3f) });
|
194
84
|
*
|
195
85
|
* @param properties Record with `string` keys and `TgpuData` or `TgpuLooseData` values,
|
196
86
|
* each entry describing one struct member.
|
197
87
|
*/
|
198
|
-
declare const
|
88
|
+
declare const unstruct: <TProps extends Record<string, BaseWgslData>>(properties: TProps) => Unstruct<ExoticRecord<TProps>>;
|
199
89
|
|
200
90
|
/**
|
201
91
|
* Type of the `d.mat2x2f` object/function: matrix data type schema/constructor
|
@@ -303,6 +193,76 @@ declare function matToArray(mat: m2x2f | m3x3f | m4x4f): number[];
|
|
303
193
|
*/
|
304
194
|
declare function atomic<TSchema extends U32 | I32>(data: TSchema): Atomic<Exotic<TSchema>>;
|
305
195
|
|
196
|
+
declare const builtinNames: readonly ["vertex_index", "instance_index", "position", "clip_distances", "front_facing", "frag_depth", "sample_index", "sample_mask", "fragment", "local_invocation_id", "local_invocation_index", "global_invocation_id", "workgroup_id", "num_workgroups"];
|
197
|
+
type BuiltinName = (typeof builtinNames)[number];
|
198
|
+
type AnyAttribute = Align<number> | Size<number> | Location<number> | Builtin<BuiltinName>;
|
199
|
+
type ExtractAttributes<T> = T extends {
|
200
|
+
readonly attribs: unknown[];
|
201
|
+
} ? T['attribs'] : [];
|
202
|
+
type Undecorate<T> = T extends {
|
203
|
+
readonly inner: infer TInner;
|
204
|
+
} ? TInner : T;
|
205
|
+
/**
|
206
|
+
* Decorates a data-type `TData` with an attribute `TAttrib`.
|
207
|
+
*
|
208
|
+
* - if `TData` is loose
|
209
|
+
* - if `TData` is already `LooseDecorated`
|
210
|
+
* - Prepend `TAttrib` to the existing attribute tuple.
|
211
|
+
* - else
|
212
|
+
* - Wrap `TData` with `LooseDecorated` and a single attribute `[TAttrib]`
|
213
|
+
* - else
|
214
|
+
* - if `TData` is already `Decorated`
|
215
|
+
* - Prepend `TAttrib` to the existing attribute tuple.
|
216
|
+
* - else
|
217
|
+
* - Wrap `TData` with `Decorated` and a single attribute `[TAttrib]`
|
218
|
+
*/
|
219
|
+
type Decorate<TData extends BaseWgslData, TAttrib extends AnyAttribute> = TData['type'] extends WgslTypeLiteral ? Decorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]> : TData['type'] extends LooseTypeLiteral ? LooseDecorated<Undecorate<TData>, [TAttrib, ...ExtractAttributes<TData>]> : never;
|
220
|
+
type IsBuiltin<T> = ExtractAttributes<T>[number] extends [] ? false : ExtractAttributes<T>[number] extends Builtin<BuiltinName> ? true : false;
|
221
|
+
type HasCustomLocation<T> = ExtractAttributes<T>[number] extends [] ? false : ExtractAttributes<T>[number] extends Location<number> ? true : false;
|
222
|
+
/**
|
223
|
+
* Gives the wrapped data-type a custom byte alignment. Useful in order to
|
224
|
+
* fulfill uniform alignment requirements.
|
225
|
+
*
|
226
|
+
* @example
|
227
|
+
* const Data = d.struct({
|
228
|
+
* a: u32, // takes up 4 bytes
|
229
|
+
* // 12 bytes of padding, because `b` is custom aligned to multiples of 16 bytes
|
230
|
+
* b: d.align(16, u32),
|
231
|
+
* });
|
232
|
+
*
|
233
|
+
* @param alignment The multiple of bytes this data should align itself to.
|
234
|
+
* @param data The data-type to align.
|
235
|
+
*/
|
236
|
+
declare function align<TAlign extends number, TData extends AnyData>(alignment: TAlign, data: TData): Decorate<Exotic<TData>, Align<TAlign>>;
|
237
|
+
/**
|
238
|
+
* Adds padding bytes after the wrapped data-type, until the whole value takes up `size` bytes.
|
239
|
+
*
|
240
|
+
* @example
|
241
|
+
* const Data = d.struct({
|
242
|
+
* a: d.size(16, u32), // takes up 16 bytes, instead of 4
|
243
|
+
* b: u32, // starts at byte 16, because `a` has a custom size
|
244
|
+
* });
|
245
|
+
*
|
246
|
+
* @param size The amount of bytes that should be reserved for this data-type.
|
247
|
+
* @param data The data-type to wrap.
|
248
|
+
*/
|
249
|
+
declare function size<TSize extends number, TData extends AnyData>(size: TSize, data: TData): Decorate<Exotic<TData>, Size<TSize>>;
|
250
|
+
/**
|
251
|
+
* Assigns an explicit numeric location to a struct member or a parameter that has this type.
|
252
|
+
*
|
253
|
+
* @example
|
254
|
+
* const Data = d.ioStruct({
|
255
|
+
* a: d.u32, // has implicit location 0
|
256
|
+
* b: d.location(5, d.u32),
|
257
|
+
* c: d.u32, // has implicit location 6
|
258
|
+
* });
|
259
|
+
*
|
260
|
+
* @param location The explicit numeric location.
|
261
|
+
* @param data The data-type to wrap.
|
262
|
+
*/
|
263
|
+
declare function location<TLocation extends number, TData extends AnyData>(location: TLocation, data: TData): Decorate<Exotic<TData>, Location<TLocation>>;
|
264
|
+
declare function isBuiltin<T extends Decorated<AnyWgslData, AnyAttribute[]> | LooseDecorated<AnyLooseData, AnyAttribute[]>>(value: T | unknown): value is T;
|
265
|
+
|
306
266
|
/**
|
307
267
|
* Returns the size (in bytes) of data represented by the `schema`.
|
308
268
|
*/
|
@@ -313,6 +273,47 @@ declare function PUBLIC_sizeOf(schema: AnyData): number;
|
|
313
273
|
*/
|
314
274
|
declare function PUBLIC_alignmentOf(schema: AnyData): number;
|
315
275
|
|
276
|
+
type BuiltinVertexIndex = Decorated<U32, [Builtin<'vertex_index'>]>;
|
277
|
+
type BuiltinInstanceIndex = Decorated<U32, [Builtin<'instance_index'>]>;
|
278
|
+
type BuiltinPosition = Decorated<Vec4f, [Builtin<'position'>]>;
|
279
|
+
type BuiltinClipDistances = Decorated<WgslArray<U32>, [
|
280
|
+
Builtin<'clip_distances'>
|
281
|
+
]>;
|
282
|
+
type BuiltinFrontFacing = Decorated<F32, [Builtin<'front_facing'>]>;
|
283
|
+
type BuiltinFragDepth = Decorated<F32, [Builtin<'frag_depth'>]>;
|
284
|
+
type BuiltinSampleIndex = Decorated<U32, [Builtin<'sample_index'>]>;
|
285
|
+
type BuiltinSampleMask = Decorated<U32, [Builtin<'sample_mask'>]>;
|
286
|
+
type BuiltinFragment = Decorated<Vec4f, [Builtin<'fragment'>]>;
|
287
|
+
type BuiltinLocalInvocationId = Decorated<Vec3u, [
|
288
|
+
Builtin<'local_invocation_id'>
|
289
|
+
]>;
|
290
|
+
type BuiltinLocalInvocationIndex = Decorated<U32, [
|
291
|
+
Builtin<'local_invocation_index'>
|
292
|
+
]>;
|
293
|
+
type BuiltinGlobalInvocationId = Decorated<Vec3u, [
|
294
|
+
Builtin<'global_invocation_id'>
|
295
|
+
]>;
|
296
|
+
type BuiltinWorkgroupId = Decorated<Vec3u, [Builtin<'workgroup_id'>]>;
|
297
|
+
type BuiltinNumWorkgroups = Decorated<Vec3u, [
|
298
|
+
Builtin<'num_workgroups'>
|
299
|
+
]>;
|
300
|
+
declare const builtin: {
|
301
|
+
readonly vertexIndex: BuiltinVertexIndex;
|
302
|
+
readonly instanceIndex: BuiltinInstanceIndex;
|
303
|
+
readonly position: BuiltinPosition;
|
304
|
+
readonly clipDistances: BuiltinClipDistances;
|
305
|
+
readonly frontFacing: BuiltinFrontFacing;
|
306
|
+
readonly fragDepth: BuiltinFragDepth;
|
307
|
+
readonly sampleIndex: BuiltinSampleIndex;
|
308
|
+
readonly sampleMask: BuiltinSampleMask;
|
309
|
+
readonly localInvocationId: BuiltinLocalInvocationId;
|
310
|
+
readonly localInvocationIndex: BuiltinLocalInvocationIndex;
|
311
|
+
readonly globalInvocationId: BuiltinGlobalInvocationId;
|
312
|
+
readonly workgroupId: BuiltinWorkgroupId;
|
313
|
+
readonly numWorkgroups: BuiltinNumWorkgroups;
|
314
|
+
};
|
315
|
+
type AnyBuiltin = (typeof builtin)[keyof typeof builtin];
|
316
|
+
|
316
317
|
/**
|
317
318
|
* @module typegpu/data
|
318
319
|
*/
|
@@ -325,4 +326,4 @@ declare function PUBLIC_alignmentOf(schema: AnyData): number;
|
|
325
326
|
*/
|
326
327
|
type Infer<T> = Infer$1<Exotic<T>>;
|
327
328
|
|
328
|
-
export { Align, type AnyAttribute, type AnyBuiltin, AnyData, AnyLooseData, AnyWgslData, Atomic, Builtin, type BuiltinClipDistances, type BuiltinFragDepth, type BuiltinFragment, type BuiltinFrontFacing, type BuiltinGlobalInvocationId, type BuiltinInstanceIndex, type BuiltinLocalInvocationId, type BuiltinLocalInvocationIndex, type BuiltinNumWorkgroups, type BuiltinPosition, type BuiltinSampleIndex, type BuiltinSampleMask, type BuiltinVertexIndex, type BuiltinWorkgroupId, Decorated, F32, type HasCustomLocation, I32, type Infer, type IsBuiltin, Location,
|
329
|
+
export { Align, type AnyAttribute, type AnyBuiltin, AnyData, AnyLooseData, AnyWgslData, Atomic, BaseWgslData, Builtin, type BuiltinClipDistances, type BuiltinFragDepth, type BuiltinFragment, type BuiltinFrontFacing, type BuiltinGlobalInvocationId, type BuiltinInstanceIndex, type BuiltinLocalInvocationId, type BuiltinLocalInvocationIndex, type BuiltinNumWorkgroups, type BuiltinPosition, type BuiltinSampleIndex, type BuiltinSampleMask, type BuiltinVertexIndex, type BuiltinWorkgroupId, Decorated, Disarray, F32, type HasCustomLocation, I32, type Infer, type IsBuiltin, Location, LooseDecorated, Mat2x2f, Mat3x3f, Mat4x4f, Size, type TgpuArray, type TgpuStruct, U32, Unstruct, Vec3u, Vec4f, WgslArray, WgslStruct, align, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, builtin, disarrayOf, isBuiltin, location, m2x2f, m3x3f, m4x4f, mat2x2f, mat3x3f, mat4x4f, matToArray, size, PUBLIC_sizeOf as sizeOf, struct, unstruct, v2f, v3f, v4f };
|
package/data/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{$ as
|
1
|
+
import{$ as Q,A as p,Aa as pa,B as q,Ba as qa,C as r,Ca as ra,D as s,Da as sa,E as t,F as u,G as v,Ga as ta,H as w,I as x,Ia as ua,J as y,Ja as va,K as z,Ka as wa,L as A,La as xa,M as B,Ma as ya,N as C,O as D,Oa as za,P as E,Pa as Aa,Q as F,Qa as Ba,R as G,Ra as Ca,S as H,Sa as Da,T as I,Ta as Ea,U as J,Ua as Fa,V as K,Va as Ga,W as L,Wa as Ha,X as M,Xa as Ia,Y as N,Z as O,_ as P,aa as R,ba as S,ca as T,d as a,da as U,e as b,ea as V,f as c,fa as W,g as d,ga as X,h as e,ha as Y,i as f,ia as Z,j as g,ja as _,k as h,ka as $,l as i,la as aa,m as j,ma as ba,n as k,na as ca,o as l,oa as da,p as m,pa as ea,qa as fa,r as n,ra as ga,sa as ha,ta as ia,ua as ja,va as ka,wa as la,xa as ma,ya as na,z as o,za as oa}from"../chunk-PN2EAL4B.js";export{va as align,ta as alignmentOf,Aa as arrayOf,Ha as atomic,o as bool,Ia as builtin,Ba as disarrayOf,s as f16,r as f32,ca as float16,da as float16x2,ea as float16x4,fa as float32,ga as float32x2,ha as float32x3,ia as float32x4,q as i32,e as isAlignAttrib,d as isAtomic,ya as isBuiltin,h as isBuiltinAttrib,n as isData,i as isDecorated,k as isDisarray,g as isLocationAttrib,j as isLooseData,m as isLooseDecorated,f as isSizeAttrib,l as isUnstruct,b as isWgslArray,a as isWgslData,c as isWgslStruct,xa as location,Da as mat2x2f,Ea as mat3x3f,Fa as mat4x4f,Ga as matToArray,F as packedFormats,V as sint16,W as sint16x2,X as sint16x4,na as sint32,oa as sint32x2,pa as sint32x3,qa as sint32x4,J as sint8,K as sint8x2,L as sint8x4,wa as size,ua as sizeOf,$ as snorm16,aa as snorm16x2,ba as snorm16x4,P as snorm8,Q as snorm8x2,R as snorm8x4,za as struct,p as u32,S as uint16,T as uint16x2,U as uint16x4,ja as uint32,ka as uint32x2,la as uint32x3,ma as uint32x4,G as uint8,H as uint8x2,I as uint8x4,ra as unorm10_10_10_2,Y as unorm16,Z as unorm16x2,_ as unorm16x4,M as unorm8,N as unorm8x2,O as unorm8x4,sa as unorm8x4_bgra,Ca as unstruct,t as vec2f,u as vec2h,v as vec2i,w as vec2u,x as vec3f,y as vec3h,z as vec3i,A as vec3u,B as vec4f,C as vec4h,D as vec4i,E as vec4u};
|
2
2
|
//# sourceMappingURL=index.js.map
|