typegpu 0.5.2 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/attributes-BdU8hyQq.d.cts +435 -0
- package/attributes-CAsvE5Z9.d.ts +435 -0
- package/chunk-5PJ3H5OR.js +2 -0
- package/chunk-5PJ3H5OR.js.map +1 -0
- package/chunk-7UUBX6MC.cjs +4 -0
- package/chunk-7UUBX6MC.cjs.map +1 -0
- package/chunk-AKBL6GDL.js +4 -0
- package/chunk-AKBL6GDL.js.map +1 -0
- package/chunk-URJCMUTT.cjs +2 -0
- package/chunk-URJCMUTT.cjs.map +1 -0
- package/data/index.cjs +1 -1
- package/data/index.cjs.map +1 -1
- package/data/index.d.cts +51 -4
- package/data/index.d.ts +51 -4
- package/data/index.js +1 -1
- package/index.cjs +17 -17
- package/index.cjs.map +1 -1
- package/index.d.cts +92 -53
- package/index.d.ts +92 -53
- package/index.js +17 -17
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/std/index.cjs +1 -1
- package/std/index.cjs.map +1 -1
- package/std/index.d.cts +141 -33
- package/std/index.d.ts +141 -33
- package/std/index.js +1 -1
- package/std/index.js.map +1 -1
- package/{wgslTypes-VtSRoe90.d.ts → wgslTypes-Bh2dG5qv.d.cts} +213 -405
- package/{wgslTypes-VtSRoe90.d.cts → wgslTypes-Bh2dG5qv.d.ts} +213 -405
- package/attributes-B4JpvOTz.d.ts +0 -159
- package/attributes-DSOqT8yA.d.cts +0 -159
- package/chunk-3JTP2ATR.cjs +0 -2
- package/chunk-3JTP2ATR.cjs.map +0 -1
- package/chunk-3QXCKMEJ.cjs +0 -2
- package/chunk-3QXCKMEJ.cjs.map +0 -1
- package/chunk-DR55IHDD.js +0 -4
- package/chunk-DR55IHDD.js.map +0 -1
- package/chunk-KVOFUY5A.js +0 -2
- package/chunk-KVOFUY5A.js.map +0 -1
- package/chunk-QRLTUOBJ.cjs +0 -4
- package/chunk-QRLTUOBJ.cjs.map +0 -1
- package/chunk-VOFHV4Z6.js +0 -2
- package/chunk-VOFHV4Z6.js.map +0 -1
package/data/index.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
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;
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/data/index.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["/Users/
|
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"}
|
package/data/index.d.cts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
export {
|
3
|
-
|
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';
|
4
5
|
|
5
6
|
/**
|
6
7
|
* A schema that represents a boolean value. (equivalent to `bool` in WGSL)
|
@@ -53,6 +54,19 @@ declare const f32: F32;
|
|
53
54
|
*/
|
54
55
|
declare const f16: F16;
|
55
56
|
|
57
|
+
/**
|
58
|
+
* Creates a struct schema that can be used to construct GPU buffers.
|
59
|
+
* Ensures proper alignment and padding of properties (as opposed to a `d.unstruct` schema).
|
60
|
+
* The order of members matches the passed in properties object.
|
61
|
+
*
|
62
|
+
* @example
|
63
|
+
* const CircleStruct = d.struct({ radius: d.f32, pos: d.vec3f });
|
64
|
+
*
|
65
|
+
* @param props Record with `string` keys and `TgpuData` values,
|
66
|
+
* each entry describing one struct member.
|
67
|
+
*/
|
68
|
+
declare function struct<TProps extends Record<string, AnyWgslData>>(props: TProps): WgslStruct<TProps>;
|
69
|
+
|
56
70
|
/**
|
57
71
|
* Creates an array schema that can be used to construct gpu buffers.
|
58
72
|
* Describes arrays with fixed-size length, storing elements of the same type.
|
@@ -129,6 +143,17 @@ declare const vec2i: Vec2i;
|
|
129
143
|
* const buffer = root.createBuffer(d.vec2u, d.vec2u(0, 1)); // buffer holding a d.vec2u value, with an initial value of vec2u(0, 1);
|
130
144
|
*/
|
131
145
|
declare const vec2u: Vec2u;
|
146
|
+
/**
|
147
|
+
*
|
148
|
+
* Schema representing `vec2<bool>` - a vector with 2 elements of type `bool`.
|
149
|
+
* Also a constructor function for this vector value.
|
150
|
+
*
|
151
|
+
* @example
|
152
|
+
* const vector = d.vec2b(); // (false, false)
|
153
|
+
* const vector = d.vec2b(true); // (true, true)
|
154
|
+
* const vector = d.vec2b(false, true); // (false, true)
|
155
|
+
*/
|
156
|
+
declare const vec2b: Vec2b;
|
132
157
|
/**
|
133
158
|
*
|
134
159
|
* Schema representing vec3f - a vector with 3 elements of type f32.
|
@@ -185,6 +210,17 @@ declare const vec3i: Vec3i;
|
|
185
210
|
* 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);
|
186
211
|
*/
|
187
212
|
declare const vec3u: Vec3u;
|
213
|
+
/**
|
214
|
+
*
|
215
|
+
* Schema representing `vec3<bool>` - a vector with 3 elements of type `bool`.
|
216
|
+
* Also a constructor function for this vector value.
|
217
|
+
*
|
218
|
+
* @example
|
219
|
+
* const vector = d.vec3b(); // (false, false, false)
|
220
|
+
* const vector = d.vec3b(true); // (true, true, true)
|
221
|
+
* const vector = d.vec3b(false, true, false); // (false, true, false)
|
222
|
+
*/
|
223
|
+
declare const vec3b: Vec3b;
|
188
224
|
/**
|
189
225
|
*
|
190
226
|
* Schema representing vec4f - a vector with 4 elements of type f32.
|
@@ -241,6 +277,17 @@ declare const vec4i: Vec4i;
|
|
241
277
|
* 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);
|
242
278
|
*/
|
243
279
|
declare const vec4u: Vec4u;
|
280
|
+
/**
|
281
|
+
*
|
282
|
+
* Schema representing `vec4<bool>` - a vector with 4 elements of type `bool`.
|
283
|
+
* Also a constructor function for this vector value.
|
284
|
+
*
|
285
|
+
* @example
|
286
|
+
* const vector = d.vec4b(); // (false, false, false, false)
|
287
|
+
* const vector = d.vec4b(true); // (true, true, true, true)
|
288
|
+
* const vector = d.vec4b(false, true, false, true); // (false, true, false, true)
|
289
|
+
*/
|
290
|
+
declare const vec4b: Vec4b;
|
244
291
|
|
245
292
|
/**
|
246
293
|
* Creates an array schema that can be used to construct vertex buffers.
|
@@ -379,4 +426,4 @@ declare function PUBLIC_sizeOf(schema: AnyData): number;
|
|
379
426
|
*/
|
380
427
|
declare function PUBLIC_alignmentOf(schema: AnyData): number;
|
381
428
|
|
382
|
-
export { AnyData, AnyWgslData, Atomic, BaseData, BaseData as BaseWgslData, Bool, Disarray, F16, F32, I32, Mat2x2f, Mat3x3f, Mat4x4f, Ptr, U32, Unstruct, Vec2f, Vec2h, Vec2i, Vec2u, Vec3f, Vec3h, Vec3i, Vec3u, Vec4f, Vec4h, Vec4i, Vec4u, WgslArray, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, bool, disarrayOf, f16, f32, i32, m2x2f, m3x3f, m4x4f, mat2x2f, mat3x3f, mat4x4f, matToArray, ptrFn, ptrHandle, ptrPrivate, ptrStorage, ptrUniform, ptrWorkgroup, PUBLIC_sizeOf as sizeOf, u32, unstruct, vec2f, vec2h, vec2i, vec2u, vec3f, vec3h, vec3i, vec3u, vec4f, vec4h, vec4i, vec4u };
|
429
|
+
export { AnyData, AnyWgslData, Atomic, BaseData, BaseData as BaseWgslData, Bool, Disarray, F16, F32, I32, Mat2x2f, Mat3x3f, Mat4x4f, Ptr, 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, disarrayOf, f16, f32, i32, m2x2f, m3x3f, m4x4f, mat2x2f, mat3x3f, mat4x4f, matToArray, ptrFn, ptrHandle, ptrPrivate, ptrStorage, ptrUniform, ptrWorkgroup, PUBLIC_sizeOf as sizeOf, struct, u32, unstruct, vec2b, vec2f, vec2h, vec2i, vec2u, vec3b, vec3f, vec3h, vec3i, vec3u, vec4b, vec4f, vec4h, vec4i, vec4u };
|
package/data/index.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
import {
|
2
|
-
export {
|
3
|
-
|
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';
|
4
5
|
|
5
6
|
/**
|
6
7
|
* A schema that represents a boolean value. (equivalent to `bool` in WGSL)
|
@@ -53,6 +54,19 @@ declare const f32: F32;
|
|
53
54
|
*/
|
54
55
|
declare const f16: F16;
|
55
56
|
|
57
|
+
/**
|
58
|
+
* Creates a struct schema that can be used to construct GPU buffers.
|
59
|
+
* Ensures proper alignment and padding of properties (as opposed to a `d.unstruct` schema).
|
60
|
+
* The order of members matches the passed in properties object.
|
61
|
+
*
|
62
|
+
* @example
|
63
|
+
* const CircleStruct = d.struct({ radius: d.f32, pos: d.vec3f });
|
64
|
+
*
|
65
|
+
* @param props Record with `string` keys and `TgpuData` values,
|
66
|
+
* each entry describing one struct member.
|
67
|
+
*/
|
68
|
+
declare function struct<TProps extends Record<string, AnyWgslData>>(props: TProps): WgslStruct<TProps>;
|
69
|
+
|
56
70
|
/**
|
57
71
|
* Creates an array schema that can be used to construct gpu buffers.
|
58
72
|
* Describes arrays with fixed-size length, storing elements of the same type.
|
@@ -129,6 +143,17 @@ declare const vec2i: Vec2i;
|
|
129
143
|
* const buffer = root.createBuffer(d.vec2u, d.vec2u(0, 1)); // buffer holding a d.vec2u value, with an initial value of vec2u(0, 1);
|
130
144
|
*/
|
131
145
|
declare const vec2u: Vec2u;
|
146
|
+
/**
|
147
|
+
*
|
148
|
+
* Schema representing `vec2<bool>` - a vector with 2 elements of type `bool`.
|
149
|
+
* Also a constructor function for this vector value.
|
150
|
+
*
|
151
|
+
* @example
|
152
|
+
* const vector = d.vec2b(); // (false, false)
|
153
|
+
* const vector = d.vec2b(true); // (true, true)
|
154
|
+
* const vector = d.vec2b(false, true); // (false, true)
|
155
|
+
*/
|
156
|
+
declare const vec2b: Vec2b;
|
132
157
|
/**
|
133
158
|
*
|
134
159
|
* Schema representing vec3f - a vector with 3 elements of type f32.
|
@@ -185,6 +210,17 @@ declare const vec3i: Vec3i;
|
|
185
210
|
* 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);
|
186
211
|
*/
|
187
212
|
declare const vec3u: Vec3u;
|
213
|
+
/**
|
214
|
+
*
|
215
|
+
* Schema representing `vec3<bool>` - a vector with 3 elements of type `bool`.
|
216
|
+
* Also a constructor function for this vector value.
|
217
|
+
*
|
218
|
+
* @example
|
219
|
+
* const vector = d.vec3b(); // (false, false, false)
|
220
|
+
* const vector = d.vec3b(true); // (true, true, true)
|
221
|
+
* const vector = d.vec3b(false, true, false); // (false, true, false)
|
222
|
+
*/
|
223
|
+
declare const vec3b: Vec3b;
|
188
224
|
/**
|
189
225
|
*
|
190
226
|
* Schema representing vec4f - a vector with 4 elements of type f32.
|
@@ -241,6 +277,17 @@ declare const vec4i: Vec4i;
|
|
241
277
|
* 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);
|
242
278
|
*/
|
243
279
|
declare const vec4u: Vec4u;
|
280
|
+
/**
|
281
|
+
*
|
282
|
+
* Schema representing `vec4<bool>` - a vector with 4 elements of type `bool`.
|
283
|
+
* Also a constructor function for this vector value.
|
284
|
+
*
|
285
|
+
* @example
|
286
|
+
* const vector = d.vec4b(); // (false, false, false, false)
|
287
|
+
* const vector = d.vec4b(true); // (true, true, true, true)
|
288
|
+
* const vector = d.vec4b(false, true, false, true); // (false, true, false, true)
|
289
|
+
*/
|
290
|
+
declare const vec4b: Vec4b;
|
244
291
|
|
245
292
|
/**
|
246
293
|
* Creates an array schema that can be used to construct vertex buffers.
|
@@ -379,4 +426,4 @@ declare function PUBLIC_sizeOf(schema: AnyData): number;
|
|
379
426
|
*/
|
380
427
|
declare function PUBLIC_alignmentOf(schema: AnyData): number;
|
381
428
|
|
382
|
-
export { AnyData, AnyWgslData, Atomic, BaseData, BaseData as BaseWgslData, Bool, Disarray, F16, F32, I32, Mat2x2f, Mat3x3f, Mat4x4f, Ptr, U32, Unstruct, Vec2f, Vec2h, Vec2i, Vec2u, Vec3f, Vec3h, Vec3i, Vec3u, Vec4f, Vec4h, Vec4i, Vec4u, WgslArray, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, bool, disarrayOf, f16, f32, i32, m2x2f, m3x3f, m4x4f, mat2x2f, mat3x3f, mat4x4f, matToArray, ptrFn, ptrHandle, ptrPrivate, ptrStorage, ptrUniform, ptrWorkgroup, PUBLIC_sizeOf as sizeOf, u32, unstruct, vec2f, vec2h, vec2i, vec2u, vec3f, vec3h, vec3i, vec3u, vec4f, vec4h, vec4i, vec4u };
|
429
|
+
export { AnyData, AnyWgslData, Atomic, BaseData, BaseData as BaseWgslData, Bool, Disarray, F16, F32, I32, Mat2x2f, Mat3x3f, Mat4x4f, Ptr, 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, disarrayOf, f16, f32, i32, m2x2f, m3x3f, m4x4f, mat2x2f, mat3x3f, mat4x4f, matToArray, ptrFn, ptrHandle, ptrPrivate, ptrStorage, ptrUniform, ptrWorkgroup, PUBLIC_sizeOf as sizeOf, struct, u32, unstruct, vec2b, vec2f, vec2h, vec2i, vec2u, vec3b, vec3f, vec3h, vec3i, vec3u, vec4b, vec4f, vec4h, vec4i, vec4u };
|
package/data/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{A as
|
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};
|
2
2
|
//# sourceMappingURL=index.js.map
|