typegpu 0.4.0 → 0.4.2-alpha.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.
- package/{attributes-BQuRnaZ4.d.ts → attributes-CkPkK-h9.d.ts} +13 -5
- package/{attributes-Bt2NG-9a.d.cts → attributes-Di0A7-Fw.d.cts} +13 -5
- package/chunk-C5JKINT2.js +4 -0
- package/chunk-C5JKINT2.js.map +1 -0
- package/chunk-DEMK5MOR.cjs +4 -0
- package/chunk-DEMK5MOR.cjs.map +1 -0
- package/chunk-IHC2SDHN.js +2 -0
- package/chunk-IHC2SDHN.js.map +1 -0
- package/chunk-R4S4YVH4.cjs +2 -0
- package/chunk-R4S4YVH4.cjs.map +1 -0
- package/data/index.cjs +1 -1
- package/data/index.d.cts +173 -5
- package/data/index.d.ts +173 -5
- package/data/index.js +1 -1
- package/index.cjs +8 -8
- package/index.cjs.map +1 -1
- package/index.d.cts +196 -107
- package/index.d.ts +196 -107
- package/index.js +8 -8
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/std/index.cjs +1 -1
- package/std/index.cjs.map +1 -1
- package/std/index.d.cts +3 -2
- package/std/index.d.ts +3 -2
- package/std/index.js +1 -1
- package/std/index.js.map +1 -1
- package/{wgslTypes-BNsjCP--.d.cts → wgslTypes-D8LnuOPy.d.cts} +3 -1
- package/{wgslTypes-BNsjCP--.d.ts → wgslTypes-D8LnuOPy.d.ts} +3 -1
- package/chunk-LF344PKG.cjs +0 -4
- package/chunk-LF344PKG.cjs.map +0 -1
- package/chunk-SDSDWWKW.js +0 -2
- package/chunk-SDSDWWKW.js.map +0 -1
- package/chunk-Y2M5GYRO.cjs +0 -2
- package/chunk-Y2M5GYRO.cjs.map +0 -1
- package/chunk-YLI4IK35.js +0 -4
- package/chunk-YLI4IK35.js.map +0 -1
- package/vector-CeDeofzh.d.ts +0 -176
- package/vector-UFYwud47.d.cts +0 -176
package/data/index.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import { G as Bool, U as U32, b as I32, F as F32, a as F16, A as AnyWgslData,
|
2
|
-
export { a9 as Align, an as AnyLooseData, aa as Builtin, D as Decorated, at as FormatToWGSLType, I as Infer, ab as Interpolate, L as Location, am as LooseDecorated, ba as PackedData, a8 as Size, au as TgpuVertexFormatData,
|
3
|
-
export { v as
|
4
|
-
export { A as AnyAttribute, t as AnyBuiltin, j as BuiltinClipDistances, b as BuiltinFragDepth, k as BuiltinFrontFacing, p as BuiltinGlobalInvocationId, g as BuiltinInstanceIndex, n as BuiltinLocalInvocationId, o as BuiltinLocalInvocationIndex, r as BuiltinNumWorkgroups, h as BuiltinPosition, m as BuiltinSampleIndex, B as BuiltinSampleMask, f as BuiltinVertexIndex, q as BuiltinWorkgroupId, H as HasCustomLocation, I as IsBuiltin, c as align, e as builtin, i as interpolate, d as isBuiltin, l as location, s as size } from '../attributes-BQuRnaZ4.js';
|
1
|
+
import { G as Bool, U as U32, b as I32, F as F32, a as F16, A as AnyWgslData, q as WgslArray, w as AnyData, H as PtrFn, V as Vec2f, e as Vec2h, h as Vec2i, k as Vec2u, c as Vec3f, f as Vec3h, i as Vec3i, l as Vec3u, d as Vec4f, g as Vec4h, j as Vec4i, m as Vec4u, r as Disarray, B as BaseData, s as Unstruct, J as Mat2x2f, N as Mat3x3f, Q as Mat4x4f, R as m2x2f, S as m3x3f, X as m4x4f, Y as Atomic } from '../wgslTypes-D8LnuOPy.js';
|
2
|
+
export { a9 as Align, an as AnyLooseData, aa as Builtin, D as Decorated, at as FormatToWGSLType, I as Infer, ab as Interpolate, L as Location, am as LooseDecorated, ba as PackedData, a8 as Size, au as TgpuVertexFormatData, W as WgslStruct, aV as float16, aW as float16x2, aX as float16x4, aY as float32, aZ as float32x2, a_ as float32x3, a$ as float32x4, av as formatToWGSLType, a3 as isAlignAttrib, a1 as isAtomic, a4 as isBuiltinAttrib, ar as isData, a2 as isDecorated, ao as isDisarray, a6 as isInterpolateAttrib, a5 as isLocationAttrib, as as isLooseData, aq as isLooseDecorated, a0 as isPtrFn, a7 as isSizeAttrib, ap as isUnstruct, _ as isWgslArray, Z as isWgslData, $ as isWgslStruct, aw as packedFormats, aM as sint16, aN as sint16x2, aO as sint16x4, b4 as sint32, b5 as sint32x2, b6 as sint32x3, b7 as sint32x4, aA as sint8, aB as sint8x2, aC as sint8x4, aS as snorm16, aT as snorm16x2, aU as snorm16x4, aG as snorm8, aH as snorm8x2, aI as snorm8x4, al as struct, aJ as uint16, aK as uint16x2, aL as uint16x4, b0 as uint32, b1 as uint32x2, b2 as uint32x3, b3 as uint32x4, ax as uint8, ay as uint8x2, az as uint8x4, b8 as unorm10_10_10_2, aP as unorm16, aQ as unorm16x2, aR as unorm16x4, aD as unorm8, aE as unorm8x2, aF as unorm8x4, b9 as unorm8x4_bgra, 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-D8LnuOPy.js';
|
3
|
+
export { A as AnyAttribute, v as AnyBuiltin, j as BuiltinClipDistances, m as BuiltinFragDepth, k as BuiltinFrontFacing, r as BuiltinGlobalInvocationId, g as BuiltinInstanceIndex, p as BuiltinLocalInvocationId, q as BuiltinLocalInvocationIndex, u as BuiltinNumWorkgroups, h as BuiltinPosition, n as BuiltinSampleIndex, o as BuiltinSampleMask, B as BuiltinVertexIndex, t as BuiltinWorkgroupId, H as HasCustomLocation, I as IsBuiltin, d as align, f as builtin, i as interpolate, e as isBuiltin, l as location, s as size } from '../attributes-CkPkK-h9.js';
|
5
4
|
|
6
5
|
/**
|
7
6
|
* A schema that represents a boolean value. (equivalent to `bool` in WGSL)
|
@@ -69,6 +68,175 @@ declare function arrayOf<TElement extends AnyWgslData>(elementType: TElement, el
|
|
69
68
|
|
70
69
|
declare function ptrFn<T extends AnyData>(inner: T): PtrFn<T>;
|
71
70
|
|
71
|
+
/**
|
72
|
+
*
|
73
|
+
* Schema representing vec2f - a vector with 2 elements of type f32.
|
74
|
+
* Also a constructor function for this vector value.
|
75
|
+
*
|
76
|
+
* @example
|
77
|
+
* const vector = d.vec2f(); // (0.0, 0.0)
|
78
|
+
* const vector = d.vec2f(1); // (1.0, 1.0)
|
79
|
+
* const vector = d.vec2f(0.5, 0.1); // (0.5, 0.1)
|
80
|
+
*
|
81
|
+
* @example
|
82
|
+
* const buffer = root.createBuffer(d.vec2f, d.vec2f(0, 1)); // buffer holding a d.vec2f value, with an initial value of vec2f(0, 1);
|
83
|
+
*/
|
84
|
+
declare const vec2f: Vec2f;
|
85
|
+
/**
|
86
|
+
*
|
87
|
+
* Schema representing vec2h - a vector with 2 elements of type f16.
|
88
|
+
* Also a constructor function for this vector value.
|
89
|
+
*
|
90
|
+
* @example
|
91
|
+
* const vector = d.vec2h(); // (0.0, 0.0)
|
92
|
+
* const vector = d.vec2h(1); // (1.0, 1.0)
|
93
|
+
* const vector = d.vec2h(0.5, 0.1); // (0.5, 0.1)
|
94
|
+
*
|
95
|
+
* @example
|
96
|
+
* const buffer = root.createBuffer(d.vec2h, d.vec2h(0, 1)); // buffer holding a d.vec2h value, with an initial value of vec2h(0, 1);
|
97
|
+
*/
|
98
|
+
declare const vec2h: Vec2h;
|
99
|
+
/**
|
100
|
+
*
|
101
|
+
* Schema representing vec2i - a vector with 2 elements of type i32.
|
102
|
+
* Also a constructor function for this vector value.
|
103
|
+
*
|
104
|
+
* @example
|
105
|
+
* const vector = d.vec2i(); // (0, 0)
|
106
|
+
* const vector = d.vec2i(1); // (1, 1)
|
107
|
+
* const vector = d.vec2i(-1, 1); // (-1, 1)
|
108
|
+
*
|
109
|
+
* @example
|
110
|
+
* const buffer = root.createBuffer(d.vec2i, d.vec2i(0, 1)); // buffer holding a d.vec2i value, with an initial value of vec2i(0, 1);
|
111
|
+
*/
|
112
|
+
declare const vec2i: Vec2i;
|
113
|
+
/**
|
114
|
+
*
|
115
|
+
* Schema representing vec2u - a vector with 2 elements of type u32.
|
116
|
+
* Also a constructor function for this vector value.
|
117
|
+
*
|
118
|
+
* @example
|
119
|
+
* const vector = d.vec2u(); // (0, 0)
|
120
|
+
* const vector = d.vec2u(1); // (1, 1)
|
121
|
+
* const vector = d.vec2u(1, 2); // (1, 2)
|
122
|
+
*
|
123
|
+
* @example
|
124
|
+
* const buffer = root.createBuffer(d.vec2u, d.vec2u(0, 1)); // buffer holding a d.vec2u value, with an initial value of vec2u(0, 1);
|
125
|
+
*/
|
126
|
+
declare const vec2u: Vec2u;
|
127
|
+
/**
|
128
|
+
*
|
129
|
+
* Schema representing vec3f - a vector with 3 elements of type f32.
|
130
|
+
* Also a constructor function for this vector value.
|
131
|
+
*
|
132
|
+
* @example
|
133
|
+
* const vector = d.vec3f(); // (0.0, 0.0, 0.0)
|
134
|
+
* const vector = d.vec3f(1); // (1.0, 1.0, 1.0)
|
135
|
+
* const vector = d.vec3f(1, 2, 3.5); // (1.0, 2.0, 3.5)
|
136
|
+
*
|
137
|
+
* @example
|
138
|
+
* 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);
|
139
|
+
*/
|
140
|
+
declare const vec3f: Vec3f;
|
141
|
+
/**
|
142
|
+
*
|
143
|
+
* Schema representing vec3h - a vector with 3 elements of type f16.
|
144
|
+
* Also a constructor function for this vector value.
|
145
|
+
*
|
146
|
+
* @example
|
147
|
+
* const vector = d.vec3h(); // (0.0, 0.0, 0.0)
|
148
|
+
* const vector = d.vec3h(1); // (1.0, 1.0, 1.0)
|
149
|
+
* const vector = d.vec3h(1, 2, 3.5); // (1.0, 2.0, 3.5)
|
150
|
+
*
|
151
|
+
* @example
|
152
|
+
* 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);
|
153
|
+
*/
|
154
|
+
declare const vec3h: Vec3h;
|
155
|
+
/**
|
156
|
+
*
|
157
|
+
* Schema representing vec3i - a vector with 3 elements of type i32.
|
158
|
+
* Also a constructor function for this vector value.
|
159
|
+
*
|
160
|
+
* @example
|
161
|
+
* const vector = d.vec3i(); // (0, 0, 0)
|
162
|
+
* const vector = d.vec3i(1); // (1, 1, 1)
|
163
|
+
* const vector = d.vec3i(1, 2, -3); // (1, 2, -3)
|
164
|
+
*
|
165
|
+
* @example
|
166
|
+
* 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);
|
167
|
+
*/
|
168
|
+
declare const vec3i: Vec3i;
|
169
|
+
/**
|
170
|
+
*
|
171
|
+
* Schema representing vec3u - a vector with 3 elements of type u32.
|
172
|
+
* Also a constructor function for this vector value.
|
173
|
+
*
|
174
|
+
* @example
|
175
|
+
* const vector = d.vec3u(); // (0, 0, 0)
|
176
|
+
* const vector = d.vec3u(1); // (1, 1, 1)
|
177
|
+
* const vector = d.vec3u(1, 2, 3); // (1, 2, 3)
|
178
|
+
*
|
179
|
+
* @example
|
180
|
+
* 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);
|
181
|
+
*/
|
182
|
+
declare const vec3u: Vec3u;
|
183
|
+
/**
|
184
|
+
*
|
185
|
+
* Schema representing vec4f - a vector with 4 elements of type f32.
|
186
|
+
* Also a constructor function for this vector value.
|
187
|
+
*
|
188
|
+
* @example
|
189
|
+
* const vector = d.vec4f(); // (0.0, 0.0, 0.0, 0.0)
|
190
|
+
* const vector = d.vec4f(1); // (1.0, 1.0, 1.0, 1.0)
|
191
|
+
* const vector = d.vec4f(1, 2, 3, 4.5); // (1.0, 2.0, 3.0, 4.5)
|
192
|
+
*
|
193
|
+
* @example
|
194
|
+
* 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);
|
195
|
+
*/
|
196
|
+
declare const vec4f: Vec4f;
|
197
|
+
/**
|
198
|
+
*
|
199
|
+
* Schema representing vec4h - a vector with 4 elements of type f16.
|
200
|
+
* Also a constructor function for this vector value.
|
201
|
+
*
|
202
|
+
* @example
|
203
|
+
* const vector = d.vec4h(); // (0.0, 0.0, 0.0, 0.0)
|
204
|
+
* const vector = d.vec4h(1); // (1.0, 1.0, 1.0, 1.0)
|
205
|
+
* const vector = d.vec4h(1, 2, 3, 4.5); // (1.0, 2.0, 3.0, 4.5)
|
206
|
+
*
|
207
|
+
* @example
|
208
|
+
* 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);
|
209
|
+
*/
|
210
|
+
declare const vec4h: Vec4h;
|
211
|
+
/**
|
212
|
+
*
|
213
|
+
* Schema representing vec4i - a vector with 4 elements of type i32.
|
214
|
+
* Also a constructor function for this vector value.
|
215
|
+
*
|
216
|
+
* @example
|
217
|
+
* const vector = d.vec4i(); // (0, 0, 0, 0)
|
218
|
+
* const vector = d.vec4i(1); // (1, 1, 1, 1)
|
219
|
+
* const vector = d.vec4i(1, 2, 3, -4); // (1, 2, 3, -4)
|
220
|
+
*
|
221
|
+
* @example
|
222
|
+
* 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);
|
223
|
+
*/
|
224
|
+
declare const vec4i: Vec4i;
|
225
|
+
/**
|
226
|
+
*
|
227
|
+
* Schema representing vec4u - a vector with 4 elements of type u32.
|
228
|
+
* Also a constructor function for this vector value.
|
229
|
+
*
|
230
|
+
* @example
|
231
|
+
* const vector = d.vec4u(); // (0, 0, 0, 0)
|
232
|
+
* const vector = d.vec4u(1); // (1, 1, 1, 1)
|
233
|
+
* const vector = d.vec4u(1, 2, 3, 4); // (1, 2, 3, 4)
|
234
|
+
*
|
235
|
+
* @example
|
236
|
+
* 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);
|
237
|
+
*/
|
238
|
+
declare const vec4u: Vec4u;
|
239
|
+
|
72
240
|
/**
|
73
241
|
* Creates an array schema that can be used to construct vertex buffers.
|
74
242
|
* Describes arrays with fixed-size length, storing elements of the same type.
|
@@ -206,4 +374,4 @@ declare function PUBLIC_sizeOf(schema: AnyData): number;
|
|
206
374
|
*/
|
207
375
|
declare function PUBLIC_alignmentOf(schema: AnyData): number;
|
208
376
|
|
209
|
-
export { AnyData, AnyWgslData, Atomic, BaseData, BaseData as BaseWgslData, Bool, Disarray, F16, F32, I32, Mat2x2f, Mat3x3f, Mat4x4f, PtrFn, U32, Unstruct, WgslArray, PUBLIC_alignmentOf as alignmentOf, arrayOf, atomic, bool, disarrayOf, f16, f32, i32, m2x2f, m3x3f, m4x4f, mat2x2f, mat3x3f, mat4x4f, matToArray, ptrFn, PUBLIC_sizeOf as sizeOf, u32, unstruct };
|
377
|
+
export { AnyData, AnyWgslData, Atomic, BaseData, BaseData as BaseWgslData, Bool, Disarray, F16, F32, I32, Mat2x2f, Mat3x3f, Mat4x4f, PtrFn, 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, PUBLIC_sizeOf as sizeOf, u32, unstruct, vec2f, vec2h, vec2i, vec2u, vec3f, vec3h, vec3i, vec3u, vec4f, vec4h, vec4i, vec4u };
|
package/data/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import{$ as ha,A as I,Aa as Ia,B as J,Ba as Ja,C as K,Ca as Ka,D as L,Da as La,E as M,Ea as Ma,F as N,G as O,Ga as Na,H as P,I as Q,J as R,K as S,L as T,M as U,N as V,O as W,P as X,Q as Y,R as Z,S as _,T as $,U as aa,V as ba,W as ca,X as da,Y as ea,Z as fa,_ as ga,a,aa as ia,b,ba as ja,c,ca as ka,d,da as la,e,ea as ma,f,fa as na,g,ga as oa,h,ha as pa,i,ia as qa,j,ja as ra,k,ka as sa,la as ta,ma as ua,n as l,na as va,o as m,oa as wa,p as n,q as o,ra as xa,s as p,t as q,ta as ya,u as r,ua as za,v as s,va as Aa,w as t,wa as Ba,x as u,xa as Ca,y as v,ya as Ha}from"../chunk-
|
1
|
+
import{$ as ha,A as I,Aa as Ia,B as J,Ba as Ja,C as K,Ca as Ka,D as L,Da as La,E as M,Ea as Ma,F as N,G as O,Ga as Na,H as P,I as Q,J as R,K as S,L as T,M as U,N as V,O as W,P as X,Q as Y,R as Z,S as _,T as $,U as aa,V as ba,W as ca,X as da,Y as ea,Z as fa,_ as ga,a,aa as ia,b,ba as ja,c,ca as ka,d,da as la,e,ea as ma,f,fa as na,g,ga as oa,h,ha as pa,i,ia as qa,j,ja as ra,k,ka as sa,la as ta,ma as ua,n as l,na as va,o as m,oa as wa,p as n,q as o,ra as xa,s as p,t as q,ta as ya,u as r,ua as za,v as s,va as Aa,w as t,wa as Ba,x as u,xa as Ca,y as v,ya as Ha}from"../chunk-IHC2SDHN.js";import{A as Ea,B as Fa,C as Ga,n as w,o as x,p as y,q as z,r as A,s as B,t as C,u as D,v as E,w as F,x as G,y as H,z as Da}from"../chunk-C5JKINT2.js";export{Ia as align,xa as alignmentOf,za as arrayOf,Ha as atomic,q as bool,Na as builtin,Ba as disarrayOf,u as f16,t as f32,ga as float16,ha as float16x2,ia as float16x4,ja as float32,ka as float32x2,la as float32x3,ma as float32x4,I as formatToWGSLType,s as i32,La as interpolate,f as isAlignAttrib,e as isAtomic,Ma as isBuiltin,j as isBuiltinAttrib,p as isData,k as isDecorated,m as isDisarray,i as isInterpolateAttrib,h as isLocationAttrib,l as isLooseData,o as isLooseDecorated,d as isPtrFn,g as isSizeAttrib,n as isUnstruct,b as isWgslArray,a as isWgslData,c as isWgslStruct,Ka as location,Da as mat2x2f,Ea as mat3x3f,Fa as mat4x4f,Ga as matToArray,J as packedFormats,Aa as ptrFn,Z as sint16,_ as sint16x2,$ as sint16x4,ra as sint32,sa as sint32x2,ta as sint32x3,ua as sint32x4,N as sint8,O as sint8x2,P as sint8x4,Ja as size,ya as sizeOf,da as snorm16,ea as snorm16x2,fa as snorm16x4,T as snorm8,U as snorm8x2,V as snorm8x4,v as struct,r as u32,W as uint16,X as uint16x2,Y as uint16x4,na as uint32,oa as uint32x2,pa as uint32x3,qa as uint32x4,K as uint8,L as uint8x2,M as uint8x4,va as unorm10_10_10_2,aa as unorm16,ba as unorm16x2,ca as unorm16x4,Q as unorm8,R as unorm8x2,S as unorm8x4,wa as unorm8x4_bgra,Ca as unstruct,w as vec2f,x as vec2h,y as vec2i,z as vec2u,A as vec3f,B as vec3h,C as vec3i,D as vec3u,E as vec4f,F as vec4h,G as vec4i,H as vec4u};
|
2
2
|
//# sourceMappingURL=index.js.map
|