aboutsummaryrefslogtreecommitdiff
path: root/src/RaytraceContext.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/RaytraceContext.ts')
-rw-r--r--src/RaytraceContext.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/RaytraceContext.ts b/src/RaytraceContext.ts
index f7c9315..acd4336 100644
--- a/src/RaytraceContext.ts
+++ b/src/RaytraceContext.ts
@@ -1,4 +1,5 @@
import {Type} from 'class-transformer';
+import {Colour} from './Colour';
import {Plane, Sphere} from './Geometry';
import {Light} from './Light';
@@ -9,6 +10,8 @@ export class RaytraceContext {
readonly planes: Plane[];
@Type(() => Light)
readonly lights: Light[];
+ @Type(() => Colour)
+ readonly backgroundColour: Colour;
constructor(
readonly height: number,
readonly width: number,
@@ -16,11 +19,13 @@ export class RaytraceContext {
spheres: Sphere[],
planes: Plane[],
lights: Light[],
+ backgroundColour: Colour,
readonly options: RaytracerOptions
) {
this.spheres = spheres;
this.planes = planes;
this.lights = lights;
+ this.backgroundColour = backgroundColour;
}
}