Skip to content

Commit

Permalink
Deploy preview for PR 19 🛫
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjrw committed Sep 7, 2024
1 parent fa3eb62 commit 802ac32
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pr-preview/pr-19/scp-3211/en/[email protected]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pr-preview/pr-19/scp-3211/jp/[email protected]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pr-preview/pr-19/scp-3211/zh/[email protected]

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions pr-preview/pr-19/scp-head/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -145,23 +145,23 @@
? "top"
: "unknown";

// Work out change in proximity - positive means the scout got closer to the reader (moving onto screen)
const proximityChange =
// Work out change in distance - negative means the scout got closer to the reader (moving onto screen)
const distanceChange =
poleTop.intersectionRatio -
poleTop.lastIntersectionRatio +
poleBottom.intersectionRatio -
poleBottom.lastIntersectionRatio;

// Translate proximity change to direction based on screen edge
const direction = {
top: ["down", "up"],
bottom: ["up", "down"],
top: ["up", "down"],
bottom: ["down", "up"],
unknown: [null, null],
}[edge][Number(proximityChange > 0)];
}[edge][Number(distanceChange > 0)];

if (window.debug)
console.debug(
`${scoutName}: ${edge} ${proximityChange} ${direction}`,
`${scoutName}: ${edge} ${distanceChange} ${direction}`,
poleTop,
poleBottom
);
Expand Down

0 comments on commit 802ac32

Please sign in to comment.