1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Allow exporting whole bases, closes #137

This commit is contained in:
tobspr
2020-06-13 10:57:29 +02:00
parent fca216b3c5
commit 7e745fd0ce
9 changed files with 133 additions and 16 deletions

View File

@@ -10,6 +10,7 @@ import {
Math_atan2,
Math_sin,
Math_cos,
Math_ceil,
} from "./builtins";
const tileSize = globalConfig.tileSize;
@@ -303,13 +304,21 @@ export class Vector {
}
/**
* Computes componentwise floor and return a new vector
* Computes componentwise floor and returns a new vector
* @returns {Vector}
*/
floor() {
return new Vector(Math_floor(this.x), Math_floor(this.y));
}
/**
* Computes componentwise ceil and returns a new vector
* @returns {Vector}
*/
ceil() {
return new Vector(Math_ceil(this.x), Math_ceil(this.y));
}
/**
* Computes componentwise round and return a new vector
* @returns {Vector}