Skip to content
pixi-silk
GitHub repository
Function

quadIntersects

import { quadIntersects } from 'pixi-silk/ui/marquee';
function quadIntersects(q: Quad, r: WorldRect): boolean;

True when a parallelogram quad (corners in order, as boundsQuad returns) touches an axis-aligned rectangle. Edges that only touch count. Uses separating axes, so other quads may be wrong.

Parameters#

ParameterType
qQuad
rWorldRect

Returns#

boolean