-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathModuleId.js
executable file
·45 lines (41 loc) · 1.48 KB
/
ModuleId.js
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
// DO NOT CHANGE ANYTHING HERE
// This function read the variables given in the URL as GET parameters
// For example if you call raytracer.html?C1 then ModuleId.C1 equals true
// You can have several module by doing for example raytracer.html?C1&C2
var ModuleId = {
B1: false, //... specular reflection/refraction and recursive ray tracing
B2: false, //... anti-aliasing
B3: false, //... quadrics
B4: false, //... CSG primitives
C1: false, //... stereo
C2: false, //... texture mapping
C3: false, //... meshes
D1: false, //... octree
D2: false, //... area light
X1: false, //...
X2: false, //...
X3: false, //...
X4: false, //...
X5: false //...
};
if(document.location.toString().indexOf('?') != -1) {
var query = document.location.toString().replace(/^.*?\?/,'').split('&');
for(var i=0 ; i < query.length ; i++) {
switch(query[i]) {
case "B1": ModuleId.B1 = true; break;
case "B2": ModuleId.B2 = true; break;
case "B3": ModuleId.B3 = true; break;
case "B4": ModuleId.B4 = true; break;
case "C1": ModuleId.C1 = true; break;
case "C2": ModuleId.C2 = true; break;
case "C3": ModuleId.C3 = true; break;
case "D1": ModuleId.D1 = true; break;
case "D2": ModuleId.D2 = true; break;
case "X1": ModuleId.X1 = true; break;
case "X2": ModuleId.X2 = true; break;
case "X3": ModuleId.X3 = true; break;
case "X4": ModuleId.X4 = true; break;
case "X5": ModuleId.X5 = true; break;
}
}
}