Commit c6de89b1 authored by amandaghassaei's avatar amandaghassaei

handle mobile error

parent 2edef572
......@@ -11,10 +11,23 @@ function initGPUMath(){
var gl = canvas.getContext("webgl", {antialias:false}) || canvas.getContext("experimental-webgl", {antialias:false});
var floatTextures = gl.getExtension("OES_texture_float");
if (!floatTextures) {
function notSupported(){
var elm = '<div id="coverImg" ' +
'style="background: url(vortexshedding.gif) no-repeat center center fixed;' +
'-webkit-background-size: cover;' +
'-moz-background-size: cover;' +
'-o-background-size: cover;' +
'background-size: cover;">'+
'</div>';
$(elm).appendTo(body);
$("#noSupportModal").modal("show");
console.warn("floating point textures are not supported on your system");
}
if (!floatTextures) {
notSupported();
}
gl.disable(gl.DEPTH_TEST);
var maxTexturesInFragmentShader = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);
......@@ -73,8 +86,7 @@ function initGPUMath(){
var check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
if(check != gl.FRAMEBUFFER_COMPLETE){
$("#noSupportModal").modal("show");
console.warn("rendering to floating point textures are not supported on your system");
notSupported();
}
this.frameBuffers[textureName] = framebuffer;
......
......@@ -16,6 +16,15 @@ canvas {
overflow: hidden;
}
#coverImg{
z-index: 5;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#about{
position: absolute;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment