File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change 13
13
"editor.formatOnSave" : true ,
14
14
"editor.formatOnPaste" : true ,
15
15
"editor.formatOnSaveMode" : " file" ,
16
- "mayank1513.trello-kanban.Workspace.filePath" : " .tkb"
16
+ "mayank1513.trello-kanban.Workspace.filePath" : " .tkb" ,
17
+ "[glsl]" : {
18
+ "editor.defaultFormatter" : " raczzalan.webgl-glsl-editor"
19
+ }
17
20
}
Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ precision mediump float;
4
4
in vec2 p;
5
5
6
6
void main() {
7
- gl_PointSize = 1.0 ;
8
- gl_Position = vec4 (p, 0.0 , 1.0 );
7
+ gl_PointSize = 1 .f ;
8
+ gl_Position = vec4 (p, 0 .f , 1 .f );
9
9
}
Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ export const webglPlugin: () => Plugin = () => ({
18
18
. replace ( / \/ \* .* \* \/ / gm, "" )
19
19
// remove line comments
20
20
. replace ( / \/ \/ .* / g, "" )
21
- // remove white spaces around =
22
- . replace ( / [ = + * - / ] / g, m => m . trim ( ) )
21
+ // remove white spaces around operators
22
+ . replace ( / ( [ = + * - / % > < & ^ | ] | [ = ! > < + * - / ] = | & & | \| \| | \^ \^ ) / g, m => m . trim ( ) )
23
23
. split ( "\n" )
24
24
. map ( line => line . trim ( ) )
25
25
. filter ( Boolean ) ;
26
- const contents = `export default \` ${ lines [ 0 ] } \n${ lines . slice ( 1 ) . join ( "" ) } \` ` ;
27
- return { contents, loader : "ts " } ;
26
+ const contents = `${ lines [ 0 ] } \n${ lines . slice ( 1 ) . join ( "" ) } ` ;
27
+ return { contents, loader : "text " } ;
28
28
} ) ;
29
29
} ,
30
30
} ) ;
You can’t perform that action at this time.
0 commit comments