pixijs-math

Perform geometric calculations and hit testing in PixiJS scenes.

2|2|Updated May 1, 2026
One-click install
npx skills add https://github.com/adamhjk/mvtt --skill pixijs-math-adamhjk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixijs-math
Source: https://github.com/adamhjk/mvtt/tree/main/.agents/skills/pixijs-math
Command: npx skills add https://github.com/adamhjk/mvtt --skill pixijs-math-adamhjk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Enables developers to efficiently work with coordinates, vectors, matrices, and shapes in PixiJS v8 for graphics transformations and hit testing.

Core Features & Use Cases

  • Transformations and Coordinate Conversion: Simplifies transforming points between local and global spaces and applying complex transformations using Matrix.
  • Shape and Hit Testing: Provides robust methods for shape containment, intersection, and hit detection to implement interactive graphics.
  • Use Case: Set up a draggable shape with precise hit testing to detect clicks or overlaps in a game or interactive app.

Quick Start

Import the PixiJS math extras to extend Point, Matrix, and Rectangle with vector operations, intersection utilities, and collision detection methods.

Frequently Asked Questions about pixijs-math

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement hit testing and collision detection for interactive graphics in PixiJS?

Hit testing in PixiJS is implemented using math primitives for shape containment and intersection detection. You can apply vector math and coordinate transformations to accurately detect clicks or overlaps within interactive scenes.

How do I convert coordinates between local and global spaces in PixiJS v8?

Coordinate conversion in PixiJS v8 uses Matrix transformations to map points between local and global spaces. This simplifies applying complex transformations to graphics and ensures accurate positioning across nested display objects.

Does PixiJS provide built-in vector math operations for game development?

PixiJS provides extended vector math operations through its math extras. These methods extend core Point and Matrix primitives to support geometric calculations required for game development and interactive graphics workflows.

What is the best way to handle complex shape containment and intersections in PixiJS?

The best way to handle shape containment and intersections in PixiJS is using robust math extras for collision detection. These utilities provide precise geometric calculations for detecting overlaps between complex shapes.

Do I need to install math extras separately to use vector operations in PixiJS?

Yes, you need pixi.js/math-extras to use extended vector operations in PixiJS. This module provides the additional methods required on core math primitives to perform geometric calculations and hit testing.

Why are my draggable shapes failing hit detection during coordinate transformations in PixiJS?

Failing hit detection during coordinate transformations usually occurs when local and global coordinate spaces are misaligned. Applying accurate Matrix transformations ensures that hit testing correctly maps interactive points to the target shapes.