Skip to content

Commit 2a46b14

Browse files
committed
Modulify lib/index
1 parent adf4495 commit 2a46b14

File tree

6 files changed

+37
-1551
lines changed

6 files changed

+37
-1551
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* @module glsl-transpiler
55
*/
66

7-
import GLSL from './lib/index.cjs';
7+
import GLSL from './lib/index.js';
88

99

1010
//static bindings

lib/builtins.cjs

Lines changed: 0 additions & 28 deletions
This file was deleted.

lib/builtins.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* A collection of builtins with types
3+
*/
4+
5+
const builtins = {
6+
gl_NumWorkGroups: 'uvec3',
7+
gl_WorkGroupSize: 'uvec3',
8+
gl_WorkGroupID: 'uvec3',
9+
gl_LocalInvocationID: 'uvec3',
10+
gl_GlobalInvocationID: 'uvec3',
11+
gl_LocalInvocationIndex: 'uint',
12+
gl_VertexID: 'int',
13+
gl_InstanceID: 'int',
14+
gl_Position: 'vec4',
15+
gl_PointSize: 'float',
16+
gl_ClipDistance: 'float',
17+
gl_FragCoord: 'vec4',
18+
gl_FragColor: 'vec4',
19+
gl_FrontFacing: 'bool',
20+
gl_PointCoord: 'vec2',
21+
gl_PrimitiveID: 'int',
22+
gl_SampleID: 'int',
23+
gl_SamplePosition: 'vec2',
24+
gl_SampleMaskIn: 'int',
25+
gl_Layer: 'int',
26+
gl_ViewportIndex: 'int',
27+
gl_FragDepth: 'float',
28+
gl_SampleMask: 'int',
29+
}
30+
31+
export default builtins

0 commit comments

Comments
 (0)