Marquee: drag a box to select.
import { Marquee, combineSelection, quadInside, quadIntersects } from 'pixi-silk/ui/marquee';
Classes#
| Class | Description |
|---|
| Marquee | Rubber-band selection: drag on empty canvas to pick every object the rectangle touches (or fully contains). Shift adds to the selection, Alt takes away, Escape cancels. |
Interfaces#
Type Aliases#
| Type Alias | Description |
|---|
| MarqueeMode | intersect picks what the rectangle touches, contain only what is fully inside. |
| MarqueeOp | How a drag combines with the selection: replace it, add to it (Shift) or take away from it (Alt). |
Functions#
| Function | Description |
|---|
| combineSelection | Combines a selection with what a marquee covers. add appends hits not in base, keeping order. subtract removes them. Always returns a new array. |
| quadInside | True when all four corners of a quad are inside an axis-aligned rectangle, edges included. |
| quadIntersects | 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. |