Skip to content

Commit a0d7bc7

Browse files
feat: fix vertical bearing calculation
Filter points behind the principal plane.
1 parent 9b68369 commit a0d7bc7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/render/RenderCamera.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,12 @@ export class RenderCamera {
438438
const {_spatial} = this;
439439

440440
const yProjections = bearings.y
441+
.filter(b => b[1] > 0)
441442
.map(b => _spatial.projectToPlane(b, [1, 0, 0]))
442443
.map(p => [p[1], -p[2]]);
443444

444445
const xProjections = bearings.x
446+
.filter(b => b[0] < 0)
445447
.map(b => _spatial.projectToPlane(b, [0, 1, 0]))
446448
.map(p => [p[0], -p[2]]);
447449

0 commit comments

Comments
 (0)