summaryrefslogtreecommitdiffstats
path: root/src/model/MapData.ts
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-10-24 23:05:13 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-10-24 23:05:13 +0200
commitebc56db63c054702ad910987aa666d7cfb52d5cc (patch)
tree1fc08dcb6b84edd9102770d20bfe351fa02cc3f9 /src/model/MapData.ts
parent9770eaf432bacff9de1b9911adef1db368b8cc70 (diff)
downloadrpgedit-ebc56db63c054702ad910987aa666d7cfb52d5cc.tar
rpgedit-ebc56db63c054702ad910987aa666d7cfb52d5cc.zip
Move shader initialization out of renderer
Avoid public fields and ! overrides, make almost all fields readonly.
Diffstat (limited to 'src/model/MapData.ts')
-rw-r--r--src/model/MapData.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/model/MapData.ts b/src/model/MapData.ts
index dcb98b8..c8db35c 100644
--- a/src/model/MapData.ts
+++ b/src/model/MapData.ts
@@ -1,18 +1,18 @@
import {mapFromObject} from '../util';
interface Input {
- tiles: {[key: string]: string};
- collision: string[];
- layers: string[][][];
+ readonly tiles: {[key: string]: string};
+ readonly collision: string[];
+ readonly layers: string[][][];
}
export default class MapData {
- public tiles: Map<string, string>;
- public collision: string[];
- public layers: string[][][];
+ public readonly tiles: Map<string, string>;
+ public readonly collision: string[];
+ public readonly layers: string[][][];
- public width: number;
- public height: number;
+ public readonly width: number;
+ public readonly height: number;
constructor(data: Input) {
this.tiles = mapFromObject(data.tiles);