NDC y is never gated. A number whose projected y is > 1 or < -1 (above/below the viewport) still gets display: block and a top that can be hundreds of pixels off-canvas.
The comment on that arm says it is checking whether the position is visible on screen; x and behind-camera z are checked, y is not. Damage/XP/gold labels therefore leak as invisible-but-present DOM nodes (and can become visible again on resize) while the entity is vertically off-screen.
Fix: also require scratchPosition.y > -1 && scratchPosition.y < 1 (or the inclusive equivalent used for x).
Found by Wave 7 coverage tests (floating-text-system.leftovers.spec.ts).
`updateFloatingTexts` in `projects/spikersoft/src/app/_components/_games/dungeon-crawler/floating-text-system.ts` decides on-screen visibility with:
```
scratchPosition.x > -1 && scratchPosition.x < 1 && scratchPosition.z < 1
```
NDC **y** is never gated. A number whose projected y is `> 1` or `< -1` (above/below the viewport) still gets `display: block` and a `top` that can be hundreds of pixels off-canvas.
The comment on that arm says it is checking whether the position is visible on screen; x and behind-camera z are checked, y is not. Damage/XP/gold labels therefore leak as invisible-but-present DOM nodes (and can become visible again on resize) while the entity is vertically off-screen.
Fix: also require `scratchPosition.y > -1 && scratchPosition.y < 1` (or the inclusive equivalent used for x).
Found by Wave 7 coverage tests (`floating-text-system.leftovers.spec.ts`).
Resolved in spikersoft-angular PR #819 (merged to master). Floating combat text is culled when projected Y is off-screen. Closing.
Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). Floating combat text is culled when projected Y is off-screen. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
updateFloatingTextsinprojects/spikersoft/src/app/_components/_games/dungeon-crawler/floating-text-system.tsdecides on-screen visibility with:NDC y is never gated. A number whose projected y is
> 1or< -1(above/below the viewport) still getsdisplay: blockand atopthat can be hundreds of pixels off-canvas.The comment on that arm says it is checking whether the position is visible on screen; x and behind-camera z are checked, y is not. Damage/XP/gold labels therefore leak as invisible-but-present DOM nodes (and can become visible again on resize) while the entity is vertically off-screen.
Fix: also require
scratchPosition.y > -1 && scratchPosition.y < 1(or the inclusive equivalent used for x).Found by Wave 7 coverage tests (
floating-text-system.leftovers.spec.ts).Resolved in spikersoft-angular PR #819 (merged to
master). Floating combat text is culled when projected Y is off-screen. Closing.