space planets better
This commit is contained in:
parent
005f7b5dc7
commit
bfd068410c
2 changed files with 3 additions and 3 deletions
|
@ -37,8 +37,8 @@
|
||||||
const planet = {
|
const planet = {
|
||||||
"name": parameters[i][j]["name"],
|
"name": parameters[i][j]["name"],
|
||||||
"ship_count": parseInt(parameters[i][j]["shipCount"]),
|
"ship_count": parseInt(parameters[i][j]["shipCount"]),
|
||||||
"x": r_j,
|
"x": r_j * 2.5,
|
||||||
"y": r_i
|
"y": r_i * 2.5
|
||||||
};
|
};
|
||||||
|
|
||||||
if (parameters[i][j]["colour"] !== 0) {
|
if (parameters[i][j]["colour"] !== 0) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
<svg preserveAspectRatio="none" viewBox="{{ planets | calc_viewbox}}" xmlns="http://www.w3.org/2000/svg" fill="grey">
|
<svg preserveAspectRatio="none" viewBox="{{ planets | calc_viewbox}}" xmlns="http://www.w3.org/2000/svg" fill="grey">
|
||||||
{% for planet in planets -%}
|
{% for planet in planets -%}
|
||||||
<circle cx="{{ planet.x }}" cy="{{ planet.y }}" r="0.5" fill="{% if planet.owner %}{{planet.owner | get_colour}}{% else %}grey{%endif%}"/>
|
<circle cx="{{ planet.x }}" cy="{{ planet.y }}" r="1" fill="{% if planet.owner %}{{planet.owner | get_colour}}{% else %}grey{%endif%}"/>
|
||||||
{# <text x="{{planet.x}}" y="{{planet.y + 2}}" class="small" dominant-baseline="middle" text-anchor="middle">{{planet.name}}</text> #}
|
{# <text x="{{planet.x}}" y="{{planet.y + 2}}" class="small" dominant-baseline="middle" text-anchor="middle">{{planet.name}}</text> #}
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 451 B After Width: | Height: | Size: 449 B |
Loading…
Reference in a new issue