diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2025-07-26 11:17:10 +0100 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2025-07-26 11:17:10 +0100 |
| commit | 10bfc58085c6ab7e62077a1a9b6a6d922fffb025 (patch) | |
| tree | 3e1d3ff39891c2c2408235c209566f4c51915859 /src/models/Light.ts | |
| parent | ebc500c522e7233fbc6037bce0569edf3a0b5136 (diff) | |
| download | js-raytracer-10bfc58085c6ab7e62077a1a9b6a6d922fffb025.tar.xz js-raytracer-10bfc58085c6ab7e62077a1a9b6a6d922fffb025.zip | |
Rework multithreaded rendering
Render worker tasks are now split into chunks rather than row blocks for better thread utilisation
Diffstat (limited to 'src/models/Light.ts')
| -rw-r--r-- | src/models/Light.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/models/Light.ts b/src/models/Light.ts new file mode 100644 index 0000000..58e4185 --- /dev/null +++ b/src/models/Light.ts @@ -0,0 +1,10 @@ +import {Type} from 'class-transformer'; +import {Vector} from './Vector'; + +export class Light { + @Type(() => Vector) + readonly position: Vector; + constructor(position: Vector, readonly intensity: number) { + this.position = position; + } +} |