1681-engine / index / inView
Function: inView() ​
ts
function inView(
cam,
x,
y,
margin
): boolean;Defined in: src/fx/viewCull.ts:14
Whether the world point (x, y) lies within margin world pixels of the screen. Effects use it to skip painting what nobody can see. A camera that has no size yet (a tool's fake stage, before the first resize) counts everything in.
Parameters ​
| Parameter | Type |
|---|---|
cam | CameraLike |
x | number |
y | number |
margin | number |
Returns ​
boolean