Fix lights
This commit is contained in:
parent
13843f87a8
commit
e44be0c5ee
17 changed files with 179 additions and 117 deletions
|
|
@ -36,7 +36,7 @@ export class Circle extends Drawable {
|
|||
super();
|
||||
}
|
||||
|
||||
public distance(target: vec2): number {
|
||||
public minDistance(target: vec2): number {
|
||||
return vec2.dist(this.center, target) - this.radius;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ export class InvertedTunnel extends Drawable {
|
|||
super();
|
||||
}
|
||||
|
||||
public distance(target: vec2): number {
|
||||
public minDistance(target: vec2): number {
|
||||
const toFromDelta = vec2.subtract(vec2.create(), this.to, this.from);
|
||||
const targetFromDelta = vec2.subtract(vec2.create(), target, this.from);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export class Tunnel extends Drawable {
|
|||
super();
|
||||
}
|
||||
|
||||
public distance(target: vec2): number {
|
||||
public minDistance(target: vec2): number {
|
||||
const toFromDelta = vec2.subtract(vec2.create(), this.to, this.from);
|
||||
const targetFromDelta = vec2.subtract(vec2.create(), target, this.from);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue