What problem does it solve?
PixiJS apps often require robust math utilities for coordinates, transforms, hit testing, and layout calculations. This Skill bundles Point, Matrix, shape classes, and the math-extras helpers to provide a cohesive, ready-to-use math toolkit for 2D graphics and interactions.
Core Features & Use Cases
- Point and ObservablePoint operations for precise position, velocity, and constraints.
- 2D affine Matrix transforms with apply, applyInverse, decompose, and coordinate conversions toGlobal/toLocal.
- Shape primitives (Rectangle, Circle, Ellipse, Polygon, RoundedRectangle, Triangle) with contains and stroke testing for hit areas and interactions.
- Rectangle layout helpers (pad, fit, enlarge, ceil, scale) and Polygon geometry utilities (containsPolygon, isClockwise) for UI and physics-like logic.
- Math-extras integration for vector math on Point and Rectangle, and utilities like lineIntersection and segmentIntersection.
Quick Start
Import pixi.js/math-extras to enable extended math utilities and start using Point/Matrix and hit-testing utilities in your PixiJS v8 project.