static size ;(

This commit is contained in:
ntr 2018-12-14 12:52:39 +11:00
parent f770e2fbf8
commit d225843e35
2 changed files with 13 additions and 12 deletions

View File

@ -1,27 +1,27 @@
// POSITIONING FNS // POSITIONING FNS
// floors prevent subpixel rendering which looks trash // floors prevent subpixel rendering which looks trash
const menuWidth = () => window.innerWidth; const menuWidth = () => 1600;
const menuHeight = () => Math.floor(window.innerHeight * 0.05); const menuHeight = () => 25;
const combatWidth = () => window.innerWidth; const combatWidth = () => 1600;
const combatHeight = () => window.innerHeight - menuHeight(); const combatHeight = () => 1000 - menuHeight();
const combatY = () => menuHeight(); const combatY = () => menuHeight();
const combatX = () => 0; const combatX = () => 0;
const crypListWidth = () => Math.floor(window.innerWidth * 0.2); const crypListWidth = () => Math.floor(1600 * 0.2);
const crypListHeight = () => window.innerHeight - menuHeight(); const crypListHeight = () => 1000 - menuHeight();
const cryplistRowHeight = cryps => crypListHeight() / cryps.length; const cryplistRowHeight = cryps => crypListHeight() / cryps.length;
const crypListY = () => menuHeight(); const crypListY = () => menuHeight();
const crypListX = () => 0; const crypListX = () => 0;
const gameListWidth = () => Math.floor(window.innerWidth * 0.2); const gameListWidth = () => Math.floor(1600 * 0.2);
const gameListHeight = () => Math.floor(window.innerHeight / 10); const gameListHeight = () => Math.floor(1000 / 10);
const gameListX = () => crypListWidth(); const gameListX = () => crypListWidth();
const gameListY = i => menuHeight() + (gameListHeight() * i); const gameListY = i => menuHeight() + (gameListHeight() * i);
const gameListRowY = i => menuHeight() + (gameListHeight() * (i + 2)); const gameListRowY = i => menuHeight() + (gameListHeight() * (i + 2));
const statsWidth = () => Math.floor(window.innerWidth - crypListWidth() - gameListWidth()); const statsWidth = () => Math.floor(1600 - crypListWidth() - gameListWidth());
const statsHeight = () => window.innerHeight - menuHeight(); const statsHeight = () => 1000 - menuHeight();
const statsY = () => menuHeight(); const statsY = () => menuHeight();
const statsX = () => crypListWidth() + gameListWidth(); const statsX = () => crypListWidth() + gameListWidth();
const statsKnownX = () => Math.floor(statsX() + statsWidth() / 4); const statsKnownX = () => Math.floor(statsX() + statsWidth() / 4);
@ -33,6 +33,7 @@ const logHeight = () => combatHeight() * 0.3;
const logY = () => menuHeight() + (combatHeight() * 0.7); const logY = () => menuHeight() + (combatHeight() * 0.7);
const logX = () => combatWidth() * 0.6; const logX = () => combatWidth() * 0.6;
module.exports = { module.exports = {
TEXT: { TEXT: {
NORMAL: { fontFamily: 'monospace', fontSize: 16, color: '#ffffff' }, NORMAL: { fontFamily: 'monospace', fontSize: 16, color: '#ffffff' },

View File

@ -9,8 +9,8 @@ function renderCryps() {
backgroundColor: '#181818', backgroundColor: '#181818',
resolution: window.devicePixelRatio, resolution: window.devicePixelRatio,
// antialias: true, // antialias: true,
width: window.innerWidth, width: 1600,
height: window.innerHeight, height: 1000,
physics: { physics: {
default: 'arcade', default: 'arcade',
arcade: { arcade: {