|
|
@ -69,6 +69,7 @@ import {
|
|
|
|
vectorScale,
|
|
|
|
vectorScale,
|
|
|
|
vectorNormalize,
|
|
|
|
vectorNormalize,
|
|
|
|
vectorCross,
|
|
|
|
vectorCross,
|
|
|
|
|
|
|
|
pointsEqual,
|
|
|
|
} from "../../math";
|
|
|
|
} from "../../math";
|
|
|
|
import { intersectElementWithLineSegment } from "./collision";
|
|
|
|
import { intersectElementWithLineSegment } from "./collision";
|
|
|
|
import { distanceToBindableElement } from "./distance";
|
|
|
|
import { distanceToBindableElement } from "./distance";
|
|
|
@ -1523,6 +1524,11 @@ const determineFocusDistance = (
|
|
|
|
element.x + element.width / 2,
|
|
|
|
element.x + element.width / 2,
|
|
|
|
element.y + element.height / 2,
|
|
|
|
element.y + element.height / 2,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (pointsEqual(a, b)) {
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const intersection = [
|
|
|
|
const intersection = [
|
|
|
|
linesIntersectAt(
|
|
|
|
linesIntersectAt(
|
|
|
|
line(a, b),
|
|
|
|
line(a, b),
|
|
|
|