$(document).ready(function() {
initialize();
$('#bottombar').hide();
});
function showbottombar() {
var isOffline = 'onLine' in navigator && !navigator.onLine;
if (isOffline) {
setTimeout(showbottombar, 1000);
} else {
window.iframeHasLoaded = true;
if (gameState != 1) {
$('#bottombar').fadeIn(150, 'linear');
}
}
}
function hidebottombar() {
$('#bottombar').fadeOut(150, 'linear');
}
function initialize(a) {
window.iframHasLoaded = false;
window.colors = ["#e74c3c", "#f1c40f", "#3498db", "#2ecc71"];
window.hexColorsToTintedColors = {
"#e74c3c": "rgb(241,163,155)",
"#f1c40f": "rgb(246,223,133)",
"#3498db": "rgb(151,201,235)",
"#2ecc71": "rgb(150,227,183)"
};
window.rgbToHex = {
"rgb(231,76,60)": "#e74c3c",
"rgb(241,196,15)": "#f1c40f",
"rgb(52,152,219)": "#3498db",
"rgb(46,204,113)": "#2ecc71"
};
window.rgbColorsToTintedColors = {
"rgb(231,76,60)": "rgb(241,163,155)",
"rgb(241,196,15)": "rgb(246,223,133)",
"rgb(52,152,219)": "rgb(151,201,235)",
"rgb(46,204,113)": "rgb(150,227,183)"
};
window.hexagonBackgroundColor = 'rgb(236, 240, 241)';
window.hexagonBackgroundColorClear = 'rgba(236, 240, 241, 0.5)';
window.centerBlue = 'rgb(44,62,80)';
window.angularVelocityConst = 4;
window.scoreOpacity = 0;
window.textOpacity = 0;
window.prevGameState = undefined;
//render.js
window.op = 0;
window.saveState = localStorage.getItem("saveState") || "{}";
if (saveState !== "{}") {
op = 1;
}
//input.js
//all of main.js
//main.js
window.textShown = false;
window.requestAnimFrame = (function() {
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) {
window.setTimeout(callback, 1000 / framerate);
};
})();
$('#clickToExit').bind('click', toggleDevTools);
window.settings;
if (/Mobile|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
settings = {
platform: "mobile",
startDist: 227,
creationDt: 40,
baseScale: 1.4,
scale: 1,
prevScale: 1,
baseHexWidth: 87,
hexWidth: 87,
baseBlockHeight: 20,
blockHeight: 20,
rows: 7,
speedModifier: 0.73,
creationSpeedModifier: 0.73,
comboTime: 240
};
} else {
settings = {
platform: "nonmobile",
baseScale: 1,
startDist: 340,
creationDt: 9,
scale: 1,
prevScale: 1,
hexWidth: 65,
baseHexWidth: 87,
baseBlockHeight: 20,
blockHeight: 15,
rows: 8,
speedModifier: 0.65,
creationSpeedModifier: 0.65,
comboTime: 240
};
$("#inst_main_body").html("The goal of Hextris is to stop blocks from leaving the inside of the outer gray hexagon
Either press the right and left arrow keys or tap the left and right sides of the screen to rotate the Hexagon
Clear blocks by making 3 or more blocks of the same color touch
Get points by clearing blocks
Time left before your combo streak disappears is indicated shown by the colored lines in the outer hexagon
Pause by pressing or the letter p
Restart by pressing or enter
Bring up this menu by pressing
Found a bug? Go here