Commit 1eb32839 authored by Big Bad Waffle's avatar Big Bad Waffle

added noise factor to login bg renderer

parent ca77067c
......@@ -2,9 +2,6 @@ define([
], function (
) {
//5 3 4 53
//6 0 1 54
//5 53 brighter
let mRandom = Math.random.bind(Math);
const renderLoginBackground = renderer => {
......@@ -18,13 +15,15 @@ define([
let w = Math.ceil(width / scale) + 1;
let h = Math.ceil(height / scale) + 1;
const midX = (w / 2) - 1;
const midY = (h / 2) - 2;
const midX = ~~(w / 2);
const midY = ~~(h / 2);
const rGrass = 10;
const rBeach = 2;
const rShallow = 3;
const noiseFactor = 3;
let container = layers.tileSprites;
for (let i = 0; i < w; i++) {
......@@ -32,11 +31,11 @@ define([
let tile = 5;
let distance = Math.sqrt(Math.pow(i - midX, 2) + Math.pow(j - midY, 2));
if (distance < rGrass + (Math.random() * 3))
if (distance < rGrass + (Math.random() * noiseFactor))
tile = 3;
else if (distance < rGrass + rBeach + (Math.random() * 3))
else if (distance < rGrass + rBeach + (Math.random() * noiseFactor))
tile = 4;
else if (distance < rGrass + rBeach + rShallow + (Math.random() * 2))
else if (distance < rGrass + rBeach + rShallow + (Math.random() * noiseFactor))
tile = 53;
let alpha = mRandom();
......
......@@ -107,7 +107,7 @@
}
&:hover {
background-color: @blueB;
background-color: @blueD;
}
}
......@@ -147,6 +147,7 @@
padding-right: 10px;
background-color: @brownC;
color: @white;
filter: drop-shadow(0 -2px 0 #312136) drop-shadow(0 2px 0 #312136) drop-shadow(2px 0 0 #312136) drop-shadow(-2px 0 0 #312136);
+ .btn {
margin-left: 20px;
......
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