add robust fixture rendering
This commit is contained in:
parent
ef2d067b38
commit
cf4e8024af
13 changed files with 140 additions and 64 deletions
|
@ -32,9 +32,7 @@ class Player {
|
|||
|
||||
updateInputs(data) {
|
||||
let input = {};
|
||||
let sanitize = v => {
|
||||
return v.length ? v.map(a => sanitize(a)) : +v || 0;
|
||||
}
|
||||
let sanitize = v => v.length ? v.map(a => sanitize(a)) : +v || 0;
|
||||
data.forEach((v, i) => input[this.inputInterface[i]] = sanitize(v));
|
||||
this.ship.updateInputs(input);
|
||||
this.lastAction = Date.now();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue