Cleaned up a few things
This commit is contained in:
6
dist/css/style.css
vendored
6
dist/css/style.css
vendored
@@ -39,12 +39,12 @@ body{
|
|||||||
background-color: #3a4b68;
|
background-color: #3a4b68;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
opacity: 0.8;
|
/* opacity: 0.8; */
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-panel:hover {
|
/* .control-panel:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
} */
|
||||||
|
|
||||||
.control-set {
|
.control-set {
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
|||||||
8
dist/index.html
vendored
8
dist/index.html
vendored
@@ -27,9 +27,9 @@
|
|||||||
<button id="clear-walls" title="Clear All Walls"><i class="fa fa-window-close"></i></button>
|
<button id="clear-walls" title="Clear All Walls"><i class="fa fa-window-close"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<h2>Simulation Speed</h2>
|
<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='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'>Target FPS: 60</p>
|
||||||
<p id='fps-actual'></p>
|
<p id='fps-actual'></p>
|
||||||
<button id='reset-env'>Reset Environment</button>
|
<button id='reset-env'>Reset Environment</button>
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id='stats' class='tab'>
|
<div id='stats' class='tab'>
|
||||||
<div class='left-half'>
|
<div class='left-half'>
|
||||||
<h2>Stats</h2>
|
<h2>Statistics</h2>
|
||||||
<p id='org-count'>Total Population: </p>
|
<p id='org-count'>Total Population: </p>
|
||||||
<p id='species-count'>Number of Species: </p>
|
<p id='species-count'>Number of Species: </p>
|
||||||
<p id='largest-org'>Largest Organism Ever: </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="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="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='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>
|
||||||
<div id="headless-notification">
|
<div id="headless-notification">
|
||||||
<i class="fa fa-eye-slash" ></i>
|
<i class="fa fa-eye-slash" ></i>
|
||||||
|
|||||||
2
dist/js/bundle.js
vendored
2
dist/js/bundle.js
vendored
File diff suppressed because one or more lines are too long
@@ -61,6 +61,8 @@ class ControlPanel {
|
|||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
$('.headless').click(function() {
|
$('.headless').click(function() {
|
||||||
|
$('.headless').find("i").toggleClass("fa fa-eye");
|
||||||
|
$('.headless').find("i").toggleClass("fa fa-eye-slash");
|
||||||
if (Hyperparams.headless){
|
if (Hyperparams.headless){
|
||||||
$('#headless-notification').css('display', 'none');
|
$('#headless-notification').css('display', 'none');
|
||||||
this.engine.env.renderFull();
|
this.engine.env.renderFull();
|
||||||
|
|||||||
@@ -63,12 +63,12 @@ class Eye extends CellState {
|
|||||||
return;
|
return;
|
||||||
var half = size/2;
|
var half = size/2;
|
||||||
var x = -(size)/8
|
var x = -(size)/8
|
||||||
var y = -half
|
var y = -half;
|
||||||
var h = size/2 + size/4;
|
var h = size/2 + size/4;
|
||||||
var w = size/4;
|
var w = size/4;
|
||||||
ctx.translate(cell.x+half, cell.y+half);
|
ctx.translate(cell.x+half, cell.y+half);
|
||||||
ctx.rotate((cell.cell_owner.getAbsoluteDirection() * 90) * Math.PI / 180);
|
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.fillRect(x, y, w, h);
|
||||||
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user