diff options
Diffstat (limited to 'src/engine/screen.js')
-rw-r--r-- | src/engine/screen.js | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/engine/screen.js b/src/engine/screen.js index b1da92d..0cc4a8f 100644 --- a/src/engine/screen.js +++ b/src/engine/screen.js @@ -1,5 +1,4 @@ import { Vector } from "./vector.js" -import { BACKGROUND } from "../assets.js" export class Screen { viewport = new Vector(650, 500) @@ -13,7 +12,6 @@ export class Screen { createHTMLElements() { this.div - this.background this.spawn /* create main div */ @@ -22,14 +20,6 @@ export class Screen { this.div.style.backgroundColor = "black" this.div.style.zIndex = -11 - /* create background image */ - this.background = document.createElement("img") - this.background.className = "background" - this.background.src = `${BACKGROUND.DEFAULT}` - this.background.style.visibility = "hidden" - this.background.style.zIndex = -10 - this.div.appendChild(this.background) - /* create relative div to append children */ this.spawn = document.createElement("div") this.div.appendChild(this.spawn) @@ -84,10 +74,6 @@ export class Screen { span.style.rotate = `${rotation}deg` } - setBackground(img) { this.background.src = img } - showBackground() { this.background.visibility = "visible" } - hideBackground() { this.background.visibility = "hidden" } - isOffLimits(position, size) { return ( position.x + size.x / 2 < 0 || |