From 10bfc58085c6ab7e62077a1a9b6a6d922fffb025 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Sat, 26 Jul 2025 11:17:10 +0100 Subject: Rework multithreaded rendering Render worker tasks are now split into chunks rather than row blocks for better thread utilisation --- src/Vector.ts | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 src/Vector.ts (limited to 'src/Vector.ts') diff --git a/src/Vector.ts b/src/Vector.ts deleted file mode 100644 index 2be8e57..0000000 --- a/src/Vector.ts +++ /dev/null @@ -1,40 +0,0 @@ -export class Vector { - constructor(readonly x: number, readonly y: number, readonly z: number) {} - - add(v: Vector): Vector { - return new Vector(this.x + v.x, this.y + v.y, this.z + v.z); - } - - addScalar(n: number): Vector { - return new Vector(this.x + n, this.y + n, this.z + n); - } - - subtract(v: Vector): Vector { - return new Vector(this.x - v.x, this.y - v.y, this.z - v.z); - } - - multiply(n: number): Vector { - return new Vector(this.x * n, this.y * n, this.z * n); - } - - dotProduct(v: Vector): number { - return this.x * v.x + this.y * v.y + this.z * v.z; - } - - normalise(): Vector { - const vecLength = this.norm(); - return new Vector( - this.x / vecLength, - this.y / vecLength, - this.z / vecLength - ); - } - - norm(): number { - return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z); - } - - negative(): Vector { - return new Vector(-this.x, -this.y, -this.z); - } -} -- cgit v1.2.3