summaryrefslogtreecommitdiff
path: root/src/engine/systems/Render.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-11 16:35:51 -0600
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-11 16:35:51 -0600
commitde4f3fd2fe45478ffabc84f055592e11b119d0a4 (patch)
treead2ce3b3e646d2d6bfbccb4b9c8962196a0ea8fe /src/engine/systems/Render.ts
parent32879581e53fae5e684c24b44433172d8375d69e (diff)
downloadthe-abstraction-engine-de4f3fd2fe45478ffabc84f055592e11b119d0a4.tar.gz
the-abstraction-engine-de4f3fd2fe45478ffabc84f055592e11b119d0a4.zip
prettier, fix assets and css
Diffstat (limited to 'src/engine/systems/Render.ts')
-rw-r--r--src/engine/systems/Render.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/engine/systems/Render.ts b/src/engine/systems/Render.ts
index c730cec..2dd35e2 100644
--- a/src/engine/systems/Render.ts
+++ b/src/engine/systems/Render.ts
@@ -26,7 +26,7 @@ export class Render extends System {
sprite.update(dt);
const boundingBox = entity.getComponent<BoundingBox>(
- ComponentNames.BoundingBox
+ ComponentNames.BoundingBox,
);
// don't render if we're outside the screen
@@ -34,12 +34,12 @@ export class Render extends System {
clamp(
boundingBox.center.y,
-boundingBox.dimension.height / 2,
- this.ctx.canvas.height + boundingBox.dimension.height / 2
+ this.ctx.canvas.height + boundingBox.dimension.height / 2,
) != boundingBox.center.y ||
clamp(
boundingBox.center.x,
-boundingBox.dimension.width / 2,
- this.ctx.canvas.width + boundingBox.dimension.width / 2
+ this.ctx.canvas.width + boundingBox.dimension.width / 2,
) != boundingBox.center.x
) {
return;
@@ -52,7 +52,7 @@ export class Render extends System {
};
if (entity.hasComponent(ComponentNames.Highlight)) {
const highlight = entity.getComponent<Highlight>(
- ComponentNames.Highlight
+ ComponentNames.Highlight,
);
drawArgs.tint = highlight.isHighlighted ? "red" : undefined;
}