wall reset param works
This commit is contained in:
8
dist/index.html
vendored
8
dist/index.html
vendored
@@ -33,7 +33,7 @@
|
||||
<p id='fps'>Target FPS: 60</p>
|
||||
<p id='fps-actual'></p>
|
||||
<button id='reset-env' title='Restarts simulation with default organism.'>Reset</button>
|
||||
<button id='clear-env' title="Removes all organisms and walls. Will disable 'reset on extinction'"">Clear</button>
|
||||
<button id='clear-env' title="Removes all organisms. Will disable 'reset on extinction'"">Clear</button>
|
||||
</div>
|
||||
|
||||
<div id='tab-container' class='control-set'>
|
||||
@@ -171,9 +171,9 @@
|
||||
<h3>Reset Options</h3>
|
||||
<label for="reset-options">Starting state:</label>
|
||||
<select name="reset-options" id="reset-options">
|
||||
<option value="default-org">Simple producer</option>
|
||||
<option value="simple-prod">Simple producer</option>
|
||||
<option value="rand-orgs">Random organisms</option>
|
||||
<option value="empty">No organisms</option>
|
||||
<option value="no-orgs">No organisms</option>
|
||||
</select> <br>
|
||||
<label for="auto-reset">Reset on total extinction</label>
|
||||
<input type="checkbox" id="auto-reset" checked>
|
||||
@@ -185,7 +185,7 @@
|
||||
<button id="clear-walls" title="Clear All Walls. Hotkey: B">Clear all walls</button>
|
||||
<br>
|
||||
<label for="clear-walls-reset" title='When on, walls will be cleared when the environment resets'>Clear walls on reset</label>
|
||||
<input type="checkbox" id="clear-walls-reset" checked>
|
||||
<input type="checkbox" id="clear-walls-reset">
|
||||
</div>
|
||||
</div>
|
||||
<div id='hyperparameters' class='tab'>
|
||||
|
||||
@@ -9,9 +9,9 @@ class ControlPanel {
|
||||
this.defineMinMaxControls();
|
||||
this.defineHotkeys();
|
||||
this.defineEngineSpeedControls();
|
||||
this.defineGridSizeControls();
|
||||
this.defineTabNavigation();
|
||||
this.defineHyperparameterControls();
|
||||
this.defineWorldControls();
|
||||
this.defineModeControls();
|
||||
this.defineChallenges();
|
||||
this.fps = engine.fps;
|
||||
@@ -149,7 +149,28 @@ class ControlPanel {
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
defineGridSizeControls() {
|
||||
defineTabNavigation() {
|
||||
this.tab_id = 'about';
|
||||
var self = this;
|
||||
$('.tabnav-item').click(function() {
|
||||
$('.tab').css('display', 'none');
|
||||
var tab = '#'+this.id+'.tab';
|
||||
$(tab).css('display', 'grid');
|
||||
$('.tabnav-item').removeClass('open-tab')
|
||||
$('#'+this.id+'.tabnav-item').addClass('open-tab');
|
||||
self.engine.organism_editor.is_active = (this.id == 'editor');
|
||||
self.stats_panel.stopAutoRender();
|
||||
if (this.id === 'stats') {
|
||||
self.stats_panel.startAutoRender();
|
||||
}
|
||||
else if (this.id === 'editor') {
|
||||
self.editor_controller.refreshDetailsPanel();
|
||||
}
|
||||
self.tab_id = this.id;
|
||||
});
|
||||
}
|
||||
|
||||
defineWorldControls() {
|
||||
$('#fill-window').change(function() {
|
||||
if (this.checked)
|
||||
$('.col-row-input').css('display' ,'none');
|
||||
@@ -172,27 +193,14 @@ class ControlPanel {
|
||||
this.stats_panel.reset();
|
||||
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
defineTabNavigation() {
|
||||
this.tab_id = 'about';
|
||||
var self = this;
|
||||
$('.tabnav-item').click(function() {
|
||||
$('.tab').css('display', 'none');
|
||||
var tab = '#'+this.id+'.tab';
|
||||
$(tab).css('display', 'grid');
|
||||
$('.tabnav-item').removeClass('open-tab')
|
||||
$('#'+this.id+'.tabnav-item').addClass('open-tab');
|
||||
self.engine.organism_editor.is_active = (this.id == 'editor');
|
||||
self.stats_panel.stopAutoRender();
|
||||
if (this.id === 'stats') {
|
||||
self.stats_panel.startAutoRender();
|
||||
}
|
||||
else if (this.id === 'editor') {
|
||||
self.editor_controller.refreshDetailsPanel();
|
||||
}
|
||||
self.tab_id = this.id;
|
||||
$('#auto-reset').change(function() {
|
||||
env.auto_reset = this.checked;
|
||||
});
|
||||
|
||||
$('#clear-walls-reset').change(function() {
|
||||
WorldConfig.clear_walls_on_reset = this.checked;
|
||||
})
|
||||
}
|
||||
|
||||
defineHyperparameterControls() {
|
||||
@@ -336,9 +344,6 @@ class ControlPanel {
|
||||
$('#random-walls').click( function() {
|
||||
this.env_controller.randomizeWalls();
|
||||
}.bind(this));
|
||||
$('#auto-reset').change(function() {
|
||||
env.auto_reset = this.checked;
|
||||
});
|
||||
$('#clear-walls').click( function() {
|
||||
this.engine.env.clearWalls();
|
||||
}.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user