From e075667cd2dc878dd9dceb07c85719f6712bcda1 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Sun, 2 Jan 2022 18:23:36 +0000 Subject: Implement multi-threaded rendering --- src/Geometry.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/Geometry.ts') diff --git a/src/Geometry.ts b/src/Geometry.ts index 4fcc11b..9bef1a7 100644 --- a/src/Geometry.ts +++ b/src/Geometry.ts @@ -1,13 +1,21 @@ +import {Type} from 'class-transformer'; import {Colour} from './Colour'; import {Material} from './Material'; import {Vector} from './Vector'; export class Sphere { + @Type(() => Vector) + readonly centerPoint: Vector; + @Type(() => Material) + readonly material: Material; constructor( - readonly centerPoint: Vector, readonly radius: number, - readonly material: Material - ) {} + centerPoint: Vector, + material: Material + ) { + this.centerPoint = centerPoint; + this.material = material; + } } export class Plane { -- cgit v1.2.3