Display planet

fusion
Makaci Michael Gabriel ago%!(EXTRA string=1 year)
parent 123b6c3eea
commit bb914aae6c
  1. 15
      js/controllers/systems.js
  2. 2
      js/skama_code

@ -15,6 +15,15 @@ export default (temp_engine) => {
const size = getSize();
canvas.resize(size.width, size.height);
});
//display planets
SystemBuilder.get(getAgentSystem(), (system) => {
system.list_all_planets((planets) => {
planets.forEach(planet => {
canvas.obj_from_img('../../assets/planets/planetproto.png', planet.position);
});
});
});
});
temp_engine.render("templates/systems/systems.html");
@ -26,3 +35,9 @@ function getSize() {
height: window.innerHeight,
};
}
function getAgentSystem(){
const hq = My.agent.hq;
const systemName = hq.split('-');
return systemName[0] + '-' + systemName[1];
}

@ -1 +1 @@
Subproject commit c4c3b567023641de51661e81ccb7939484b7dce2
Subproject commit a4a407bbfd8ce319e14bba69af9bb19aa40d781f
Loading…
Cancel
Save