diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2022-01-02 18:23:36 +0000 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2022-01-02 18:23:36 +0000 |
| commit | e075667cd2dc878dd9dceb07c85719f6712bcda1 (patch) | |
| tree | 414e76418d92a39c59b1f5faf08289c0a729ddb4 /src/Material.ts | |
| parent | 7ad1b7efabea1349107669a432e6c88305f8d825 (diff) | |
| download | js-raytracer-e075667cd2dc878dd9dceb07c85719f6712bcda1.tar.xz js-raytracer-e075667cd2dc878dd9dceb07c85719f6712bcda1.zip | |
Implement multi-threaded rendering
Diffstat (limited to 'src/Material.ts')
| -rw-r--r-- | src/Material.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Material.ts b/src/Material.ts index 6f199a3..3abff57 100644 --- a/src/Material.ts +++ b/src/Material.ts @@ -1,11 +1,16 @@ +import {Type} from 'class-transformer'; import {Colour} from './Colour'; export class Material { + @Type(() => Colour) + readonly diffuseColour: Colour; constructor( - readonly diffuseColour: Colour, + diffuseColour: Colour, readonly diffuseAlbedo: number, readonly specularAlbedo: number, readonly reflectionAlbedo: number, readonly specularExponent: number - ) {} + ) { + this.diffuseColour = diffuseColour; + } } |