Add start of ship editing grid
This commit is contained in:
parent
b88c0eb358
commit
2fbabc785e
16 changed files with 249 additions and 18 deletions
16
js/graphics/edit.mjs
Normal file
16
js/graphics/edit.mjs
Normal file
|
@ -0,0 +1,16 @@
|
|||
import {context} from './index.mjs';
|
||||
import * as edit from '../game/edit.mjs';
|
||||
import * as world from '../world/index.mjs';
|
||||
|
||||
export function render() {
|
||||
let ship = world.playerShip;
|
||||
|
||||
context.save();
|
||||
context.translate(...ship.com);
|
||||
context.rotate(ship.r);
|
||||
let [cx, cy] = ship.localCom;
|
||||
|
||||
context.translate(-cx, -cy);
|
||||
|
||||
context.restore();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue