-
Notifications
You must be signed in to change notification settings - Fork 13
/
snippets.json
47 lines (47 loc) · 1.46 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
{
"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"
}
}