Camera projection, upload lights and global uniforms, issue draw calls

This commit is contained in:
2023-08-05 15:41:10 +02:00
parent be350c5f4f
commit 23309903e8
9 changed files with 284 additions and 28 deletions

View File

@@ -104,6 +104,15 @@ export class Vector4 {
this.w = w;
return this;
}
normalize(): Vector4 {
const l = Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w);
this.x /= l;
this.y /= l;
this.z /= l;
this.w /= l;
return this;
}
}
Object.defineProperty(Vector4.prototype, "type", { value: "Vector4" });