aboutsummaryrefslogtreecommitdiff
path: root/src/Light.ts
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2022-01-02 18:23:36 +0000
committerJames Barnett <noreply@jamesbarnett.xyz>2022-01-02 18:23:36 +0000
commite075667cd2dc878dd9dceb07c85719f6712bcda1 (patch)
tree414e76418d92a39c59b1f5faf08289c0a729ddb4 /src/Light.ts
parent7ad1b7efabea1349107669a432e6c88305f8d825 (diff)
downloadjs-raytracer-e075667cd2dc878dd9dceb07c85719f6712bcda1.tar.xz
js-raytracer-e075667cd2dc878dd9dceb07c85719f6712bcda1.zip
Implement multi-threaded rendering
Diffstat (limited to 'src/Light.ts')
-rw-r--r--src/Light.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Light.ts b/src/Light.ts
index 1d9c8bd..58e4185 100644
--- a/src/Light.ts
+++ b/src/Light.ts
@@ -1,5 +1,10 @@
+import {Type} from 'class-transformer';
import {Vector} from './Vector';
export class Light {
- constructor(readonly position: Vector, readonly intensity: number) {}
+ @Type(() => Vector)
+ readonly position: Vector;
+ constructor(position: Vector, readonly intensity: number) {
+ this.position = position;
+ }
}