I've found out that the condition : is_outside_layout >< outside viewport. Then how to detect if the sprite is outside viewport.
Develop games in your browser. Powerful, performant & highly capable.
depending on your need you can use the condition Is on screen or Compare x/y and use Viewport(Right or direction on screen you need)
If object is on screen is the easiest and least intensive method from my experience but it doesn't let you test for a distance from the viewport, it simply is false when every single pixel of an object is off screen.