Cleaned up a few things

This commit is contained in:
Max Robinson
2021-02-12 17:46:03 -07:00
parent d1119b65e8
commit 5caa653db1
5 changed files with 12 additions and 10 deletions

6
dist/css/style.css vendored
View File

@@ -39,12 +39,12 @@ body{
background-color: #3a4b68;
display: grid;
grid-template-columns: repeat(3, 1fr);
opacity: 0.8;
/* opacity: 0.8; */
}
.control-panel:hover {
/* .control-panel:hover {
opacity: 1;
}
} */
.control-set {
margin: 5px;

8
dist/index.html vendored
View File

@@ -27,9 +27,9 @@
<button id="clear-walls" title="Clear All Walls"><i class="fa fa-window-close"></i></button>
</div>
<h2>Simulation Speed</h2>
<input id="slider" type="range" min="1" max="500" value="60">
<input id="slider" type="range" min="1" max="300" value="60">
<button class='pause-button'><i class="fa fa-pause"></i></button>
<button class="headless" title="Disable rendering (increase efficiency)"><i class="fa fa-eye-slash"></i></button>
<button class="headless" title="Toggle rendering"><i class="fa fa-eye-slash"></i></button>
<p id='fps'>Target FPS: 60</p>
<p id='fps-actual'></p>
<button id='reset-env'>Reset Environment</button>
@@ -222,7 +222,7 @@
</div>
<div id='stats' class='tab'>
<div class='left-half'>
<h2>Stats</h2>
<h2>Statistics</h2>
<p id='org-count'>Total Population: </p>
<p id='species-count'>Number of Species: </p>
<p id='largest-org'>Largest Organism Ever: </p>
@@ -267,7 +267,7 @@
<button class="edit-mode-btn" id="food-drop" title="Drop/Remove Food"><i class="fa fa-cutlery"></i></button>
<button class="edit-mode-btn" id="click-kill" title="Click to kill"><i class="fa fa-bolt"></i></button>
<button class='pause-button'><i class="fa fa-pause"></i></button>
<button class="headless" title="Disable rendering (increase efficiency)"><i class="fa fa-eye-slash"></i></button>
<button class="headless" title="Toggle rendering"><i class="fa fa-eye-slash"></i></button>
</div>
<div id="headless-notification">
<i class="fa fa-eye-slash" ></i>

2
dist/js/bundle.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -61,6 +61,8 @@ class ControlPanel {
}
}.bind(this));
$('.headless').click(function() {
$('.headless').find("i").toggleClass("fa fa-eye");
$('.headless').find("i").toggleClass("fa fa-eye-slash");
if (Hyperparams.headless){
$('#headless-notification').css('display', 'none');
this.engine.env.renderFull();

View File

@@ -63,12 +63,12 @@ class Eye extends CellState {
return;
var half = size/2;
var x = -(size)/8
var y = -half
var y = -half;
var h = size/2 + size/4;
var w = size/4;
ctx.translate(cell.x+half, cell.y+half);
ctx.rotate((cell.cell_owner.getAbsoluteDirection() * 90) * Math.PI / 180);
ctx.fillStyle = this.slit_color
ctx.fillStyle = this.slit_color;
ctx.fillRect(x, y, w, h);
ctx.setTransform(1, 0, 0, 1, 0, 0);
}