diff options
Diffstat (limited to 'src/Light.ts')
| -rw-r--r-- | src/Light.ts | 7 |
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; + } } |