pixijs-events

Handle pointer, mouse, and touch events in PixiJS with propagation control.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of implementing complex pointer, mouse, touch, and wheel interactions within PixiJS by providing guidance on event handling, hit testing, and propagation.

Core Features & Use Cases

  • Event Handling: Set up and manage various event modes, including static and dynamic interaction states on PixiJS objects.
  • Event Types & Propagation: Understand and utilize pointer, mouse, touch, and global move events, including capture and stopPropagation techniques.
  • Use Case: Configure a sprite to respond to drag gestures across the entire scene and control cursor styles dynamically based on interaction state.

Quick Start

Set eventMode to 'static' on your sprite, then listen for 'pointerdown', 'pointerup', and 'globalpointermove' events to implement dragging or custom interaction behaviors.

Frequently Asked Questions about pixijs-events

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

FAQPage Schema
How do I make a PixiJS sprite draggable across the scene?

To make a PixiJS sprite draggable, set its `eventMode` to `'static'` and listen for `'pointerdown'`, `'pointerup'`, and `'globalpointermove'` events. This enables drag gestures across the entire scene using global move tracking.

What is hit testing and how do I customize it in PixiJS?

Hit testing in PixiJS determines which object receives a pointer event. You can customize hit testing by defining a custom `hitArea` on your display objects, allowing precise control over interactive boundaries for mouse and touch events.

How do I stop event propagation in PixiJS interactive scenes?

You stop event propagation in PixiJS by using capture and stopPropagation techniques during event handling. This prevents pointer and mouse events from bubbling to parent containers, enabling advanced interaction models within complex scenes.

Does PixiJS support touch and pointer events for mobile UI?

Yes, PixiJS supports detailed handling of pointer, mouse, and touch events for mobile UI. By configuring `eventMode` to `'static'`, you can manage dynamic interaction states and cursor styles for interactive scenes and UI elements.

Why do my PixiJS pointer events require setting eventMode?

PixiJS pointer events require setting `eventMode` to `'static'` to explicitly enable interaction on display objects. This ensures safe event setup and allows the object to receive pointerdown, pointerup, and globalpointermove events for dynamic graphics.

What is the best way to manage global pointer move events in PixiJS?

The best way to manage global pointer move events in PixiJS is listening to `'globalpointermove'` on a static event object. This tracks movement across the entire scene, ensuring performance optimizations while maintaining advanced interaction models.