diff options
| author | Rubén Beltrán del Río <ben@nsovocal.com> | 2018-04-23 07:58:20 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-23 07:58:20 -0500 |
| commit | 6768cd461ec1a8ea87c0f64e1b3c29e36b0b02ed (patch) | |
| tree | a681bf5e89210cc86f8108696e4f51ee16d62ee6 /lib/config.js | |
| parent | 7ade6f8d96825386bf2e89dea51f9297cbac8e9c (diff) | |
Draw the Arena (#7)
* Add defaults to config
* Create arena sprite
* Draw the arena
* Draw a face when cooling down the dash
* Correct linter issues
Diffstat (limited to 'lib/config.js')
| -rw-r--r-- | lib/config.js | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/lib/config.js b/lib/config.js index ba02ed8..856fc18 100644 --- a/lib/config.js +++ b/lib/config.js @@ -4,7 +4,7 @@ * @name Config * @type object */ -export default { +const config = { /** * How many pixels to use per meter @@ -12,5 +12,32 @@ export default { * @property {number} meterSize * @memberof Config */ - meterSize: 25 + meterSize: 25, + + /** + * Aspect Ratio the aspect ratio expressed as an array of two numbers + * + * @property {number} aspectRatio + * @memberof Config + */ + aspectRatio: [2.76, 1], + + /** + * Target vertical resolution + * + * @property {number} verticalResolution + * @memberof Config + */ + verticalResolution: 224 + }; + +/** + * How many pixels to use per meter + * + * @property {number} meterSize + * @memberof Config + */ +config.horizontalResolution = Math.round(config.verticalResolution * config.aspectRatio[0] / config.aspectRatio[1]); + +export default config; |