forked from racz16/WebGL-GLSL-Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snippets.json
87 lines (87 loc) · 1.91 KB
/
snippets.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
"version": {
"prefix": "version",
"body": "#version ${1:300} es",
"description": "Creates the version declaration"
},
"main": {
"prefix": "main",
"body": [
"void main(){",
"\t$0",
"}"
],
"description": "Creates the main function"
},
"function": {
"prefix": "func",
"body": [
"${1:vec3} ${2:getValue}($3){",
"\t$0",
"}"
],
"description": "Creates a function"
},
"for": {
"prefix": "for",
"body": [
"for(${1:int} ${2:i} = ${3:0}; ${2:i} < ${4:max}; ${2:i}++) {",
"\t$0",
"}"
],
"description": "Creates a for loop"
},
"while": {
"prefix": "while",
"body": [
"while(${1:true}) {",
"\t$0",
"}"
],
"description": "Creates a while loop"
},
"if": {
"prefix": "if",
"body": [
"if(${1:true}) {",
"\t$0",
"}"
],
"description": "Creates an if statement"
},
"iffloat": {
"prefix": [
"iffloat",
"iff"
],
"body": [
"if(${1:value} < ${2:0.0001f} && ${1:value} > ${3:-0.0001f}) {",
"\t$0",
"}"
],
"description": "Creates a float comparison if statement"
},
"ifelse": {
"prefix": [
"ifelse",
"ife"
],
"body": [
"if(${1:true}) {",
"\t$0",
"}else{",
"\t",
"}"
],
"description": "Creates an if-else statement"
},
"struct": {
"prefix": "struct",
"body": [
"struct ${1:Type} {",
"\t${2:vec3} ${3:vec};$0",
"};"
],
"description": "Creates a struct"
}
}