typegpu 0.1.2 → 0.2.0-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE.md +21 -0
- package/README.md +1 -1
- package/chunk-5EPBCOO4.js +8 -0
- package/chunk-5EPBCOO4.js.map +1 -0
- package/chunk-SBJR5ZQJ.cjs +8 -0
- package/chunk-SBJR5ZQJ.cjs.map +1 -0
- package/data/index.cjs +1 -7
- package/data/index.cjs.map +1 -1
- package/data/index.d.cts +482 -48
- package/data/index.d.ts +482 -48
- package/data/index.js +1 -7
- package/data/index.js.map +1 -1
- package/index.cjs +51 -1
- package/index.cjs.map +1 -1
- package/index.d.cts +299 -37
- package/index.d.ts +299 -37
- package/index.js +51 -1
- package/index.js.map +1 -1
- package/package.json +7 -1
- package/types-qmW7FFqN.d.cts +880 -0
- package/types-qmW7FFqN.d.ts +880 -0
- package/chunk-3I5VAGHS.js +0 -2
- package/chunk-3I5VAGHS.js.map +0 -1
- package/chunk-PMM3NYJ4.cjs +0 -2
- package/chunk-PMM3NYJ4.cjs.map +0 -1
- package/vector-D5Vx-xhb.d.cts +0 -516
- package/vector-D5Vx-xhb.d.ts +0 -516
package/vector-D5Vx-xhb.d.ts
DELETED
@@ -1,516 +0,0 @@
|
|
1
|
-
import { Unwrap, ISchema, Parsed } from 'typed-binary';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Can be assigned a name. Not to be confused with
|
5
|
-
* being able to HAVE a name.
|
6
|
-
*/
|
7
|
-
interface TgpuNamable {
|
8
|
-
$name(label?: string | undefined): this;
|
9
|
-
}
|
10
|
-
|
11
|
-
type Getter = <T>(plum: TgpuPlum<T>) => T;
|
12
|
-
interface TgpuPlum<TValue = unknown> extends TgpuNamable {
|
13
|
-
readonly __brand: 'TgpuPlum';
|
14
|
-
/**
|
15
|
-
* Computes the value of this plum. Circumvents the store
|
16
|
-
* memoization, so use with care.
|
17
|
-
*/
|
18
|
-
compute(get: Getter): TValue;
|
19
|
-
}
|
20
|
-
|
21
|
-
interface TgpuBufferUsage<TData extends AnyTgpuData, TUsage extends BufferUsage = BufferUsage> extends TgpuBindable<TData, TUsage> {
|
22
|
-
value: Unwrap<TData>;
|
23
|
-
}
|
24
|
-
|
25
|
-
type AnyTgpuDataTuple = [AnyTgpuData, ...AnyTgpuData[]] | [];
|
26
|
-
type UnwrapArgs<T extends AnyTgpuDataTuple> = {
|
27
|
-
[Idx in keyof T]: Unwrap<T[Idx]>;
|
28
|
-
};
|
29
|
-
type UnwrapReturn<T extends AnyTgpuData | undefined> = T extends undefined ? void : Unwrap<T>;
|
30
|
-
/**
|
31
|
-
* Describes a function signature (its arguments and return type)
|
32
|
-
*/
|
33
|
-
interface TgpuFnShell<Args extends AnyTgpuDataTuple, Return extends AnyTgpuData | undefined> {
|
34
|
-
readonly argTypes: Args;
|
35
|
-
readonly returnType: Return | undefined;
|
36
|
-
/**
|
37
|
-
* Creates a type-safe implementation of this signature
|
38
|
-
*/
|
39
|
-
implement(body: (...args: UnwrapArgs<Args>) => UnwrapReturn<Return>): TgpuFn<Args, Return>;
|
40
|
-
}
|
41
|
-
interface TgpuFnBase<Args extends AnyTgpuDataTuple, Return extends AnyTgpuData | undefined = undefined> extends TgpuResolvable, TgpuNamable {
|
42
|
-
readonly shell: TgpuFnShell<Args, Return>;
|
43
|
-
/** The JS function body passed as an implementation of a TypeGPU function. */
|
44
|
-
readonly body: (...args: UnwrapArgs<Args>) => UnwrapReturn<Return>;
|
45
|
-
readonly bodyResolvable: TgpuResolvable;
|
46
|
-
$uses(dependencyMap: Record<string, Wgsl>): this;
|
47
|
-
}
|
48
|
-
type TgpuFn<Args extends AnyTgpuDataTuple, Return extends AnyTgpuData | undefined = undefined> = TgpuFnBase<Args, Return> & ((...args: UnwrapArgs<Args>) => UnwrapReturn<Return>);
|
49
|
-
|
50
|
-
type Wgsl = string | number | TgpuResolvable | symbol | boolean;
|
51
|
-
/**
|
52
|
-
* Passed into each resolvable item. All sibling items share a resolution ctx,
|
53
|
-
* and a new resolution ctx is made when going down each level in the tree.
|
54
|
-
*/
|
55
|
-
interface ResolutionCtx {
|
56
|
-
/**
|
57
|
-
* Slots that were used by items resolved by this context.
|
58
|
-
*/
|
59
|
-
readonly usedSlots: Iterable<TgpuSlot<unknown>>;
|
60
|
-
addDeclaration(item: TgpuResolvable): void;
|
61
|
-
addBinding(bindable: TgpuBindable, identifier: TgpuIdentifier): void;
|
62
|
-
addRenderResource(resource: TgpuRenderResource, identifier: TgpuIdentifier): void;
|
63
|
-
addBuiltin(builtin: symbol): void;
|
64
|
-
nameFor(token: TgpuResolvable): string;
|
65
|
-
/**
|
66
|
-
* Unwraps all layers of slot indirection and returns the concrete value if available.
|
67
|
-
* @throws {MissingSlotValueError}
|
68
|
-
*/
|
69
|
-
unwrap<T>(eventual: Eventual<T>): T;
|
70
|
-
resolve(item: Wgsl, slotValueOverrides?: SlotValuePair<unknown>[]): string;
|
71
|
-
transpileFn(fn: TgpuFn<any, any>, externalMap: Record<string, Wgsl>): {
|
72
|
-
head: Wgsl;
|
73
|
-
body: Wgsl;
|
74
|
-
};
|
75
|
-
}
|
76
|
-
interface TgpuResolvable {
|
77
|
-
readonly label?: string | undefined;
|
78
|
-
resolve(ctx: ResolutionCtx): string;
|
79
|
-
}
|
80
|
-
interface TgpuIdentifier extends TgpuNamable, TgpuResolvable {
|
81
|
-
}
|
82
|
-
/**
|
83
|
-
* Represents a value that is available at resolution time.
|
84
|
-
*/
|
85
|
-
type Eventual<T> = T | TgpuSlot<T>;
|
86
|
-
type SlotValuePair<T> = [TgpuSlot<T>, T];
|
87
|
-
interface TgpuAllocatable<TData extends AnyTgpuData = AnyTgpuData> {
|
88
|
-
/**
|
89
|
-
* The data type this allocatable was constructed with.
|
90
|
-
* It informs the size and format of data in both JS and
|
91
|
-
* binary.
|
92
|
-
*/
|
93
|
-
readonly dataType: TData;
|
94
|
-
readonly initial?: Parsed<TData> | TgpuPlum<Parsed<TData>> | undefined;
|
95
|
-
readonly flags: GPUBufferUsageFlags;
|
96
|
-
}
|
97
|
-
interface TgpuBindable<TData extends AnyTgpuData = AnyTgpuData, TUsage extends BufferUsage = BufferUsage> extends TgpuResolvable {
|
98
|
-
readonly allocatable: TgpuAllocatable<TData>;
|
99
|
-
readonly usage: TUsage;
|
100
|
-
}
|
101
|
-
type TgpuSamplerType = 'sampler' | 'sampler_comparison';
|
102
|
-
type TgpuTypedTextureType = 'texture_1d' | 'texture_2d' | 'texture_2d_array' | 'texture_3d' | 'texture_cube' | 'texture_cube_array' | 'texture_multisampled_2d';
|
103
|
-
type TgpuDepthTextureType = 'texture_depth_2d' | 'texture_depth_2d_array' | 'texture_depth_cube' | 'texture_depth_cube_array' | 'texture_depth_multisampled_2d';
|
104
|
-
type TgpuStorageTextureType = 'texture_storage_1d' | 'texture_storage_2d' | 'texture_storage_2d_array' | 'texture_storage_3d';
|
105
|
-
type TgpuExternalTextureType = 'texture_external';
|
106
|
-
type TgpuRenderResourceType = TgpuSamplerType | TgpuTypedTextureType | TgpuDepthTextureType | TgpuStorageTextureType | TgpuExternalTextureType;
|
107
|
-
interface TgpuRenderResource extends TgpuResolvable {
|
108
|
-
readonly type: TgpuRenderResourceType;
|
109
|
-
}
|
110
|
-
type BufferUsage = 'uniform' | 'readonly' | 'mutable' | 'vertex';
|
111
|
-
type ValueOf<T> = T extends TgpuSlot<infer I> ? ValueOf<I> : T extends TgpuBufferUsage<infer D> ? ValueOf<D> : T extends TgpuData<unknown> ? Unwrap<T> : T;
|
112
|
-
interface TgpuData<TInner> extends ISchema<TInner>, TgpuResolvable {
|
113
|
-
readonly byteAlignment: number;
|
114
|
-
readonly size: number;
|
115
|
-
}
|
116
|
-
type AnyTgpuData = TgpuData<unknown>;
|
117
|
-
interface TgpuPointer<TScope extends 'function', TInner extends AnyTgpuData> {
|
118
|
-
readonly scope: TScope;
|
119
|
-
readonly pointsTo: TInner;
|
120
|
-
}
|
121
|
-
interface TgpuSlot<T> extends TgpuNamable {
|
122
|
-
readonly __brand: 'TgpuSlot';
|
123
|
-
readonly defaultValue: T | undefined;
|
124
|
-
readonly label?: string | undefined;
|
125
|
-
/**
|
126
|
-
* Used to determine if code generated using either value `a` or `b` in place
|
127
|
-
* of the slot will be equivalent. Defaults to `Object.is`.
|
128
|
-
*/
|
129
|
-
areEqual(a: T, b: T): boolean;
|
130
|
-
value: ValueOf<T>;
|
131
|
-
}
|
132
|
-
|
133
|
-
interface Swizzle2<T2, T3, T4> {
|
134
|
-
readonly xx: T2;
|
135
|
-
readonly xy: T2;
|
136
|
-
readonly yx: T2;
|
137
|
-
readonly yy: T2;
|
138
|
-
readonly xxx: T3;
|
139
|
-
readonly xxy: T3;
|
140
|
-
readonly xyx: T3;
|
141
|
-
readonly xyy: T3;
|
142
|
-
readonly yxx: T3;
|
143
|
-
readonly yxy: T3;
|
144
|
-
readonly yyx: T3;
|
145
|
-
readonly yyy: T3;
|
146
|
-
readonly xxxx: T4;
|
147
|
-
readonly xxxy: T4;
|
148
|
-
readonly xxyx: T4;
|
149
|
-
readonly xxyy: T4;
|
150
|
-
readonly xyxx: T4;
|
151
|
-
readonly xyxy: T4;
|
152
|
-
readonly xyyx: T4;
|
153
|
-
readonly xyyy: T4;
|
154
|
-
readonly yxxx: T4;
|
155
|
-
readonly yxxy: T4;
|
156
|
-
readonly yxyx: T4;
|
157
|
-
readonly yxyy: T4;
|
158
|
-
readonly yyxx: T4;
|
159
|
-
readonly yyxy: T4;
|
160
|
-
readonly yyyx: T4;
|
161
|
-
readonly yyyy: T4;
|
162
|
-
}
|
163
|
-
interface Swizzle3<T2, T3, T4> extends Swizzle2<T2, T3, T4> {
|
164
|
-
readonly xz: T2;
|
165
|
-
readonly yz: T2;
|
166
|
-
readonly zx: T2;
|
167
|
-
readonly zy: T2;
|
168
|
-
readonly zz: T2;
|
169
|
-
readonly xxz: T3;
|
170
|
-
readonly xyz: T3;
|
171
|
-
readonly xzx: T3;
|
172
|
-
readonly xzy: T3;
|
173
|
-
readonly xzz: T3;
|
174
|
-
readonly yxz: T3;
|
175
|
-
readonly yyz: T3;
|
176
|
-
readonly yzx: T3;
|
177
|
-
readonly yzy: T3;
|
178
|
-
readonly yzz: T3;
|
179
|
-
readonly zxx: T3;
|
180
|
-
readonly zxy: T3;
|
181
|
-
readonly zxz: T3;
|
182
|
-
readonly zyx: T3;
|
183
|
-
readonly zyy: T3;
|
184
|
-
readonly zyz: T3;
|
185
|
-
readonly zzx: T3;
|
186
|
-
readonly zzy: T3;
|
187
|
-
readonly zzz: T3;
|
188
|
-
readonly xxxz: T4;
|
189
|
-
readonly xxyz: T4;
|
190
|
-
readonly xxzx: T4;
|
191
|
-
readonly xxzy: T4;
|
192
|
-
readonly xxzz: T4;
|
193
|
-
readonly xyxz: T4;
|
194
|
-
readonly xyyz: T4;
|
195
|
-
readonly xyzx: T4;
|
196
|
-
readonly xyzy: T4;
|
197
|
-
readonly xyzz: T4;
|
198
|
-
readonly xzxx: T4;
|
199
|
-
readonly xzxy: T4;
|
200
|
-
readonly xzxz: T4;
|
201
|
-
readonly xzyx: T4;
|
202
|
-
readonly xzyy: T4;
|
203
|
-
readonly xzyz: T4;
|
204
|
-
readonly xzzx: T4;
|
205
|
-
readonly xzzy: T4;
|
206
|
-
readonly xzzz: T4;
|
207
|
-
readonly yxxz: T4;
|
208
|
-
readonly yxyz: T4;
|
209
|
-
readonly yxzx: T4;
|
210
|
-
readonly yxzy: T4;
|
211
|
-
readonly yxzz: T4;
|
212
|
-
readonly yyxz: T4;
|
213
|
-
readonly yyyz: T4;
|
214
|
-
readonly yyzx: T4;
|
215
|
-
readonly yyzy: T4;
|
216
|
-
readonly yyzz: T4;
|
217
|
-
readonly yzxx: T4;
|
218
|
-
readonly yzxy: T4;
|
219
|
-
readonly yzxz: T4;
|
220
|
-
readonly yzyx: T4;
|
221
|
-
readonly yzyy: T4;
|
222
|
-
readonly yzyz: T4;
|
223
|
-
readonly yzzx: T4;
|
224
|
-
readonly yzzy: T4;
|
225
|
-
readonly yzzz: T4;
|
226
|
-
readonly zxxx: T4;
|
227
|
-
readonly zxxy: T4;
|
228
|
-
readonly zxxz: T4;
|
229
|
-
readonly zxyx: T4;
|
230
|
-
readonly zxyy: T4;
|
231
|
-
readonly zxyz: T4;
|
232
|
-
readonly zxzx: T4;
|
233
|
-
readonly zxzy: T4;
|
234
|
-
readonly zxzz: T4;
|
235
|
-
readonly zyxx: T4;
|
236
|
-
readonly zyxy: T4;
|
237
|
-
readonly zyxz: T4;
|
238
|
-
readonly zyyx: T4;
|
239
|
-
readonly zyyy: T4;
|
240
|
-
readonly zyyz: T4;
|
241
|
-
readonly zyzx: T4;
|
242
|
-
readonly zyzy: T4;
|
243
|
-
readonly zyzz: T4;
|
244
|
-
readonly zzxx: T4;
|
245
|
-
readonly zzxy: T4;
|
246
|
-
readonly zzxz: T4;
|
247
|
-
readonly zzyx: T4;
|
248
|
-
readonly zzyy: T4;
|
249
|
-
readonly zzyz: T4;
|
250
|
-
readonly zzzx: T4;
|
251
|
-
readonly zzzy: T4;
|
252
|
-
readonly zzzz: T4;
|
253
|
-
}
|
254
|
-
interface Swizzle4<T2, T3, T4> extends Swizzle3<T2, T3, T4> {
|
255
|
-
readonly yw: T2;
|
256
|
-
readonly zw: T2;
|
257
|
-
readonly wx: T2;
|
258
|
-
readonly wy: T2;
|
259
|
-
readonly wz: T2;
|
260
|
-
readonly ww: T2;
|
261
|
-
readonly xxw: T3;
|
262
|
-
readonly xyw: T3;
|
263
|
-
readonly xzw: T3;
|
264
|
-
readonly xwx: T3;
|
265
|
-
readonly xwy: T3;
|
266
|
-
readonly xwz: T3;
|
267
|
-
readonly xww: T3;
|
268
|
-
readonly yxw: T3;
|
269
|
-
readonly yyw: T3;
|
270
|
-
readonly yzw: T3;
|
271
|
-
readonly ywx: T3;
|
272
|
-
readonly ywy: T3;
|
273
|
-
readonly ywz: T3;
|
274
|
-
readonly yww: T3;
|
275
|
-
readonly zxw: T3;
|
276
|
-
readonly zyw: T3;
|
277
|
-
readonly zzw: T3;
|
278
|
-
readonly zwx: T3;
|
279
|
-
readonly zwy: T3;
|
280
|
-
readonly zwz: T3;
|
281
|
-
readonly zww: T3;
|
282
|
-
readonly wxx: T3;
|
283
|
-
readonly wxz: T3;
|
284
|
-
readonly wxy: T3;
|
285
|
-
readonly wyy: T3;
|
286
|
-
readonly wyz: T3;
|
287
|
-
readonly wzz: T3;
|
288
|
-
readonly wwx: T3;
|
289
|
-
readonly wwy: T3;
|
290
|
-
readonly wwz: T3;
|
291
|
-
readonly www: T3;
|
292
|
-
readonly xxxw: T4;
|
293
|
-
readonly xxyw: T4;
|
294
|
-
readonly xxzw: T4;
|
295
|
-
readonly xxwx: T4;
|
296
|
-
readonly xxwy: T4;
|
297
|
-
readonly xxwz: T4;
|
298
|
-
readonly xxww: T4;
|
299
|
-
readonly xyxw: T4;
|
300
|
-
readonly xyyw: T4;
|
301
|
-
readonly xyzw: T4;
|
302
|
-
readonly xywx: T4;
|
303
|
-
readonly xywy: T4;
|
304
|
-
readonly xywz: T4;
|
305
|
-
readonly xyww: T4;
|
306
|
-
readonly xzxw: T4;
|
307
|
-
readonly xzyw: T4;
|
308
|
-
readonly xzzw: T4;
|
309
|
-
readonly xzwx: T4;
|
310
|
-
readonly xzwy: T4;
|
311
|
-
readonly xzwz: T4;
|
312
|
-
readonly xzww: T4;
|
313
|
-
readonly xwxx: T4;
|
314
|
-
readonly xwxy: T4;
|
315
|
-
readonly xwxz: T4;
|
316
|
-
readonly xwyy: T4;
|
317
|
-
readonly xwyz: T4;
|
318
|
-
readonly xwzz: T4;
|
319
|
-
readonly xwwx: T4;
|
320
|
-
readonly xwwy: T4;
|
321
|
-
readonly xwwz: T4;
|
322
|
-
readonly xwww: T4;
|
323
|
-
readonly yxxw: T4;
|
324
|
-
readonly yxyw: T4;
|
325
|
-
readonly yxzw: T4;
|
326
|
-
readonly yxwx: T4;
|
327
|
-
readonly yxwy: T4;
|
328
|
-
readonly yxwz: T4;
|
329
|
-
readonly yxww: T4;
|
330
|
-
readonly yyxw: T4;
|
331
|
-
readonly yyyw: T4;
|
332
|
-
readonly yyzw: T4;
|
333
|
-
readonly yywx: T4;
|
334
|
-
readonly yywy: T4;
|
335
|
-
readonly yywz: T4;
|
336
|
-
readonly yyww: T4;
|
337
|
-
readonly yzxw: T4;
|
338
|
-
readonly yzyw: T4;
|
339
|
-
readonly yzzw: T4;
|
340
|
-
readonly yzwx: T4;
|
341
|
-
readonly yzwy: T4;
|
342
|
-
readonly yzwz: T4;
|
343
|
-
readonly yzww: T4;
|
344
|
-
readonly ywxx: T4;
|
345
|
-
readonly ywxy: T4;
|
346
|
-
readonly ywxz: T4;
|
347
|
-
readonly ywxw: T4;
|
348
|
-
readonly ywyy: T4;
|
349
|
-
readonly ywyz: T4;
|
350
|
-
readonly ywzz: T4;
|
351
|
-
readonly ywwx: T4;
|
352
|
-
readonly ywwy: T4;
|
353
|
-
readonly ywwz: T4;
|
354
|
-
readonly ywww: T4;
|
355
|
-
readonly zxxw: T4;
|
356
|
-
readonly zxyw: T4;
|
357
|
-
readonly zxzw: T4;
|
358
|
-
readonly zxwx: T4;
|
359
|
-
readonly zxwy: T4;
|
360
|
-
readonly zxwz: T4;
|
361
|
-
readonly zxww: T4;
|
362
|
-
readonly zyxw: T4;
|
363
|
-
readonly zyyw: T4;
|
364
|
-
readonly zyzw: T4;
|
365
|
-
readonly zywx: T4;
|
366
|
-
readonly zywy: T4;
|
367
|
-
readonly zywz: T4;
|
368
|
-
readonly zyww: T4;
|
369
|
-
readonly zzxw: T4;
|
370
|
-
readonly zzyw: T4;
|
371
|
-
readonly zzzw: T4;
|
372
|
-
readonly zzwx: T4;
|
373
|
-
readonly zzwy: T4;
|
374
|
-
readonly zzwz: T4;
|
375
|
-
readonly zzww: T4;
|
376
|
-
readonly zwxx: T4;
|
377
|
-
readonly zwxy: T4;
|
378
|
-
readonly zwxz: T4;
|
379
|
-
readonly zwxw: T4;
|
380
|
-
readonly zwyy: T4;
|
381
|
-
readonly zwyz: T4;
|
382
|
-
readonly zwzz: T4;
|
383
|
-
readonly zwwx: T4;
|
384
|
-
readonly zwwy: T4;
|
385
|
-
readonly zwwz: T4;
|
386
|
-
readonly zwww: T4;
|
387
|
-
readonly wxxx: T4;
|
388
|
-
readonly wxxy: T4;
|
389
|
-
readonly wxxz: T4;
|
390
|
-
readonly wxxw: T4;
|
391
|
-
readonly wxyx: T4;
|
392
|
-
readonly wxyy: T4;
|
393
|
-
readonly wxyz: T4;
|
394
|
-
readonly wxyw: T4;
|
395
|
-
readonly wxzx: T4;
|
396
|
-
readonly wxzy: T4;
|
397
|
-
readonly wxzz: T4;
|
398
|
-
readonly wxzw: T4;
|
399
|
-
readonly wxwx: T4;
|
400
|
-
readonly wxwy: T4;
|
401
|
-
readonly wxwz: T4;
|
402
|
-
readonly wxww: T4;
|
403
|
-
readonly wyxx: T4;
|
404
|
-
readonly wyxy: T4;
|
405
|
-
readonly wyxz: T4;
|
406
|
-
readonly wyxw: T4;
|
407
|
-
readonly wyyy: T4;
|
408
|
-
readonly wyyz: T4;
|
409
|
-
readonly wyzw: T4;
|
410
|
-
readonly wywx: T4;
|
411
|
-
readonly wywy: T4;
|
412
|
-
readonly wywz: T4;
|
413
|
-
readonly wyww: T4;
|
414
|
-
readonly wzxx: T4;
|
415
|
-
readonly wzxy: T4;
|
416
|
-
readonly wzxz: T4;
|
417
|
-
readonly wzxw: T4;
|
418
|
-
readonly wzyy: T4;
|
419
|
-
readonly wzyz: T4;
|
420
|
-
readonly wzzy: T4;
|
421
|
-
readonly wzzw: T4;
|
422
|
-
readonly wzwx: T4;
|
423
|
-
readonly wzwy: T4;
|
424
|
-
readonly wzwz: T4;
|
425
|
-
readonly wzww: T4;
|
426
|
-
readonly wwxx: T4;
|
427
|
-
readonly wwxy: T4;
|
428
|
-
readonly wwxz: T4;
|
429
|
-
readonly wwxw: T4;
|
430
|
-
readonly wwyy: T4;
|
431
|
-
readonly wwyz: T4;
|
432
|
-
readonly wwzz: T4;
|
433
|
-
readonly wwwx: T4;
|
434
|
-
readonly wwwy: T4;
|
435
|
-
readonly wwwz: T4;
|
436
|
-
readonly wwww: T4;
|
437
|
-
}
|
438
|
-
interface vec2 {
|
439
|
-
x: number;
|
440
|
-
y: number;
|
441
|
-
[Symbol.iterator](): Iterator<number>;
|
442
|
-
}
|
443
|
-
interface vec3 {
|
444
|
-
x: number;
|
445
|
-
y: number;
|
446
|
-
z: number;
|
447
|
-
[Symbol.iterator](): Iterator<number>;
|
448
|
-
}
|
449
|
-
interface vec4 {
|
450
|
-
x: number;
|
451
|
-
y: number;
|
452
|
-
z: number;
|
453
|
-
w: number;
|
454
|
-
[Symbol.iterator](): Iterator<number>;
|
455
|
-
}
|
456
|
-
type VecKind = 'vec2f' | 'vec2i' | 'vec2u' | 'vec3f' | 'vec3i' | 'vec3u' | 'vec4f' | 'vec4i' | 'vec4u';
|
457
|
-
interface vecBase {
|
458
|
-
kind: VecKind;
|
459
|
-
[Symbol.iterator](): Iterator<number>;
|
460
|
-
}
|
461
|
-
type Vec2f = TgpuData<vec2f> & ((x: number, y: number) => vec2f) & ((xy: number) => vec2f) & (() => vec2f);
|
462
|
-
interface vec2f extends vec2, Swizzle2<vec2f, vec3f, vec4f> {
|
463
|
-
/** use to distinguish between vectors of the same size on the type level */
|
464
|
-
kind: 'vec2f';
|
465
|
-
}
|
466
|
-
declare const vec2f: Vec2f;
|
467
|
-
type Vec2i = TgpuData<vec2i> & ((x: number, y: number) => vec2i) & ((xy: number) => vec2i) & (() => vec2i);
|
468
|
-
interface vec2i extends vec2, Swizzle2<vec2i, vec3i, vec4i> {
|
469
|
-
/** use to distinguish between vectors of the same size on the type level */
|
470
|
-
kind: 'vec2i';
|
471
|
-
}
|
472
|
-
declare const vec2i: Vec2i;
|
473
|
-
type Vec2u = TgpuData<vec2u> & ((x: number, y: number) => vec2u) & ((xy: number) => vec2u) & (() => vec2u);
|
474
|
-
interface vec2u extends vec2, Swizzle2<vec2u, vec3u, vec4u> {
|
475
|
-
/** use to distinguish between vectors of the same size on the type level */
|
476
|
-
kind: 'vec2u';
|
477
|
-
}
|
478
|
-
declare const vec2u: Vec2u;
|
479
|
-
type Vec3f = TgpuData<vec3f> & ((x: number, y: number, z: number) => vec3f) & ((xyz: number) => vec3f) & (() => vec3f);
|
480
|
-
interface vec3f extends vec3, Swizzle3<vec2f, vec3f, vec4f> {
|
481
|
-
/** use to distinguish between vectors of the same size on the type level */
|
482
|
-
kind: 'vec3f';
|
483
|
-
}
|
484
|
-
declare const vec3f: Vec3f;
|
485
|
-
type Vec3i = TgpuData<vec3i> & ((x: number, y: number, z: number) => vec3i) & ((xyz: number) => vec3i) & (() => vec3i);
|
486
|
-
interface vec3i extends vec3, Swizzle3<vec2i, vec3i, vec4i> {
|
487
|
-
/** use to distinguish between vectors of the same size on the type level */
|
488
|
-
kind: 'vec3i';
|
489
|
-
}
|
490
|
-
declare const vec3i: Vec3i;
|
491
|
-
type Vec3u = TgpuData<vec3u> & ((x: number, y: number, z: number) => vec3u) & ((xyz: number) => vec3u) & (() => vec3u);
|
492
|
-
interface vec3u extends vec3, Swizzle3<vec2u, vec3u, vec4u> {
|
493
|
-
/** use to distinguish between vectors of the same size on the type level */
|
494
|
-
kind: 'vec3u';
|
495
|
-
}
|
496
|
-
declare const vec3u: Vec3u;
|
497
|
-
type Vec4f = TgpuData<vec4f> & ((x: number, y: number, z: number, w: number) => vec4f) & ((xyzw: number) => vec4f) & (() => vec4f);
|
498
|
-
interface vec4f extends vec4, Swizzle4<vec2f, vec3f, vec4f> {
|
499
|
-
/** use to distinguish between vectors of the same size on the type level */
|
500
|
-
kind: 'vec4f';
|
501
|
-
}
|
502
|
-
declare const vec4f: Vec4f;
|
503
|
-
type Vec4i = TgpuData<vec4i> & ((x: number, y: number, z: number, w: number) => vec4i) & ((xyzw: number) => vec4i) & (() => vec4i);
|
504
|
-
interface vec4i extends vec4, Swizzle4<vec2i, vec3i, vec4i> {
|
505
|
-
/** use to distinguish between vectors of the same size on the type level */
|
506
|
-
kind: 'vec4i';
|
507
|
-
}
|
508
|
-
declare const vec4i: Vec4i;
|
509
|
-
type Vec4u = TgpuData<vec4u> & ((x: number, y: number, z: number, w: number) => vec4u) & ((xyzw: number) => vec4u) & (() => vec4u);
|
510
|
-
interface vec4u extends vec4, Swizzle4<vec2u, vec3u, vec4u> {
|
511
|
-
/** use to distinguish between vectors of the same size on the type level */
|
512
|
-
kind: 'vec4u';
|
513
|
-
}
|
514
|
-
declare const vec4u: Vec4u;
|
515
|
-
|
516
|
-
export { type AnyTgpuData as A, type ResolutionCtx as R, type TgpuAllocatable as T, type VecKind as V, type TgpuNamable as a, type TgpuPlum as b, vec3f as c, vec3i as d, vec3u as e, type TgpuData as f, vec2f as g, vec4f as h, type TgpuPointer as i, vec2i as j, vec2u as k, vec4i as l, vec4u as m, type Vec2f as n, type Vec2i as o, type Vec2u as p, type Vec3f as q, type Vec3i as r, type Vec3u as s, type Vec4f as t, type Vec4i as u, type vecBase as v, type Vec4u as w };
|