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

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);
}