diff options
author | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-12-27 18:49:23 +0100 |
---|---|---|
committer | niliara-edu <nil.jimeno@estudiant.fjaverianas.com> | 2024-12-27 18:49:23 +0100 |
commit | dd89667fa2e209c8eb0efca61e69359122c33983 (patch) | |
tree | eb90fc5782b51fd02070c6dc0c331383a656e4f4 /src/engine/screen.js | |
parent | 0696b94962a0571fad54844f137dca025df4563b (diff) |
finished
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 || |