parent
d3460e04f5
commit
403f2c7953
1 changed files with 27 additions and 0 deletions
@ -1,3 +1,30 @@ |
||||
class Position { |
||||
constructor(x, y) { |
||||
this.x = x; |
||||
this.y = y; |
||||
} |
||||
|
||||
get_canvas_pos(w, h) { |
||||
return new Position(x - w/2, y - h/2) |
||||
} |
||||
} |
||||
|
||||
export class Planet { |
||||
constructor(waypoint) { |
||||
this.symbol = waypoint.symbol; |
||||
this.type = waypoint.type; |
||||
this.system = waypoint.systemSymbol; |
||||
this.position = new Position(x, y); |
||||
this.moons = waypoint.orbitals; |
||||
this.orbits = waypoint.orbits; |
||||
this.faction = waypoint.faction; |
||||
this.traits = waypoint.traits; |
||||
this.dangers = waypoint.modifiers; |
||||
this.discovery = waypoint.char; |
||||
this.is_under_construction = waypoint.isUnderConstruction; |
||||
} |
||||
} |
||||
|
||||
export class PlanetBuilder { |
||||
|
||||
} |
Loading…
Reference in New Issue