I tap a swamp and chant.
"The Earth cannot hold that which magic commands."
This is the solution:
The viewport size returns the X and Y dimensions. if your world position exceeds those dimensions or lower than 0 (top left origin), then it is out of view.
Hook this up to a tick or timer.