diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-11-01 00:59:13 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2018-11-01 00:59:13 +0100 |
commit | 9f2e4e6996fb96d23e1ca29667130a2111a59de5 (patch) | |
tree | fa7c3c22d469f062252735269dbc09031fc47dd8 /src/view | |
parent | 22b06efe2c2646a01535b5bbf5f3cc57de81ad0d (diff) | |
download | rpgedit-9f2e4e6996fb96d23e1ca29667130a2111a59de5.tar rpgedit-9f2e4e6996fb96d23e1ca29667130a2111a59de5.zip |
Do not use default exports
Diffstat (limited to 'src/view')
-rw-r--r-- | src/view/entity.ts | 4 | ||||
-rw-r--r-- | src/view/input/directionhandler.ts (renamed from src/view/input/DirectionHandler.ts) | 9 | ||||
-rw-r--r-- | src/view/input/inputhandler.ts (renamed from src/view/input/InputHandler.ts) | 4 | ||||
-rw-r--r-- | src/view/map.ts | 9 | ||||
-rw-r--r-- | src/view/renderer/renderer.ts (renamed from src/view/renderer/Renderer.ts) | 6 | ||||
-rw-r--r-- | src/view/renderer/shaders.ts (renamed from src/view/renderer/Shaders.ts) | 6 | ||||
-rw-r--r-- | src/view/renderer/shaders/default.fs (renamed from src/view/renderer/default.fs) | 0 | ||||
-rw-r--r-- | src/view/renderer/shaders/default.vs (renamed from src/view/renderer/default.vs) | 0 | ||||
-rw-r--r-- | src/view/sprite.ts | 2 |
9 files changed, 21 insertions, 19 deletions
diff --git a/src/view/entity.ts b/src/view/entity.ts index 57969a2..015875a 100644 --- a/src/view/entity.ts +++ b/src/view/entity.ts @@ -1,5 +1,5 @@ -import Renderer from './renderer/Renderer'; -import { SpriteCoords, SpriteView, SpriteViewBuilder } from './sprite'; +import { Renderer } from './renderer/renderer'; +import { SpriteView, SpriteViewBuilder } from './sprite'; import { loadImage, mkTexture } from './util/image'; export async function loadSimpleEntity( diff --git a/src/view/input/DirectionHandler.ts b/src/view/input/directionhandler.ts index 691ba01..0a3687e 100644 --- a/src/view/input/DirectionHandler.ts +++ b/src/view/input/directionhandler.ts @@ -1,7 +1,8 @@ -import {Listenable} from '../../util'; -import InputHandler from './InputHandler'; +import { InputHandler } from './inputhandler'; -import {vec2} from 'gl-matrix'; +import { Listenable } from '../../util'; + +import { vec2 } from 'gl-matrix'; export const enum Keycode { Left = 37, @@ -10,7 +11,7 @@ export const enum Keycode { Down = 40, } -export default class DirectionHandler extends Listenable<[vec2]> { +export class DirectionHandler extends Listenable<[vec2]> { private readonly input: InputHandler; constructor() { diff --git a/src/view/input/InputHandler.ts b/src/view/input/inputhandler.ts index a6f1293..96f15dd 100644 --- a/src/view/input/InputHandler.ts +++ b/src/view/input/inputhandler.ts @@ -1,6 +1,6 @@ -import {Listenable} from '../../util'; +import { Listenable } from '../../util'; -export default class InputHandler extends Listenable<[]> { +export class InputHandler extends Listenable<[]> { private readonly keys: Set<number> = new Set(); constructor(relevantKeys: Set<number>) { diff --git a/src/view/map.ts b/src/view/map.ts index d7c9ce9..ff37737 100644 --- a/src/view/map.ts +++ b/src/view/map.ts @@ -1,10 +1,11 @@ -import MapData from '../model/data/MapData'; -import { nextPowerOf2 } from '../util'; - -import Renderer from './renderer/Renderer'; +import { Renderer } from './renderer/renderer'; import { SpriteCoords, SpriteView, SpriteViewBuilder } from './sprite'; import { loadImage, mkTexture } from './util/image'; +import { MapData } from '../model/data/map'; + +import { nextPowerOf2 } from '../util'; + interface Tileset { texture: WebGLTexture; tiles: SpriteCoords[]; diff --git a/src/view/renderer/Renderer.ts b/src/view/renderer/renderer.ts index 75dc265..062c868 100644 --- a/src/view/renderer/Renderer.ts +++ b/src/view/renderer/renderer.ts @@ -1,8 +1,8 @@ -import { mat4, vec2 } from 'gl-matrix'; +import { Shaders } from './shaders'; -import Shaders from './Shaders'; +import { mat4, vec2 } from 'gl-matrix'; -export default class Renderer { +export class Renderer { private readonly viewScale = 64; private readonly gl: WebGLRenderingContext; diff --git a/src/view/renderer/Shaders.ts b/src/view/renderer/shaders.ts index da75a18..8fd1fda 100644 --- a/src/view/renderer/Shaders.ts +++ b/src/view/renderer/shaders.ts @@ -1,7 +1,7 @@ -import fragmentShaderSrc from './default.fs'; -import vertexShaderSrc from './default.vs'; +import fragmentShaderSrc from './shaders/default.fs'; +import vertexShaderSrc from './shaders/default.vs'; -export default class Shaders { +export class Shaders { public readonly viewportLoc: WebGLUniformLocation; public readonly translateLoc: WebGLUniformLocation; diff --git a/src/view/renderer/default.fs b/src/view/renderer/shaders/default.fs index 2c8ad15..2c8ad15 100644 --- a/src/view/renderer/default.fs +++ b/src/view/renderer/shaders/default.fs diff --git a/src/view/renderer/default.vs b/src/view/renderer/shaders/default.vs index 4715a17..4715a17 100644 --- a/src/view/renderer/default.vs +++ b/src/view/renderer/shaders/default.vs diff --git a/src/view/sprite.ts b/src/view/sprite.ts index 02fa77a..3a5ebcb 100644 --- a/src/view/sprite.ts +++ b/src/view/sprite.ts @@ -1,4 +1,4 @@ -import Renderer from './renderer/Renderer'; +import { Renderer } from './renderer/renderer'; export type SpriteCoords = [number, number, number, number]; |