What problem does it solve?
PixiJS apps often need accurate coordinate conversion, transform math, and shape-based hit testing, but it’s easy to get wrong bounds, intersections, or local/global mapping.
Core Features & Use Cases
- Coordinate transforms: Convert points between local and global spaces using Container helpers like toGlobal/toLocal.
- Affine transform math: Build, apply, invert, and decompose 2D Matrix transforms for positioning, scaling, rotation, and skew.
- Shape containment and collision: Use Rectangle/Circle/Ellipse/Polygon/RoundedRectangle/Triangle methods (contains, containsRect, intersects, strokeContains, getBounds) for interaction hit areas and geometry checks.
- Layout rectangle helpers: Pad, fit, enlarge, ceil, scale, and compute aggregated bounds with chaining, plus safe reuse patterns via out params.
- math-extras utilities: Extend Point/ObservablePoint with vector operations and Rectangle with intersection/union, and use exported geometry helpers like lineIntersection/segmentIntersection.
Quick Start
Use the pixijs-math skill to transform a local point to global space and verify whether a Rectangle hit area contains a given pointer coordinate in PixiJS v8.