2017-04-19 21:05:28 +00:00
|
|
|
// feature checking trashcode (c) obrado 1989
|
|
|
|
|
2017-04-18 16:27:51 +00:00
|
|
|
window.onload = function() {
|
|
|
|
var support = {
|
2017-04-19 21:05:28 +00:00
|
|
|
anim: true,
|
2017-04-18 16:27:51 +00:00
|
|
|
canvas: true,
|
|
|
|
webgl: true,
|
|
|
|
idb: true
|
|
|
|
};
|
|
|
|
|
|
|
|
if(!document.getElementById("cs").getContext)
|
|
|
|
support.canvas = false;
|
|
|
|
|
|
|
|
// check for webgl support
|
|
|
|
var canvas = document.getElementById("cs");
|
|
|
|
if(!(canvas.getContext("webgl") || canvas.getContext("experimental-webgl")))
|
|
|
|
support.webgl = false;
|
|
|
|
|
|
|
|
// check for indexedDB support
|
|
|
|
window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
|
|
|
|
window.IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBransaction;
|
|
|
|
window.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange || window.msIDBKeyRange;
|
|
|
|
if(!window.indexedDB)
|
|
|
|
support.idb = false;
|
|
|
|
|
2017-05-15 18:19:32 +00:00
|
|
|
var supported = true;
|
|
|
|
for(var i in support)
|
|
|
|
supported = supported && support[i];
|
|
|
|
|
|
|
|
if(!supported) {
|
|
|
|
var supportStr = "";
|
|
|
|
for(var i in support)
|
|
|
|
supportStr += ""+ (+support[i]);
|
|
|
|
|
|
|
|
window.location.href = "error.html?err="+ supportStr;
|
2017-04-18 16:27:51 +00:00
|
|
|
return;
|
|
|
|
}
|
2017-04-18 04:59:38 +00:00
|
|
|
|
2017-05-15 18:19:32 +00:00
|
|
|
Entrypoint.Start();
|
2017-04-19 12:10:47 +00:00
|
|
|
}
|