aboutsummaryrefslogtreecommitdiff
path: root/src/Material.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/Material.ts')
-rw-r--r--src/Material.ts9
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;
+ }
}