Reuse unchanged projection arrays and limit extra viewport retention
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
import type {Rect} from '../canvas-core/geometry.ts';
|
||||
/** Positive-area native node visibility. Degenerate nodes are retained for measurement. */
|
||||
export function nativeRectVisible(node:Rect,viewport:Rect){if(node.width<=0||node.height<=0)return true;return Math.min(node.x+node.width,viewport.x+viewport.width)>Math.max(node.x,viewport.x)&&Math.min(node.y+node.height,viewport.y+viewport.height)>Math.max(node.y,viewport.y);}
|
||||
Reference in New Issue
Block a user