Compare commits

...

2 commits

Author SHA1 Message Date
bddec03d22 rebellion 2026-05-14 14:38:34 +09:00
01ab8edd9b ethnicity 2026-05-14 00:21:24 +09:00
3 changed files with 958 additions and 692 deletions

View file

@ -20,12 +20,6 @@
<button id="stepOnce" type="button">Step</button>
<button id="resetWorld" type="button">Reset</button>
</div>
<div class="row">
<button id="saveWorld" type="button">Save</button>
<button id="loadWorld" type="button">Load</button>
<button id="clearSave" type="button">Clear</button>
</div>
<label>
Speed
<input id="speed" type="range" min="1" max="12" value="5">
@ -55,6 +49,7 @@
<option value="pressure">Population pressure</option>
<option value="polities">Polities</option>
<option value="technology">Technology</option>
<option value="pheromone">Pheromone</option>
</select>
</label>
</section>

1602
script.js

File diff suppressed because it is too large Load diff

View file

@ -412,6 +412,43 @@ canvas#world {
text-align: right;
}
.ethnicity-pie-wrap {
display: grid;
grid-template-columns: 44px 1fr;
align-items: center;
gap: 8px;
margin-top: 6px;
}
.ethnicity-pie {
width: 40px;
height: 40px;
border: 1px solid rgba(238, 241, 237, 0.28);
border-radius: 50%;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.ethnicity-pie-labels {
display: flex;
flex-wrap: wrap;
gap: 3px 7px;
}
.tooltip .ethnicity-pie-key {
display: inline-flex;
justify-content: flex-start;
align-items: center;
gap: 4px;
color: var(--muted);
white-space: nowrap;
}
.ethnicity-pie-key i {
width: 8px;
height: 8px;
border-radius: 2px;
}
@media (max-width: 1100px) {
body {
overflow: auto;