From ec531271f10503732d737b6648d266cafbf9a924 Mon Sep 17 00:00:00 2001 From: Oscar Lorentzon Date: Wed, 30 Apr 2025 09:31:23 -0700 Subject: [PATCH] feat: fix vertical bearing calculation Filter points behind the principal plane. --- src/render/RenderCamera.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/render/RenderCamera.ts b/src/render/RenderCamera.ts index 58afbb19..801c6c52 100644 --- a/src/render/RenderCamera.ts +++ b/src/render/RenderCamera.ts @@ -438,10 +438,12 @@ export class RenderCamera { const {_spatial} = this; const yProjections = bearings.y + .filter(b => b[1] > 0) .map(b => _spatial.projectToPlane(b, [1, 0, 0])) .map(p => [p[1], -p[2]]); const xProjections = bearings.x + .filter(b => b[0] < 0) .map(b => _spatial.projectToPlane(b, [0, 1, 0])) .map(p => [p[0], -p[2]]);