Add glsl loader

This commit is contained in:
schmelczerandras 2020-07-20 15:52:18 +02:00
commit ef315b7089

View file

@ -13,10 +13,6 @@ export class Vec2 extends Typed {
return new Vec2(this.x * scalar, this.y * scalar);
}
public times(other: Vec2): Vec2 {
return new Vec2(this.x * other.x, this.y * other.y);
}
public add(other: Vec2): Vec2 {
return new Vec2(this.x + other.x, this.y + other.y);
}
@ -25,6 +21,14 @@ export class Vec2 extends Typed {
return new Vec2(this.x - other.x, this.y - other.y);
}
public times(other: Vec2): Vec2 {
return new Vec2(this.x * other.x, this.y * other.y);
}
public divide(other: Vec2): Vec2 {
return new Vec2(this.x / other.x, this.y / other.y);
}
public get length(): number {
return Math.sqrt(this.x * this.x + this.y * this.y);
}