fix missing intersections in arrows
This commit is contained in:
parent
03ff422680
commit
79f7d1db87
1 changed files with 2 additions and 0 deletions
|
@ -790,6 +790,7 @@ export class TLDR {
|
||||||
.filter((int) => int.didIntersect)
|
.filter((int) => int.didIntersect)
|
||||||
.map((int) => int.points[0])
|
.map((int) => int.points[0])
|
||||||
.sort((a, b) => Vec.dist(a, B.point) - Vec.dist(b, B.point))
|
.sort((a, b) => Vec.dist(a, B.point) - Vec.dist(b, B.point))
|
||||||
|
if (!hits[0]) continue
|
||||||
let bHit: number[] | undefined = undefined
|
let bHit: number[] | undefined = undefined
|
||||||
if (B.isBound) {
|
if (B.isBound) {
|
||||||
const bHits = intersectRayBounds(
|
const bHits = intersectRayBounds(
|
||||||
|
@ -822,6 +823,7 @@ export class TLDR {
|
||||||
)
|
)
|
||||||
.filter((int) => int.didIntersect)
|
.filter((int) => int.didIntersect)
|
||||||
.map((int) => int.points[0])
|
.map((int) => int.points[0])
|
||||||
|
if (!shortArrowHits[0]) continue
|
||||||
result[ID].point = Vec.toFixed(Vec.sub(shortArrowHits[0], arrowShape.point))
|
result[ID].point = Vec.toFixed(Vec.sub(shortArrowHits[0], arrowShape.point))
|
||||||
result[ID === 'start' ? 'end' : 'start'].point = Vec.toFixed(
|
result[ID === 'start' ? 'end' : 'start'].point = Vec.toFixed(
|
||||||
Vec.add(
|
Vec.add(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue