aboutsummaryrefslogtreecommitdiff
path: root/src/RaytraceDispatcher.ts
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2025-08-01 19:26:25 +0100
committerJames Barnett <noreply@jamesbarnett.xyz>2025-08-01 19:26:25 +0100
commit4ed6cae45c96166f22b1d295bda12dd9913385a8 (patch)
tree453a52d77c370ba71a57ab3683d537dda52650b0 /src/RaytraceDispatcher.ts
parentabe1f21f84df5864e8a7781864d9e32436bde2d4 (diff)
downloadjs-raytracer-4ed6cae45c96166f22b1d295bda12dd9913385a8.tar.xz
js-raytracer-4ed6cae45c96166f22b1d295bda12dd9913385a8.zip
Update colors and typography
Diffstat (limited to 'src/RaytraceDispatcher.ts')
-rw-r--r--src/RaytraceDispatcher.ts11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/RaytraceDispatcher.ts b/src/RaytraceDispatcher.ts
index 12f2502..b408bef 100644
--- a/src/RaytraceDispatcher.ts
+++ b/src/RaytraceDispatcher.ts
@@ -150,21 +150,18 @@ export class RaytraceDispatcher {
let borderWidth = 0;
if (this.context.height <= 720) {
- borderWidth = 2;
+ borderWidth = 4;
} else {
- borderWidth = 5;
+ borderWidth = 8;
}
- const borderColour = new Colour(220, 128, 128);
- const unrenderedAreaColour = new Colour(160, 160, 160);
-
for (let y = 0; y < height; y++) {
for (let x = 0; x < width; x++) {
if (y < borderWidth || y >= (height-borderWidth) || x < borderWidth || x >= (width-borderWidth)) {
- this.framebuffer.writePixelAt(chunk.xStart+x, chunk.yStart+y, borderColour);
+ this.framebuffer.writePixelAt(chunk.xStart+x, chunk.yStart+y, this.context.options.chunkBorderColour);
} else {
- this.framebuffer.writePixelAt(chunk.xStart+x, chunk.yStart+y, unrenderedAreaColour);
+ this.framebuffer.writePixelAt(chunk.xStart+x, chunk.yStart+y, this.context.options.chunkUnrenderedColour);
}
}