@luma.gl/shadertools 9.0.15 → 9.0.17
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/dist/dist.dev.js +787 -195
- package/dist/dist.min.js +79 -79
- package/dist/index.cjs +18 -2854
- package/dist/index.cjs.map +4 -4
- package/dist/lib/shader-module/shader-module.d.ts +22 -13
- package/dist/lib/shader-module/shader-module.d.ts.map +1 -1
- package/dist/lib/shader-module/shader-pass.d.ts +4 -2
- package/dist/lib/shader-module/shader-pass.d.ts.map +1 -1
- package/dist/lib/utils/uniform-types.d.ts +49 -0
- package/dist/lib/utils/uniform-types.d.ts.map +1 -0
- package/dist/lib/utils/uniform-types.js +1 -0
- package/dist/lib/wgsl/get-shader-layout-wgsl.js +5 -5
- package/dist/modules/engine/picking/picking.d.ts +5 -5
- package/dist/modules/engine/picking/picking.d.ts.map +1 -1
- package/dist/modules/engine/picking/picking.js +2 -2
- package/dist/modules/engine/project/project.d.ts +9 -8
- package/dist/modules/engine/project/project.d.ts.map +1 -1
- package/dist/modules/lighting/lights/lighting-uniforms.d.ts +13 -13
- package/dist/modules/lighting/lights/lighting-uniforms.d.ts.map +1 -1
- package/dist/modules/lighting/no-material/dirlight.d.ts +2 -2
- package/dist/modules/lighting/no-material/dirlight.d.ts.map +1 -1
- package/dist/modules/lighting/no-material/dirlight.js +1 -1
- package/dist/modules/lighting/pbr-material/pbr-material.d.ts +14 -13
- package/dist/modules/lighting/pbr-material/pbr-material.d.ts.map +1 -1
- package/dist/modules/lighting/pbr-material/pbr-material.js +0 -11
- package/dist/modules/postprocessing/image-blur-filters/tiltshift.d.ts +2 -2
- package/dist/modules/postprocessing/image-blur-filters/tiltshift.d.ts.map +1 -1
- package/dist/modules/postprocessing/image-blur-filters/triangleblur.d.ts +1 -1
- package/dist/modules/postprocessing/image-blur-filters/triangleblur.d.ts.map +1 -1
- package/dist/modules/postprocessing/image-blur-filters/zoomblur.d.ts +1 -1
- package/dist/modules/postprocessing/image-blur-filters/zoomblur.d.ts.map +1 -1
- package/dist/modules/postprocessing/image-fun-filters/colorhalftone.d.ts +1 -1
- package/dist/modules/postprocessing/image-fun-filters/colorhalftone.d.ts.map +1 -1
- package/dist/modules/postprocessing/image-fun-filters/dotscreen.d.ts +1 -1
- package/dist/modules/postprocessing/image-fun-filters/dotscreen.d.ts.map +1 -1
- package/dist/modules/postprocessing/image-fun-filters/hexagonalpixelate.d.ts +1 -1
- package/dist/modules/postprocessing/image-fun-filters/hexagonalpixelate.d.ts.map +1 -1
- package/dist/modules/postprocessing/image-fun-filters/magnify.d.ts +2 -2
- package/dist/modules/postprocessing/image-fun-filters/magnify.d.ts.map +1 -1
- package/dist/modules/postprocessing/image-warp-filters/bulgepinch.d.ts +1 -1
- package/dist/modules/postprocessing/image-warp-filters/bulgepinch.d.ts.map +1 -1
- package/dist/modules-webgl1/project/project.d.ts +6 -4
- package/dist/modules-webgl1/project/project.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/lib/shader-module/shader-module.ts +24 -12
- package/src/lib/shader-module/shader-pass.ts +7 -4
- package/src/lib/utils/uniform-types.ts +91 -0
- package/src/lib/wgsl/get-shader-layout-wgsl.ts +5 -5
- package/src/modules/engine/picking/picking.ts +9 -9
- package/src/modules/engine/project/project.ts +10 -9
- package/src/modules/lighting/lights/lighting-uniforms.ts +16 -16
- package/src/modules/lighting/no-material/dirlight.ts +3 -3
- package/src/modules/lighting/pbr-material/pbr-material.ts +14 -24
- package/src/modules/postprocessing/image-blur-filters/tiltshift.ts +2 -2
- package/src/modules/postprocessing/image-blur-filters/triangleblur.ts +1 -1
- package/src/modules/postprocessing/image-blur-filters/zoomblur.ts +1 -1
- package/src/modules/postprocessing/image-fun-filters/colorhalftone.ts +1 -1
- package/src/modules/postprocessing/image-fun-filters/dotscreen.ts +1 -1
- package/src/modules/postprocessing/image-fun-filters/hexagonalpixelate.ts +1 -1
- package/src/modules/postprocessing/image-fun-filters/magnify.ts +2 -2
- package/src/modules/postprocessing/image-warp-filters/bulgepinch.ts +1 -1
- package/src/modules-webgl1/project/project.ts +8 -7
- package/dist/libs/wgsl-reflect/wgsl_reflect.module.d.ts +0 -1112
- package/dist/libs/wgsl-reflect/wgsl_reflect.module.d.ts.map +0 -1
- package/dist/libs/wgsl-reflect/wgsl_reflect.module.js +0 -3389
- package/src/libs/wgsl-reflect/wgsl_reflect.module.js +0 -3394
- package/src/libs/wgsl-reflect/wgsl_reflect.module.js.map +0 -1
|
@@ -1,1112 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @class Alias
|
|
3
|
-
* @extends Statement
|
|
4
|
-
* @category AST
|
|
5
|
-
*/
|
|
6
|
-
export class Alias extends Statement {
|
|
7
|
-
constructor(name: any, type: any);
|
|
8
|
-
name: any;
|
|
9
|
-
type: any;
|
|
10
|
-
}
|
|
11
|
-
export class AliasInfo {
|
|
12
|
-
constructor(name: any, type: any);
|
|
13
|
-
name: any;
|
|
14
|
-
type: any;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @class Argument
|
|
18
|
-
* @extends Node
|
|
19
|
-
* @category AST
|
|
20
|
-
*/
|
|
21
|
-
export class Argument extends Node {
|
|
22
|
-
constructor(name: any, type: any, attributes: any);
|
|
23
|
-
name: any;
|
|
24
|
-
type: any;
|
|
25
|
-
attributes: any;
|
|
26
|
-
}
|
|
27
|
-
export class ArrayInfo extends TypeInfo {
|
|
28
|
-
count: number;
|
|
29
|
-
stride: number;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* @class ArrayType
|
|
33
|
-
* @extends Type
|
|
34
|
-
* @category AST
|
|
35
|
-
*/
|
|
36
|
-
export class ArrayType extends Type {
|
|
37
|
-
constructor(name: any, attributes: any, format: any, count: any);
|
|
38
|
-
attributes: any;
|
|
39
|
-
format: any;
|
|
40
|
-
count: any;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* @class Assign
|
|
44
|
-
* @extends Statement
|
|
45
|
-
* @category AST
|
|
46
|
-
*/
|
|
47
|
-
export class Assign extends Statement {
|
|
48
|
-
constructor(operator: any, variable: any, value: any);
|
|
49
|
-
operator: any;
|
|
50
|
-
variable: any;
|
|
51
|
-
value: any;
|
|
52
|
-
}
|
|
53
|
-
export var AssignOperator: any;
|
|
54
|
-
/**
|
|
55
|
-
* @class Attribute
|
|
56
|
-
* @extends Node
|
|
57
|
-
* @category AST
|
|
58
|
-
*/
|
|
59
|
-
export class Attribute extends Node {
|
|
60
|
-
constructor(name: any, value: any);
|
|
61
|
-
name: any;
|
|
62
|
-
value: any;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* @class BinaryOperator
|
|
66
|
-
* @extends Operator
|
|
67
|
-
* @category AST
|
|
68
|
-
* @property {string} operator +, -, *, /, %, ==, !=, <, >, <=, >=, &&, ||
|
|
69
|
-
*/
|
|
70
|
-
export class BinaryOperator extends Operator {
|
|
71
|
-
constructor(operator: any, left: any, right: any);
|
|
72
|
-
operator: any;
|
|
73
|
-
left: any;
|
|
74
|
-
right: any;
|
|
75
|
-
evaluate(context: any): any;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @class BitcastExpr
|
|
79
|
-
* @extends Expression
|
|
80
|
-
* @category AST
|
|
81
|
-
*/
|
|
82
|
-
export class BitcastExpr extends Expression {
|
|
83
|
-
constructor(type: any, value: any);
|
|
84
|
-
type: any;
|
|
85
|
-
value: any;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* @class Break
|
|
89
|
-
* @extends Statement
|
|
90
|
-
* @category AST
|
|
91
|
-
*/
|
|
92
|
-
export class Break extends Statement {
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* @class Call
|
|
96
|
-
* @extends Statement
|
|
97
|
-
* @category AST
|
|
98
|
-
*/
|
|
99
|
-
export class Call extends Statement {
|
|
100
|
-
constructor(name: any, args: any);
|
|
101
|
-
name: any;
|
|
102
|
-
args: any;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @class CallExpr
|
|
106
|
-
* @extends Expression
|
|
107
|
-
* @category AST
|
|
108
|
-
*/
|
|
109
|
-
export class CallExpr extends Expression {
|
|
110
|
-
constructor(name: any, args: any);
|
|
111
|
-
name: any;
|
|
112
|
-
args: any;
|
|
113
|
-
evaluate(context: any): any;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* @class Case
|
|
117
|
-
* @extends SwitchCase
|
|
118
|
-
* @category AST
|
|
119
|
-
*/
|
|
120
|
-
export class Case extends SwitchCase {
|
|
121
|
-
constructor(selector: any, body: any);
|
|
122
|
-
selector: any;
|
|
123
|
-
body: any;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* @class Const
|
|
127
|
-
* @extends Statement
|
|
128
|
-
* @category AST
|
|
129
|
-
*/
|
|
130
|
-
export class Const extends Statement {
|
|
131
|
-
constructor(name: any, type: any, storage: any, access: any, value: any);
|
|
132
|
-
name: any;
|
|
133
|
-
type: any;
|
|
134
|
-
storage: any;
|
|
135
|
-
access: any;
|
|
136
|
-
value: any;
|
|
137
|
-
evaluate(context: any): any;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* @class ConstExpr
|
|
141
|
-
* @extends Expression
|
|
142
|
-
* @category AST
|
|
143
|
-
*/
|
|
144
|
-
export class ConstExpr extends Expression {
|
|
145
|
-
constructor(name: any, initializer: any);
|
|
146
|
-
name: any;
|
|
147
|
-
initializer: any;
|
|
148
|
-
evaluate(context: any): any;
|
|
149
|
-
}
|
|
150
|
-
/**
|
|
151
|
-
* @class Continue
|
|
152
|
-
* @extends Statement
|
|
153
|
-
* @category AST
|
|
154
|
-
*/
|
|
155
|
-
export class Continue extends Statement {
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* @class Continuing
|
|
159
|
-
* @extends Statement
|
|
160
|
-
* @category AST
|
|
161
|
-
*/
|
|
162
|
-
export class Continuing extends Statement {
|
|
163
|
-
constructor(body: any);
|
|
164
|
-
body: any;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* @class CreateExpr
|
|
168
|
-
* @extends Expression
|
|
169
|
-
* @category AST
|
|
170
|
-
*/
|
|
171
|
-
export class CreateExpr extends Expression {
|
|
172
|
-
constructor(type: any, args: any);
|
|
173
|
-
type: any;
|
|
174
|
-
args: any;
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* @class Default
|
|
178
|
-
* @extends SwitchCase
|
|
179
|
-
* @category AST
|
|
180
|
-
*/
|
|
181
|
-
export class Default extends SwitchCase {
|
|
182
|
-
constructor(body: any);
|
|
183
|
-
body: any;
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* @class Discard
|
|
187
|
-
* @extends Statement
|
|
188
|
-
* @category AST
|
|
189
|
-
*/
|
|
190
|
-
export class Discard extends Statement {
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* @class ElseIf
|
|
194
|
-
* @extends Node
|
|
195
|
-
* @category AST
|
|
196
|
-
*/
|
|
197
|
-
export class ElseIf extends Node {
|
|
198
|
-
constructor(condition: any, body: any);
|
|
199
|
-
condition: any;
|
|
200
|
-
body: any;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* @class Enable
|
|
204
|
-
* @extends Statement
|
|
205
|
-
* @category AST
|
|
206
|
-
*/
|
|
207
|
-
export class Enable extends Statement {
|
|
208
|
-
constructor(name: any);
|
|
209
|
-
name: any;
|
|
210
|
-
}
|
|
211
|
-
export class EntryFunctions {
|
|
212
|
-
vertex: any[];
|
|
213
|
-
fragment: any[];
|
|
214
|
-
compute: any[];
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* @class Expression
|
|
218
|
-
* @extends Node
|
|
219
|
-
* @category AST
|
|
220
|
-
*/
|
|
221
|
-
export class Expression extends Node {
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* @class For
|
|
225
|
-
* @extends Statement
|
|
226
|
-
* @category AST
|
|
227
|
-
*/
|
|
228
|
-
export class For extends Statement {
|
|
229
|
-
constructor(init: any, condition: any, increment: any, body: any);
|
|
230
|
-
init: any;
|
|
231
|
-
condition: any;
|
|
232
|
-
increment: any;
|
|
233
|
-
body: any;
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* @class Function
|
|
237
|
-
* @extends Statement
|
|
238
|
-
* @category AST
|
|
239
|
-
*/
|
|
240
|
-
export class Function extends Statement {
|
|
241
|
-
constructor(name: any, args: any, returnType: any, body: any);
|
|
242
|
-
name: any;
|
|
243
|
-
args: any;
|
|
244
|
-
returnType: any;
|
|
245
|
-
body: any;
|
|
246
|
-
}
|
|
247
|
-
export class FunctionInfo {
|
|
248
|
-
constructor(name: any, stage?: any);
|
|
249
|
-
stage: any;
|
|
250
|
-
inputs: any[];
|
|
251
|
-
outputs: any[];
|
|
252
|
-
name: any;
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* @class GroupingExpr
|
|
256
|
-
* @extends Expression
|
|
257
|
-
* @category AST
|
|
258
|
-
*/
|
|
259
|
-
export class GroupingExpr extends Expression {
|
|
260
|
-
constructor(contents: any);
|
|
261
|
-
contents: any;
|
|
262
|
-
evaluate(context: any): any;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* @class If
|
|
266
|
-
* @extends Statement
|
|
267
|
-
* @category AST
|
|
268
|
-
*/
|
|
269
|
-
export class If extends Statement {
|
|
270
|
-
constructor(condition: any, body: any, elseif: any, _else: any);
|
|
271
|
-
condition: any;
|
|
272
|
-
body: any;
|
|
273
|
-
elseif: any;
|
|
274
|
-
else: any;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* @class Increment
|
|
278
|
-
* @extends Statement
|
|
279
|
-
* @category AST
|
|
280
|
-
*/
|
|
281
|
-
export class Increment extends Statement {
|
|
282
|
-
constructor(operator: any, variable: any);
|
|
283
|
-
operator: any;
|
|
284
|
-
variable: any;
|
|
285
|
-
}
|
|
286
|
-
export var IncrementOperator: any;
|
|
287
|
-
export class InputInfo {
|
|
288
|
-
constructor(name: any, type: any, locationType: any, location: any);
|
|
289
|
-
name: any;
|
|
290
|
-
type: any;
|
|
291
|
-
locationType: any;
|
|
292
|
-
location: any;
|
|
293
|
-
interpolation: any;
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* @class Let
|
|
297
|
-
* @extends Statement
|
|
298
|
-
* @category AST
|
|
299
|
-
*/
|
|
300
|
-
export class Let extends Statement {
|
|
301
|
-
constructor(name: any, type: any, storage: any, access: any, value: any);
|
|
302
|
-
name: any;
|
|
303
|
-
type: any;
|
|
304
|
-
storage: any;
|
|
305
|
-
access: any;
|
|
306
|
-
value: any;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* @class LiteralExpr
|
|
310
|
-
* @extends Expression
|
|
311
|
-
* @category AST
|
|
312
|
-
*/
|
|
313
|
-
export class LiteralExpr extends Expression {
|
|
314
|
-
constructor(value: any);
|
|
315
|
-
value: any;
|
|
316
|
-
evaluate(): any;
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* @class Loop
|
|
320
|
-
* @extends Statement
|
|
321
|
-
* @category AST
|
|
322
|
-
*/
|
|
323
|
-
export class Loop extends Statement {
|
|
324
|
-
constructor(body: any, continuing: any);
|
|
325
|
-
body: any;
|
|
326
|
-
continuing: any;
|
|
327
|
-
}
|
|
328
|
-
/**
|
|
329
|
-
* @class Member
|
|
330
|
-
* @extends Node
|
|
331
|
-
* @category AST
|
|
332
|
-
*/
|
|
333
|
-
export class Member extends Node {
|
|
334
|
-
constructor(name: any, type: any, attributes: any);
|
|
335
|
-
name: any;
|
|
336
|
-
type: any;
|
|
337
|
-
attributes: any;
|
|
338
|
-
}
|
|
339
|
-
export class MemberInfo {
|
|
340
|
-
constructor(name: any, type: any, attributes: any);
|
|
341
|
-
name: any;
|
|
342
|
-
type: any;
|
|
343
|
-
attributes: any;
|
|
344
|
-
offset: number;
|
|
345
|
-
size: number;
|
|
346
|
-
get isArray(): any;
|
|
347
|
-
get isStruct(): any;
|
|
348
|
-
get isTemplate(): any;
|
|
349
|
-
get align(): any;
|
|
350
|
-
get members(): any;
|
|
351
|
-
get format(): any;
|
|
352
|
-
get count(): any;
|
|
353
|
-
get stride(): any;
|
|
354
|
-
}
|
|
355
|
-
/**
|
|
356
|
-
* @class Node
|
|
357
|
-
* @category AST
|
|
358
|
-
* Base class for AST nodes parsed from a WGSL shader.
|
|
359
|
-
*/
|
|
360
|
-
export class Node {
|
|
361
|
-
get isAstNode(): boolean;
|
|
362
|
-
get astNodeType(): string;
|
|
363
|
-
evaluate(context: any): void;
|
|
364
|
-
evaluateString(context: any): any;
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* @class Operator
|
|
368
|
-
* @extends Expression
|
|
369
|
-
* @category AST
|
|
370
|
-
*/
|
|
371
|
-
export class Operator extends Expression {
|
|
372
|
-
}
|
|
373
|
-
export class OutputInfo {
|
|
374
|
-
constructor(name: any, type: any, locationType: any, location: any);
|
|
375
|
-
name: any;
|
|
376
|
-
type: any;
|
|
377
|
-
locationType: any;
|
|
378
|
-
location: any;
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* @class Override
|
|
382
|
-
* @extends Statement
|
|
383
|
-
* @category AST
|
|
384
|
-
*/
|
|
385
|
-
export class Override extends Statement {
|
|
386
|
-
constructor(name: any, type: any, value: any);
|
|
387
|
-
name: any;
|
|
388
|
-
type: any;
|
|
389
|
-
value: any;
|
|
390
|
-
}
|
|
391
|
-
export class OverrideInfo {
|
|
392
|
-
constructor(name: any, type: any, attributes: any, id: any);
|
|
393
|
-
name: any;
|
|
394
|
-
type: any;
|
|
395
|
-
attributes: any;
|
|
396
|
-
id: any;
|
|
397
|
-
}
|
|
398
|
-
export class ParseContext {
|
|
399
|
-
constants: Map<any, any>;
|
|
400
|
-
aliases: Map<any, any>;
|
|
401
|
-
structs: Map<any, any>;
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* @class PointerType
|
|
405
|
-
* @extends Type
|
|
406
|
-
* @category AST
|
|
407
|
-
*/
|
|
408
|
-
export class PointerType extends Type {
|
|
409
|
-
constructor(name: any, storage: any, type: any, access: any);
|
|
410
|
-
storage: any;
|
|
411
|
-
type: any;
|
|
412
|
-
access: any;
|
|
413
|
-
}
|
|
414
|
-
export var ResourceType: any;
|
|
415
|
-
/**
|
|
416
|
-
* @class Return
|
|
417
|
-
* @extends Statement
|
|
418
|
-
* @category AST
|
|
419
|
-
*/
|
|
420
|
-
export class Return extends Statement {
|
|
421
|
-
constructor(value: any);
|
|
422
|
-
value: any;
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* @class SamplerType
|
|
426
|
-
* @extends Type
|
|
427
|
-
* @category AST
|
|
428
|
-
*/
|
|
429
|
-
export class SamplerType extends Type {
|
|
430
|
-
constructor(name: any, format: any, access: any);
|
|
431
|
-
format: any;
|
|
432
|
-
access: any;
|
|
433
|
-
}
|
|
434
|
-
/**
|
|
435
|
-
* @class Statement
|
|
436
|
-
* @extends Node
|
|
437
|
-
* @category AST
|
|
438
|
-
*/
|
|
439
|
-
export class Statement extends Node {
|
|
440
|
-
}
|
|
441
|
-
/**
|
|
442
|
-
* @class StaticAssert
|
|
443
|
-
* @extends Statement
|
|
444
|
-
* @category AST
|
|
445
|
-
*/
|
|
446
|
-
export class StaticAssert extends Statement {
|
|
447
|
-
constructor(expression: any);
|
|
448
|
-
expression: any;
|
|
449
|
-
}
|
|
450
|
-
/**
|
|
451
|
-
* @class StringExpr
|
|
452
|
-
* @extends Expression
|
|
453
|
-
* @category AST
|
|
454
|
-
*/
|
|
455
|
-
export class StringExpr extends Expression {
|
|
456
|
-
constructor(value: any);
|
|
457
|
-
value: any;
|
|
458
|
-
toString(): any;
|
|
459
|
-
evaluateString(): any;
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
* @class StructType
|
|
463
|
-
* @extends Type
|
|
464
|
-
* @category AST
|
|
465
|
-
*/
|
|
466
|
-
export class Struct extends Type {
|
|
467
|
-
constructor(name: any, members: any);
|
|
468
|
-
members: any;
|
|
469
|
-
getMemberIndex(name: any): number;
|
|
470
|
-
}
|
|
471
|
-
export class StructInfo extends TypeInfo {
|
|
472
|
-
members: any[];
|
|
473
|
-
align: number;
|
|
474
|
-
}
|
|
475
|
-
/**
|
|
476
|
-
* @class Switch
|
|
477
|
-
* @extends Statement
|
|
478
|
-
* @category AST
|
|
479
|
-
*/
|
|
480
|
-
export class Switch extends Statement {
|
|
481
|
-
constructor(condition: any, body: any);
|
|
482
|
-
condition: any;
|
|
483
|
-
body: any;
|
|
484
|
-
}
|
|
485
|
-
/**
|
|
486
|
-
* @class SwitchCase
|
|
487
|
-
* @extends Node
|
|
488
|
-
* @category AST
|
|
489
|
-
*/
|
|
490
|
-
export class SwitchCase extends Node {
|
|
491
|
-
}
|
|
492
|
-
export class TemplateInfo extends TypeInfo {
|
|
493
|
-
constructor(name: any, format: any, attributes: any, access: any);
|
|
494
|
-
format: any;
|
|
495
|
-
access: any;
|
|
496
|
-
}
|
|
497
|
-
/**
|
|
498
|
-
* @class TemplateType
|
|
499
|
-
* @extends Type
|
|
500
|
-
* @category AST
|
|
501
|
-
*/
|
|
502
|
-
export class TemplateType extends Type {
|
|
503
|
-
constructor(name: any, format: any, access: any);
|
|
504
|
-
format: any;
|
|
505
|
-
access: any;
|
|
506
|
-
}
|
|
507
|
-
export class Token {
|
|
508
|
-
constructor(type: any, lexeme: any, line: any);
|
|
509
|
-
type: any;
|
|
510
|
-
lexeme: any;
|
|
511
|
-
line: any;
|
|
512
|
-
toString(): any;
|
|
513
|
-
isTemplateType(): boolean;
|
|
514
|
-
isArrayType(): boolean;
|
|
515
|
-
isArrayOrTemplateType(): boolean;
|
|
516
|
-
}
|
|
517
|
-
export var TokenClass: any;
|
|
518
|
-
export class TokenType {
|
|
519
|
-
constructor(name: any, type: any, rule: any);
|
|
520
|
-
name: any;
|
|
521
|
-
type: any;
|
|
522
|
-
rule: any;
|
|
523
|
-
toString(): any;
|
|
524
|
-
}
|
|
525
|
-
export class TokenTypes {
|
|
526
|
-
}
|
|
527
|
-
export namespace TokenTypes {
|
|
528
|
-
let none: TokenType;
|
|
529
|
-
let eof: TokenType;
|
|
530
|
-
namespace reserved {
|
|
531
|
-
export let asm: TokenType;
|
|
532
|
-
export let bf16: TokenType;
|
|
533
|
-
let _do: TokenType;
|
|
534
|
-
export { _do as do };
|
|
535
|
-
let _enum: TokenType;
|
|
536
|
-
export { _enum as enum };
|
|
537
|
-
export let f16: TokenType;
|
|
538
|
-
export let f64: TokenType;
|
|
539
|
-
export let handle: TokenType;
|
|
540
|
-
export let i8: TokenType;
|
|
541
|
-
export let i16: TokenType;
|
|
542
|
-
export let i64: TokenType;
|
|
543
|
-
export let mat: TokenType;
|
|
544
|
-
export let premerge: TokenType;
|
|
545
|
-
export let regardless: TokenType;
|
|
546
|
-
export let typedef: TokenType;
|
|
547
|
-
export let u8: TokenType;
|
|
548
|
-
export let u16: TokenType;
|
|
549
|
-
export let u64: TokenType;
|
|
550
|
-
export let unless: TokenType;
|
|
551
|
-
export let using: TokenType;
|
|
552
|
-
export let vec: TokenType;
|
|
553
|
-
let _void: TokenType;
|
|
554
|
-
export { _void as void };
|
|
555
|
-
}
|
|
556
|
-
namespace keywords {
|
|
557
|
-
export let array: TokenType;
|
|
558
|
-
export let atomic: TokenType;
|
|
559
|
-
export let bool: TokenType;
|
|
560
|
-
export let f32: TokenType;
|
|
561
|
-
export let i32: TokenType;
|
|
562
|
-
export let mat2x2: TokenType;
|
|
563
|
-
export let mat2x3: TokenType;
|
|
564
|
-
export let mat2x4: TokenType;
|
|
565
|
-
export let mat3x2: TokenType;
|
|
566
|
-
export let mat3x3: TokenType;
|
|
567
|
-
export let mat3x4: TokenType;
|
|
568
|
-
export let mat4x2: TokenType;
|
|
569
|
-
export let mat4x3: TokenType;
|
|
570
|
-
export let mat4x4: TokenType;
|
|
571
|
-
export let ptr: TokenType;
|
|
572
|
-
export let sampler: TokenType;
|
|
573
|
-
export let sampler_comparison: TokenType;
|
|
574
|
-
export let struct: TokenType;
|
|
575
|
-
export let texture_1d: TokenType;
|
|
576
|
-
export let texture_2d: TokenType;
|
|
577
|
-
export let texture_2d_array: TokenType;
|
|
578
|
-
export let texture_3d: TokenType;
|
|
579
|
-
export let texture_cube: TokenType;
|
|
580
|
-
export let texture_cube_array: TokenType;
|
|
581
|
-
export let texture_multisampled_2d: TokenType;
|
|
582
|
-
export let texture_storage_1d: TokenType;
|
|
583
|
-
export let texture_storage_2d: TokenType;
|
|
584
|
-
export let texture_storage_2d_array: TokenType;
|
|
585
|
-
export let texture_storage_3d: TokenType;
|
|
586
|
-
export let texture_depth_2d: TokenType;
|
|
587
|
-
export let texture_depth_2d_array: TokenType;
|
|
588
|
-
export let texture_depth_cube: TokenType;
|
|
589
|
-
export let texture_depth_cube_array: TokenType;
|
|
590
|
-
export let texture_depth_multisampled_2d: TokenType;
|
|
591
|
-
export let texture_external: TokenType;
|
|
592
|
-
export let u32: TokenType;
|
|
593
|
-
export let vec2: TokenType;
|
|
594
|
-
export let vec3: TokenType;
|
|
595
|
-
export let vec4: TokenType;
|
|
596
|
-
export let bitcast: TokenType;
|
|
597
|
-
export let block: TokenType;
|
|
598
|
-
let _break: TokenType;
|
|
599
|
-
export { _break as break };
|
|
600
|
-
let _case: TokenType;
|
|
601
|
-
export { _case as case };
|
|
602
|
-
let _continue: TokenType;
|
|
603
|
-
export { _continue as continue };
|
|
604
|
-
export let continuing: TokenType;
|
|
605
|
-
let _default: TokenType;
|
|
606
|
-
export { _default as default };
|
|
607
|
-
export let discard: TokenType;
|
|
608
|
-
let _else: TokenType;
|
|
609
|
-
export { _else as else };
|
|
610
|
-
export let enable: TokenType;
|
|
611
|
-
export let fallthrough: TokenType;
|
|
612
|
-
let _false: TokenType;
|
|
613
|
-
export { _false as false };
|
|
614
|
-
export let fn: TokenType;
|
|
615
|
-
let _for: TokenType;
|
|
616
|
-
export { _for as for };
|
|
617
|
-
let _function: TokenType;
|
|
618
|
-
export { _function as function };
|
|
619
|
-
let _if: TokenType;
|
|
620
|
-
export { _if as if };
|
|
621
|
-
let _let: TokenType;
|
|
622
|
-
export { _let as let };
|
|
623
|
-
let _const: TokenType;
|
|
624
|
-
export { _const as const };
|
|
625
|
-
export let loop: TokenType;
|
|
626
|
-
let _while: TokenType;
|
|
627
|
-
export { _while as while };
|
|
628
|
-
let _private: TokenType;
|
|
629
|
-
export { _private as private };
|
|
630
|
-
export let read: TokenType;
|
|
631
|
-
export let read_write: TokenType;
|
|
632
|
-
let _return: TokenType;
|
|
633
|
-
export { _return as return };
|
|
634
|
-
export let storage: TokenType;
|
|
635
|
-
let _switch: TokenType;
|
|
636
|
-
export { _switch as switch };
|
|
637
|
-
let _true: TokenType;
|
|
638
|
-
export { _true as true };
|
|
639
|
-
export let alias: TokenType;
|
|
640
|
-
export let type: TokenType;
|
|
641
|
-
export let uniform: TokenType;
|
|
642
|
-
let _var: TokenType;
|
|
643
|
-
export { _var as var };
|
|
644
|
-
export let override: TokenType;
|
|
645
|
-
export let workgroup: TokenType;
|
|
646
|
-
export let write: TokenType;
|
|
647
|
-
export let r8unorm: TokenType;
|
|
648
|
-
export let r8snorm: TokenType;
|
|
649
|
-
export let r8uint: TokenType;
|
|
650
|
-
export let r8sint: TokenType;
|
|
651
|
-
export let r16uint: TokenType;
|
|
652
|
-
export let r16sint: TokenType;
|
|
653
|
-
export let r16float: TokenType;
|
|
654
|
-
export let rg8unorm: TokenType;
|
|
655
|
-
export let rg8snorm: TokenType;
|
|
656
|
-
export let rg8uint: TokenType;
|
|
657
|
-
export let rg8sint: TokenType;
|
|
658
|
-
export let r32uint: TokenType;
|
|
659
|
-
export let r32sint: TokenType;
|
|
660
|
-
export let r32float: TokenType;
|
|
661
|
-
export let rg16uint: TokenType;
|
|
662
|
-
export let rg16sint: TokenType;
|
|
663
|
-
export let rg16float: TokenType;
|
|
664
|
-
export let rgba8unorm: TokenType;
|
|
665
|
-
export let rgba8unorm_srgb: TokenType;
|
|
666
|
-
export let rgba8snorm: TokenType;
|
|
667
|
-
export let rgba8uint: TokenType;
|
|
668
|
-
export let rgba8sint: TokenType;
|
|
669
|
-
export let bgra8unorm: TokenType;
|
|
670
|
-
export let bgra8unorm_srgb: TokenType;
|
|
671
|
-
export let rgb10a2unorm: TokenType;
|
|
672
|
-
export let rg11b10float: TokenType;
|
|
673
|
-
export let rg32uint: TokenType;
|
|
674
|
-
export let rg32sint: TokenType;
|
|
675
|
-
export let rg32float: TokenType;
|
|
676
|
-
export let rgba16uint: TokenType;
|
|
677
|
-
export let rgba16sint: TokenType;
|
|
678
|
-
export let rgba16float: TokenType;
|
|
679
|
-
export let rgba32uint: TokenType;
|
|
680
|
-
export let rgba32sint: TokenType;
|
|
681
|
-
export let rgba32float: TokenType;
|
|
682
|
-
export let static_assert: TokenType;
|
|
683
|
-
}
|
|
684
|
-
namespace tokens {
|
|
685
|
-
let decimal_float_literal: TokenType;
|
|
686
|
-
let hex_float_literal: TokenType;
|
|
687
|
-
let int_literal: TokenType;
|
|
688
|
-
let uint_literal: TokenType;
|
|
689
|
-
let ident: TokenType;
|
|
690
|
-
let and: TokenType;
|
|
691
|
-
let and_and: TokenType;
|
|
692
|
-
let arrow: TokenType;
|
|
693
|
-
let attr: TokenType;
|
|
694
|
-
let attr_left: TokenType;
|
|
695
|
-
let attr_right: TokenType;
|
|
696
|
-
let forward_slash: TokenType;
|
|
697
|
-
let bang: TokenType;
|
|
698
|
-
let bracket_left: TokenType;
|
|
699
|
-
let bracket_right: TokenType;
|
|
700
|
-
let brace_left: TokenType;
|
|
701
|
-
let brace_right: TokenType;
|
|
702
|
-
let colon: TokenType;
|
|
703
|
-
let comma: TokenType;
|
|
704
|
-
let equal: TokenType;
|
|
705
|
-
let equal_equal: TokenType;
|
|
706
|
-
let not_equal: TokenType;
|
|
707
|
-
let greater_than: TokenType;
|
|
708
|
-
let greater_than_equal: TokenType;
|
|
709
|
-
let shift_right: TokenType;
|
|
710
|
-
let less_than: TokenType;
|
|
711
|
-
let less_than_equal: TokenType;
|
|
712
|
-
let shift_left: TokenType;
|
|
713
|
-
let modulo: TokenType;
|
|
714
|
-
let minus: TokenType;
|
|
715
|
-
let minus_minus: TokenType;
|
|
716
|
-
let period: TokenType;
|
|
717
|
-
let plus: TokenType;
|
|
718
|
-
let plus_plus: TokenType;
|
|
719
|
-
let or: TokenType;
|
|
720
|
-
let or_or: TokenType;
|
|
721
|
-
let paren_left: TokenType;
|
|
722
|
-
let paren_right: TokenType;
|
|
723
|
-
let semicolon: TokenType;
|
|
724
|
-
let star: TokenType;
|
|
725
|
-
let tilde: TokenType;
|
|
726
|
-
let underscore: TokenType;
|
|
727
|
-
let xor: TokenType;
|
|
728
|
-
let plus_equal: TokenType;
|
|
729
|
-
let minus_equal: TokenType;
|
|
730
|
-
let times_equal: TokenType;
|
|
731
|
-
let division_equal: TokenType;
|
|
732
|
-
let modulo_equal: TokenType;
|
|
733
|
-
let and_equal: TokenType;
|
|
734
|
-
let or_equal: TokenType;
|
|
735
|
-
let xor_equal: TokenType;
|
|
736
|
-
let shift_right_equal: TokenType;
|
|
737
|
-
let shift_left_equal: TokenType;
|
|
738
|
-
}
|
|
739
|
-
let storage_class: TokenType[];
|
|
740
|
-
let access_mode: TokenType[];
|
|
741
|
-
let sampler_type: TokenType[];
|
|
742
|
-
let sampled_texture_type: TokenType[];
|
|
743
|
-
let multisampled_texture_type: TokenType[];
|
|
744
|
-
let storage_texture_type: TokenType[];
|
|
745
|
-
let depth_texture_type: TokenType[];
|
|
746
|
-
let texture_external_type: TokenType[];
|
|
747
|
-
let any_texture_type: TokenType[];
|
|
748
|
-
let texel_format: TokenType[];
|
|
749
|
-
let const_literal: TokenType[];
|
|
750
|
-
let literal_or_ident: TokenType[];
|
|
751
|
-
let element_count_expression: TokenType[];
|
|
752
|
-
let template_types: TokenType[];
|
|
753
|
-
let attribute_name: TokenType[];
|
|
754
|
-
let assignment_operators: TokenType[];
|
|
755
|
-
let increment_operators: TokenType[];
|
|
756
|
-
}
|
|
757
|
-
/**
|
|
758
|
-
* @class Type
|
|
759
|
-
* @extends Statement
|
|
760
|
-
* @category AST
|
|
761
|
-
*/
|
|
762
|
-
export class Type extends Statement {
|
|
763
|
-
constructor(name: any);
|
|
764
|
-
name: any;
|
|
765
|
-
get isStruct(): boolean;
|
|
766
|
-
get isArray(): boolean;
|
|
767
|
-
}
|
|
768
|
-
/**
|
|
769
|
-
* @author Brendan Duncan / https://github.com/brendan-duncan
|
|
770
|
-
*/
|
|
771
|
-
export class TypeInfo {
|
|
772
|
-
constructor(name: any, attributes: any);
|
|
773
|
-
name: any;
|
|
774
|
-
attributes: any;
|
|
775
|
-
size: number;
|
|
776
|
-
get isArray(): boolean;
|
|
777
|
-
get isStruct(): boolean;
|
|
778
|
-
get isTemplate(): boolean;
|
|
779
|
-
}
|
|
780
|
-
/**
|
|
781
|
-
* @class TypecastExpr
|
|
782
|
-
* @extends Expression
|
|
783
|
-
* @category AST
|
|
784
|
-
*/
|
|
785
|
-
export class TypecastExpr extends Expression {
|
|
786
|
-
constructor(type: any, args: any);
|
|
787
|
-
type: any;
|
|
788
|
-
args: any;
|
|
789
|
-
evaluate(context: any): any;
|
|
790
|
-
}
|
|
791
|
-
/**
|
|
792
|
-
* @class UnaryOperator
|
|
793
|
-
* @extends Operator
|
|
794
|
-
* @category AST
|
|
795
|
-
* @property {string} operator +, -, !, ~
|
|
796
|
-
*/
|
|
797
|
-
export class UnaryOperator extends Operator {
|
|
798
|
-
constructor(operator: any, right: any);
|
|
799
|
-
operator: any;
|
|
800
|
-
right: any;
|
|
801
|
-
evaluate(context: any): any;
|
|
802
|
-
}
|
|
803
|
-
/**
|
|
804
|
-
* @class Var
|
|
805
|
-
* @extends Statement
|
|
806
|
-
* @category AST
|
|
807
|
-
*/
|
|
808
|
-
export class Var extends Statement {
|
|
809
|
-
constructor(name: any, type: any, storage: any, access: any, value: any);
|
|
810
|
-
name: any;
|
|
811
|
-
type: any;
|
|
812
|
-
storage: any;
|
|
813
|
-
access: any;
|
|
814
|
-
value: any;
|
|
815
|
-
}
|
|
816
|
-
/**
|
|
817
|
-
* @class VariableExpr
|
|
818
|
-
* @extends Expression
|
|
819
|
-
* @category AST
|
|
820
|
-
*/
|
|
821
|
-
export class VariableExpr extends Expression {
|
|
822
|
-
constructor(name: any);
|
|
823
|
-
name: any;
|
|
824
|
-
}
|
|
825
|
-
export class VariableInfo {
|
|
826
|
-
constructor(name: any, type: any, group: any, binding: any, attributes: any, resourceType: any, access: any);
|
|
827
|
-
name: any;
|
|
828
|
-
type: any;
|
|
829
|
-
group: any;
|
|
830
|
-
binding: any;
|
|
831
|
-
attributes: any;
|
|
832
|
-
resourceType: any;
|
|
833
|
-
access: any;
|
|
834
|
-
get isArray(): any;
|
|
835
|
-
get isStruct(): any;
|
|
836
|
-
get isTemplate(): any;
|
|
837
|
-
get size(): any;
|
|
838
|
-
get align(): any;
|
|
839
|
-
get members(): any;
|
|
840
|
-
get format(): any;
|
|
841
|
-
get count(): any;
|
|
842
|
-
get stride(): any;
|
|
843
|
-
}
|
|
844
|
-
/**
|
|
845
|
-
* @author Brendan Duncan / https://github.com/brendan-duncan
|
|
846
|
-
*/
|
|
847
|
-
export class WgslParser {
|
|
848
|
-
_tokens: any[];
|
|
849
|
-
_current: number;
|
|
850
|
-
_context: ParseContext;
|
|
851
|
-
parse(tokensOrCode: any): (Function | Var | Override | Let | Const | Enable | Alias | Struct)[];
|
|
852
|
-
_initialize(tokensOrCode: any): void;
|
|
853
|
-
_error(token: any, message: any): {
|
|
854
|
-
token: any;
|
|
855
|
-
message: any;
|
|
856
|
-
toString: () => string;
|
|
857
|
-
};
|
|
858
|
-
_isAtEnd(): boolean;
|
|
859
|
-
_match(types: any): boolean;
|
|
860
|
-
_consume(types: any, message: any): any;
|
|
861
|
-
_check(types: any): boolean;
|
|
862
|
-
_advance(): any;
|
|
863
|
-
_peek(): any;
|
|
864
|
-
_previous(): any;
|
|
865
|
-
_global_decl_or_directive(): Function | Var | Override | Let | Const | Enable | Alias | Struct;
|
|
866
|
-
_function_decl(): Function;
|
|
867
|
-
_compound_statement(): any;
|
|
868
|
-
_statement(): any;
|
|
869
|
-
_static_assert_statement(): StaticAssert;
|
|
870
|
-
_while_statement(): any;
|
|
871
|
-
_continuing_statement(): any;
|
|
872
|
-
_for_statement(): any;
|
|
873
|
-
_for_init(): Var | Let | Const | Assign | Call;
|
|
874
|
-
_for_increment(): Increment | Assign | Call;
|
|
875
|
-
_variable_statement(): Var | Let | Const;
|
|
876
|
-
_increment_decrement_statement(): Increment;
|
|
877
|
-
_assignment_statement(): Assign;
|
|
878
|
-
_func_call_statement(): Call;
|
|
879
|
-
_loop_statement(): any;
|
|
880
|
-
_switch_statement(): any;
|
|
881
|
-
_switch_body(): any;
|
|
882
|
-
_case_selectors(): any[];
|
|
883
|
-
_case_body(): any;
|
|
884
|
-
_if_statement(): any;
|
|
885
|
-
_match_elseif(): boolean;
|
|
886
|
-
_elseif_statement(elseif?: any[]): any[];
|
|
887
|
-
_return_statement(): Return;
|
|
888
|
-
_short_circuit_or_expression(): any;
|
|
889
|
-
_short_circuit_and_expr(): any;
|
|
890
|
-
_inclusive_or_expression(): any;
|
|
891
|
-
_exclusive_or_expression(): any;
|
|
892
|
-
_and_expression(): any;
|
|
893
|
-
_equality_expression(): any;
|
|
894
|
-
_relational_expression(): any;
|
|
895
|
-
_shift_expression(): any;
|
|
896
|
-
_additive_expression(): any;
|
|
897
|
-
_multiplicative_expression(): any;
|
|
898
|
-
_unary_expression(): any;
|
|
899
|
-
_singular_expression(): any;
|
|
900
|
-
_postfix_expression(): any;
|
|
901
|
-
_getStruct(name: any): any;
|
|
902
|
-
_primary_expression(): any;
|
|
903
|
-
_argument_expression_list(): any;
|
|
904
|
-
_optional_paren_expression(): GroupingExpr;
|
|
905
|
-
_paren_expression(): any;
|
|
906
|
-
_struct_decl(): Struct;
|
|
907
|
-
_global_variable_decl(): Var;
|
|
908
|
-
_override_variable_decl(): Override;
|
|
909
|
-
_global_const_decl(): Const;
|
|
910
|
-
_global_let_decl(): Let;
|
|
911
|
-
_const_expression(): any;
|
|
912
|
-
_variable_decl(): Var;
|
|
913
|
-
_override_decl(): Override;
|
|
914
|
-
_enable_directive(): Enable;
|
|
915
|
-
_type_alias(): Alias;
|
|
916
|
-
_type_decl(): any;
|
|
917
|
-
_texture_sampler_types(): any;
|
|
918
|
-
_attribute(): Attribute[];
|
|
919
|
-
}
|
|
920
|
-
export class WgslReflect {
|
|
921
|
-
constructor(code: any);
|
|
922
|
-
uniforms: any[];
|
|
923
|
-
storage: any[];
|
|
924
|
-
textures: any[];
|
|
925
|
-
samplers: any[];
|
|
926
|
-
aliases: any[];
|
|
927
|
-
overrides: any[];
|
|
928
|
-
structs: any[];
|
|
929
|
-
entry: EntryFunctions;
|
|
930
|
-
_types: Map<any, any>;
|
|
931
|
-
_isStorageTexture(type: any): boolean;
|
|
932
|
-
update(code: any): void;
|
|
933
|
-
getBindGroups(): any[];
|
|
934
|
-
_getOutputs(type: any, outputs?: any): any;
|
|
935
|
-
_getStructOutputs(struct: any, outputs: any): void;
|
|
936
|
-
_getOutputInfo(type: any): OutputInfo;
|
|
937
|
-
_getInputs(args: any, inputs?: any): any;
|
|
938
|
-
_getStructInputs(struct: any, inputs: any): void;
|
|
939
|
-
_getInputInfo(node: any): InputInfo;
|
|
940
|
-
_parseString(s: any): any;
|
|
941
|
-
_parseInt(s: any): any;
|
|
942
|
-
_getAlias(name: any): any;
|
|
943
|
-
_getAliasInfo(node: any): AliasInfo;
|
|
944
|
-
_getTypeInfo(type: any, attributes: any): any;
|
|
945
|
-
_updateTypeInfo(type: any): void;
|
|
946
|
-
_updateStructInfo(struct: any): void;
|
|
947
|
-
_getTypeSize(type: any): _TypeSize;
|
|
948
|
-
_isUniformVar(node: any): boolean;
|
|
949
|
-
_isStorageVar(node: any): boolean;
|
|
950
|
-
_isTextureVar(node: any): boolean;
|
|
951
|
-
_isSamplerVar(node: any): boolean;
|
|
952
|
-
_getAttribute(node: any, name: any): any;
|
|
953
|
-
_getAttributeNum(attributes: any, name: any, defaultValue: any): any;
|
|
954
|
-
_roundUp(k: any, n: any): number;
|
|
955
|
-
}
|
|
956
|
-
export namespace WgslReflect {
|
|
957
|
-
namespace _typeInfo {
|
|
958
|
-
export namespace f16_1 {
|
|
959
|
-
let align: number;
|
|
960
|
-
let size: number;
|
|
961
|
-
}
|
|
962
|
-
export { f16_1 as f16 };
|
|
963
|
-
export namespace i32_1 {
|
|
964
|
-
let align_1: number;
|
|
965
|
-
export { align_1 as align };
|
|
966
|
-
let size_1: number;
|
|
967
|
-
export { size_1 as size };
|
|
968
|
-
}
|
|
969
|
-
export { i32_1 as i32 };
|
|
970
|
-
export namespace u32_1 {
|
|
971
|
-
let align_2: number;
|
|
972
|
-
export { align_2 as align };
|
|
973
|
-
let size_2: number;
|
|
974
|
-
export { size_2 as size };
|
|
975
|
-
}
|
|
976
|
-
export { u32_1 as u32 };
|
|
977
|
-
export namespace f32_1 {
|
|
978
|
-
let align_3: number;
|
|
979
|
-
export { align_3 as align };
|
|
980
|
-
let size_3: number;
|
|
981
|
-
export { size_3 as size };
|
|
982
|
-
}
|
|
983
|
-
export { f32_1 as f32 };
|
|
984
|
-
export namespace atomic_1 {
|
|
985
|
-
let align_4: number;
|
|
986
|
-
export { align_4 as align };
|
|
987
|
-
let size_4: number;
|
|
988
|
-
export { size_4 as size };
|
|
989
|
-
}
|
|
990
|
-
export { atomic_1 as atomic };
|
|
991
|
-
export namespace vec2_1 {
|
|
992
|
-
let align_5: number;
|
|
993
|
-
export { align_5 as align };
|
|
994
|
-
let size_5: number;
|
|
995
|
-
export { size_5 as size };
|
|
996
|
-
}
|
|
997
|
-
export { vec2_1 as vec2 };
|
|
998
|
-
export namespace vec3_1 {
|
|
999
|
-
let align_6: number;
|
|
1000
|
-
export { align_6 as align };
|
|
1001
|
-
let size_6: number;
|
|
1002
|
-
export { size_6 as size };
|
|
1003
|
-
}
|
|
1004
|
-
export { vec3_1 as vec3 };
|
|
1005
|
-
export namespace vec4_1 {
|
|
1006
|
-
let align_7: number;
|
|
1007
|
-
export { align_7 as align };
|
|
1008
|
-
let size_7: number;
|
|
1009
|
-
export { size_7 as size };
|
|
1010
|
-
}
|
|
1011
|
-
export { vec4_1 as vec4 };
|
|
1012
|
-
export namespace mat2x2_1 {
|
|
1013
|
-
let align_8: number;
|
|
1014
|
-
export { align_8 as align };
|
|
1015
|
-
let size_8: number;
|
|
1016
|
-
export { size_8 as size };
|
|
1017
|
-
}
|
|
1018
|
-
export { mat2x2_1 as mat2x2 };
|
|
1019
|
-
export namespace mat3x2_1 {
|
|
1020
|
-
let align_9: number;
|
|
1021
|
-
export { align_9 as align };
|
|
1022
|
-
let size_9: number;
|
|
1023
|
-
export { size_9 as size };
|
|
1024
|
-
}
|
|
1025
|
-
export { mat3x2_1 as mat3x2 };
|
|
1026
|
-
export namespace mat4x2_1 {
|
|
1027
|
-
let align_10: number;
|
|
1028
|
-
export { align_10 as align };
|
|
1029
|
-
let size_10: number;
|
|
1030
|
-
export { size_10 as size };
|
|
1031
|
-
}
|
|
1032
|
-
export { mat4x2_1 as mat4x2 };
|
|
1033
|
-
export namespace mat2x3_1 {
|
|
1034
|
-
let align_11: number;
|
|
1035
|
-
export { align_11 as align };
|
|
1036
|
-
let size_11: number;
|
|
1037
|
-
export { size_11 as size };
|
|
1038
|
-
}
|
|
1039
|
-
export { mat2x3_1 as mat2x3 };
|
|
1040
|
-
export namespace mat3x3_1 {
|
|
1041
|
-
let align_12: number;
|
|
1042
|
-
export { align_12 as align };
|
|
1043
|
-
let size_12: number;
|
|
1044
|
-
export { size_12 as size };
|
|
1045
|
-
}
|
|
1046
|
-
export { mat3x3_1 as mat3x3 };
|
|
1047
|
-
export namespace mat4x3_1 {
|
|
1048
|
-
let align_13: number;
|
|
1049
|
-
export { align_13 as align };
|
|
1050
|
-
let size_13: number;
|
|
1051
|
-
export { size_13 as size };
|
|
1052
|
-
}
|
|
1053
|
-
export { mat4x3_1 as mat4x3 };
|
|
1054
|
-
export namespace mat2x4_1 {
|
|
1055
|
-
let align_14: number;
|
|
1056
|
-
export { align_14 as align };
|
|
1057
|
-
let size_14: number;
|
|
1058
|
-
export { size_14 as size };
|
|
1059
|
-
}
|
|
1060
|
-
export { mat2x4_1 as mat2x4 };
|
|
1061
|
-
export namespace mat3x4_1 {
|
|
1062
|
-
let align_15: number;
|
|
1063
|
-
export { align_15 as align };
|
|
1064
|
-
let size_15: number;
|
|
1065
|
-
export { size_15 as size };
|
|
1066
|
-
}
|
|
1067
|
-
export { mat3x4_1 as mat3x4 };
|
|
1068
|
-
export namespace mat4x4_1 {
|
|
1069
|
-
let align_16: number;
|
|
1070
|
-
export { align_16 as align };
|
|
1071
|
-
let size_16: number;
|
|
1072
|
-
export { size_16 as size };
|
|
1073
|
-
}
|
|
1074
|
-
export { mat4x4_1 as mat4x4 };
|
|
1075
|
-
}
|
|
1076
|
-
let _textureTypes: any[];
|
|
1077
|
-
let _samplerTypes: any[];
|
|
1078
|
-
}
|
|
1079
|
-
export class WgslScanner {
|
|
1080
|
-
constructor(source: any);
|
|
1081
|
-
_tokens: any[];
|
|
1082
|
-
_start: number;
|
|
1083
|
-
_current: number;
|
|
1084
|
-
_line: number;
|
|
1085
|
-
_source: any;
|
|
1086
|
-
scanTokens(): any[];
|
|
1087
|
-
scanToken(): boolean;
|
|
1088
|
-
_findType(lexeme: any): any;
|
|
1089
|
-
_match(lexeme: any, rule: any): boolean;
|
|
1090
|
-
_isAtEnd(): boolean;
|
|
1091
|
-
_isWhitespace(c: any): boolean;
|
|
1092
|
-
_advance(amount?: number): any;
|
|
1093
|
-
_peekAhead(offset?: number): any;
|
|
1094
|
-
_addToken(type: any): void;
|
|
1095
|
-
}
|
|
1096
|
-
/**
|
|
1097
|
-
* @class While
|
|
1098
|
-
* @extends Statement
|
|
1099
|
-
* @category AST
|
|
1100
|
-
*/
|
|
1101
|
-
export class While extends Statement {
|
|
1102
|
-
constructor(condition: any, body: any);
|
|
1103
|
-
condition: any;
|
|
1104
|
-
body: any;
|
|
1105
|
-
}
|
|
1106
|
-
declare class _TypeSize {
|
|
1107
|
-
constructor(align: any, size: any);
|
|
1108
|
-
align: any;
|
|
1109
|
-
size: any;
|
|
1110
|
-
}
|
|
1111
|
-
export {};
|
|
1112
|
-
//# sourceMappingURL=wgsl_reflect.module.d.ts.map
|