-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathhelpers.js
More file actions
35 lines (30 loc) · 1016 Bytes
/
Copy pathhelpers.js
File metadata and controls
35 lines (30 loc) · 1016 Bytes
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
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var assureRequiredGLFeatures = function (context) {
if( !context.enableExtension( "OES_texture_float" )) {
alert( "No support for float textures!" );
//return;
}
if( !context.enableExtension( "OES_texture_float_linear" )) {
alert( "No support for float texture linear interpolation!" );
//return;
}
if( !context.enableExtension( "OES_standard_derivatives" )) {
alert( "No support for standard derivatives!" );
//return;
}
if( !context.maxVertexTextureImageUnits()) {
alert( "No support for vertex shader textures!" );
//return;
}
};
var loadSynchronous = function(url) {
var req = new XMLHttpRequest();
req.open("GET", url, false);
req.send(null);
return (req.status == 200) ? req.responseText : null;
};