Agent skill

Pixijs Events

by netaart in netaart/cohub

A skill your agent uses when handling pointer, mouse, touch, or wheel input in PixiJS v8.

MITAuto-check passed

Install Pixijs Events

skills CLI
$ npx skills add netaart/cohub --skill pixijs-events -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install netaart/cohub pixijs-events --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/netaart/cohub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pixijs-events .claude/skills/pixijs-events && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pixijs-events
GitHub stars
572
Used in
1 other repo
Token cost
~3.1k tokens
SKILL.md length
665 words
Files
1
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when handling pointer, mouse, touch, or wheel input in PixiJS v8.

  • Handling pointer
  • SKILL.md covers Quick Start, Core Patterns, Common Mistakes and API Reference
  • Calls cursor
  • Wheel input in PixiJS v8

What it does

Pixijs Events is an agent skill from netaart/cohub. Use this skill when handling pointer, mouse, touch, or wheel input in PixiJS v8. Covers eventMode (none, passive, auto, static, dynamic), FederatedEvent types, propagation and capture phase, hitArea, interactiveChildren, cursor and cursorStyles, global move events for drag, eventFeatures config. Triggers on: eventMode, FederatedPointerEvent, pointerdown, click, tap, globalpointermove, drag, hitArea, cursor, stopPropagation.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A living space where people and agents create, play, and build together. The licence is MIT.

When your agent uses it

  • Handling pointer
  • Wheel input in PixiJS v8
  • FederatedPointerEvent
  • Globalpointermove

Example prompts

  • “/pixijs-events”

What it can do on your machine

Read from SKILL.md and the folder at commit eee4291. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • cursor

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • pixijs.download

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pixijs Events loads about 3.1k tokens when it runs. Until then it costs about 110 tokens; SKILL.md has 665 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~110
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from netaart/cohub at commit eee4291, republished under its MIT licence (© netaart). 665 words, ~3,077 tokens.

Download SKILL.mdSave it as .claude/skills/pixijs-events/SKILL.md (or your agent's skills folder).
name
pixijs-events
description
Use this skill when handling pointer, mouse, touch, or wheel input in PixiJS v8. Covers eventMode (none, passive, auto, static, dynamic), FederatedEvent types, propagation and capture phase, hitArea, interactiveChildren, cursor and cursorStyles, global move events for drag, eventFeatures config. Triggers on: eventMode, FederatedPointerEvent, pointerdown, click, tap, globalpointermove, drag, hitArea, cursor, stopPropagation.
license
MIT
disable-model-invocation
true

PixiJS's federated event system mirrors DOM events on the scene graph. Set container.eventMode = 'static' to opt an object in, then listen with .on(), addEventListener(), or onEventName property handlers. Move events fire only over the listening object; use globalpointermove for drag.

Quick Start

ts
const button = new Sprite(await Assets.load("button.png"));
button.eventMode = "static";
button.cursor = "pointer";
app.stage.addChild(button);

button.on("pointertap", (event) => {
  console.log("clicked at", event.global.x, event.global.y);
});

let dragging = false;
button.on("pointerdown", () => {
  dragging = true;
});
button.on("pointerup", () => {
  dragging = false;
});
button.on("pointerupoutside", () => {
  dragging = false;
});
button.on("globalpointermove", (event) => {
  if (dragging) button.parent.toLocal(event.global, undefined, button.position);
});

Related skills: pixijs-accessibility (screen reader + keyboard), pixijs-scene-dom-container (HTML overlays), pixijs-performance (event-heavy scenes).

Core Patterns

eventMode values
ts
import { Sprite } from "pixi.js";

const sprite = new Sprite();

// No interaction at all; children also ignored
sprite.eventMode = "none";

// Default. Self not interactive; interactive children still work
sprite.eventMode = "passive";

// Hit tested only when a parent is interactive
sprite.eventMode = "auto";

// Standard interaction: receives pointer/mouse/touch events
sprite.eventMode = "static";

// Like static, but also fires synthetic events from the ticker
// when the pointer is stationary (for animated objects under cursor)
sprite.eventMode = "dynamic";

Use 'static' for buttons, UI elements, and drag targets. Use 'dynamic' only for objects that move under a stationary cursor and need continuous hover updates.

Use isInteractive() to check whether an object can receive events:

ts
sprite.eventMode = "static";
sprite.isInteractive(); // true

sprite.eventMode = "passive";
sprite.isInteractive(); // false
Event types

Pointer events (recommended for cross-device compatibility): pointerdown, pointerup, pointerupoutside, pointermove, pointerover, pointerout, pointerenter, pointerleave, pointertap, pointercancel.

Mouse events: mousedown, mouseup, mouseupoutside, mousemove, mouseover, mouseout, mouseenter, mouseleave, click, rightdown, rightup, rightupoutside, rightclick, wheel.

Touch events: touchstart, touchend, touchendoutside, touchmove, touchcancel, tap. Each touch carries altKey, ctrlKey, metaKey, and shiftKey copied from the native TouchEvent, so modifier keys work the same as with mouse or pointer events.

Global move events: globalpointermove, globalmousemove, globaltouchmove. These fire on every pointer movement regardless of whether the pointer is over the listening object.

Container lifecycle events (no eventMode required): added, removed, destroyed, childAdded, childRemoved, visibleChanged.

Listening styles
ts
import { Sprite } from "pixi.js";

const sprite = new Sprite();
sprite.eventMode = "static";

// EventEmitter style (recommended)
const handler = (e) => console.log("clicked");
sprite.on("pointerdown", handler);
sprite.once("pointerdown", handler); // one-time
sprite.off("pointerdown", handler);

// DOM style
sprite.addEventListener(
  "click",
  (event) => {
    console.log("Clicked!", event.detail);
  },
  { once: true },
);

// Property-based handlers
sprite.onclick = (event) => {
  console.log("Clicked!", event.detail);
};
Pointer events and propagation
ts
import { Sprite, Container } from "pixi.js";

const parent = new Container();
parent.eventMode = "static";

const child = new Sprite();
child.eventMode = "static";
parent.addChild(child);

child.on("pointerdown", (event) => {
  console.log("child pressed");
  event.stopPropagation(); // prevent parent from receiving this event
});

parent.on("pointerdown", () => {
  console.log("parent pressed (only if child did not stop propagation)");
});
Capture phase events

All events support capture phase by appending capture to the event name (e.g., pointerdowncapture, clickcapture). Capture listeners fire during the capturing phase, before the event reaches its target.

ts
container.addEventListener(
  "pointerdown",
  (event) => {
    event.stopImmediatePropagation(); // blocks event from reaching children
  },
  { capture: true },
);
Hit testing

When a pointer event fires, PixiJS walks the display tree to find the top-most interactive element under the pointer. The traversal follows these rules:

  • eventMode = 'none' on a container skips that element and its entire subtree.
  • interactiveChildren = false on a container skips its children (the container itself can still be tested).
  • A hitArea overrides bounds-based testing; only the shape is checked.
  • Objects that are not visible, not renderable, or not measurable are skipped.

Set a custom hitArea to override bounds-based testing. This also speeds up hit tests on large or complex objects by reducing the geometry checked:

ts
import { Sprite, Rectangle, Circle, Polygon } from "pixi.js";

const sprite = new Sprite();
sprite.eventMode = "static";

// Rectangular hit area
sprite.hitArea = new Rectangle(0, 0, 100, 50);

// Circular hit area
sprite.hitArea = new Circle(50, 50, 40);

// Polygon hit area
sprite.hitArea = new Polygon([0, 0, 100, 0, 50, 100]);

// Custom hit test via contains()
sprite.hitArea = {
  contains(x: number, y: number): boolean {
    return x >= 0 && x <= 100 && y >= 0 && y <= 100;
  },
};
Global move events and drag
ts
import { Sprite, FederatedPointerEvent } from "pixi.js";

const sprite = new Sprite();
sprite.eventMode = "static";
sprite.cursor = "grab";

let dragging = false;

sprite.on("pointerdown", (event: FederatedPointerEvent) => {
  dragging = true;
  sprite.cursor = "grabbing";
});

// globalpointermove fires even when pointer leaves the object
sprite.on("globalpointermove", (event: FederatedPointerEvent) => {
  if (dragging) {
    sprite.position.set(event.global.x, event.global.y);
  }
});

sprite.on("pointerup", () => {
  dragging = false;
  sprite.cursor = "grab";
});

sprite.on("pointerupoutside", () => {
  dragging = false;
  sprite.cursor = "grab";
});
Cursor styles

Basic usage sets the cursor property per-object. For reusable cursors, register named styles on the event system:

ts
app.renderer.events.cursorStyles.default = "url('bunny.png'), auto";
app.renderer.events.cursorStyles.hover = "url('bunny_saturated.png'), auto";

sprite.eventMode = "static";
sprite.cursor = "hover"; // uses the registered 'hover' style

Cursor styles can be strings (CSS cursor values), objects (applied as CSS styles), or functions (called with the mode string).

Event properties

FederatedPointerEvent carries rich input data; the more useful fields are:

ts
sprite.on("pointerdown", (event: FederatedPointerEvent) => {
  event.global; // scene-space Point where the event happened
  event.client; // CSS-pixel Point relative to the viewport
  event.offset; // Point w.r.t. target Container in world space (not supported at the moment)
  event.target; // the Container that received the event
  event.currentTarget; // the Container whose listener is running

  event.pointerType; // 'mouse' | 'pen' | 'touch'
  event.pointerId; // unique id for multi-touch tracking
  event.isPrimary; // first pointer in a multi-pointer gesture
  event.pressure; // 0-1 pen/touch pressure
  event.button; // 0 left, 1 middle, 2 right
  event.buttons; // bitmask of held buttons
  event.altKey; // modifier key state
  event.ctrlKey;
  event.shiftKey;
  event.metaKey;

  event.nativeEvent; // the underlying DOM PointerEvent / MouseEvent / Touch
  event.preventDefault();
  event.stopPropagation();
  event.stopImmediatePropagation();
});

FederatedWheelEvent adds deltaX, deltaY, deltaZ, and deltaMode. Wheel events fire on the same hit-tested object as pointer events.

Show full SKILL.md (261 more words)Show less
Event features

Toggle event categories globally for performance:

ts
await app.init({
  eventFeatures: {
    move: true, // pointer/mouse/touch move events
    globalMove: true, // global move events (globalpointermove, etc.)
    click: true, // click/tap/press events
    wheel: true, // mouse wheel events
  },
});

// or configure after init
app.renderer.events.features.globalMove = false;
Performance tips
  • Set eventMode = 'none' on non-interactive subtrees to skip hit testing entirely.
  • Set interactiveChildren = false on containers where only the container itself needs interaction.
  • Use hitArea on large or complex objects to replace bounds-based hit testing with a cheap shape check.
  • Prefer 'static' for stationary elements; reserve 'dynamic' for objects that move or animate under a stationary pointer.
  • Disable unused event features via eventFeatures (e.g., globalMove: false) to cut per-frame work.

Common Mistakes

[HIGH] Default eventMode is passive

Wrong:

ts
const sprite = new Sprite(texture);
sprite.on("pointerdown", () => {
  console.log("clicked");
});

Correct:

ts
const sprite = new Sprite(texture);
sprite.eventMode = "static";
sprite.on("pointerdown", () => {
  console.log("clicked");
});

The default eventMode is 'passive', which means the object itself receives no events. You must explicitly set eventMode to 'static' or 'dynamic' before any listener will fire.

[HIGH] buttonMode removed; use cursor

Wrong:

ts
sprite.interactive = true;
sprite.buttonMode = true;

Correct:

ts
sprite.eventMode = "static";
sprite.cursor = "pointer";

buttonMode was removed in v8. Use cursor = 'pointer' to show a hand cursor on hover. interactive = true still works as an alias for eventMode = 'static', but eventMode is preferred.

[HIGH] Move events only fire over the object in v8

Wrong:

ts
sprite.eventMode = "static";
sprite.on("pointermove", (event) => {
  // expects to fire everywhere; only fires inside sprite bounds
  updateDrag(event.global.x, event.global.y);
});

Correct:

ts
sprite.eventMode = "static";
sprite.on("globalpointermove", (event) => {
  // fires everywhere, even outside sprite bounds
  updateDrag(event.global.x, event.global.y);
});

In v8, pointermove, mousemove, and touchmove only fire when the pointer is over the display object. In v7 they fired on any canvas move. For drag operations or global tracking, use globalpointermove, globalmousemove, or globaltouchmove.

[MEDIUM] Cursor does not inherit from parent

Setting cursor on a parent container has no effect on its children. Only the direct hit target's cursor value is applied.

ts
// This does NOT make children show a pointer cursor
parent.cursor = "pointer";

// Each interactive child needs its own cursor
child.eventMode = "static";
child.cursor = "pointer";

If you want a uniform cursor for all children, set cursor on each interactive child individually, or set hitArea on the parent and make children non-interactive.

API Reference

© netaart, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/pixijs-events of netaart/cohub.

Open the folder on GitHubat commit eee4291

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in netaart/cohub, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Pixijs Events next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pixijs Events compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pixijs Events this skillnetaart/cohub5721 repos~3.1kAutomated safety check: PassMIT
Eventscoreyhaines31/marketingskills54k—~3kAutomated safety check: PassMIT
No Pointerremotion-dev/remotion63k—~532Automated safety check: PassCustom licence
Event Sourcing Architectdavila7/claude-code-templates33k4 repos~659Automated safety check: PassMIT
Event Store Designwshobson/agents40k9 repos~828Automated safety check: PassMIT
Event Delegationthedaviddias/Front-End-Checklist74k—~500Automated safety check: PassMIT

Similar skills

  • Events

    coreyhaines31/marketingskills

    When the user wants to plan, run, sponsor, speak at, or get pipeline from events — webinars, conferences, trade shows, meetups, dinners, workshops, virtual summits, or user conferences.

    54k GitHub stars~3k tokensUpdated 2 days ago
    Marketing & SEOAuto-check passed
  • No Pointer

    remotion-dev/remotion

    Official

    Apply Remotion Studio's pointerless interaction styling to clickable controls.

    63k GitHub stars~532 tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Event Sourcing Architect

    davila7/claude-code-templates

    Expert in event sourcing, CQRS, and event-driven architecture patterns.

    33k GitHub starsUsed in 4 repos~659 tokens
    Backend & APIsAuto-check passed
  • Event Store Design

    wshobson/agents

    Designs event stores for event-sourced systems: requirements, a comparison of EventStoreDB, PostgreSQL, Kafka, DynamoDB and Marten, and stream and versioning practices.

    40k GitHub starsUsed in 9 repos~828 tokens
    Backend & APIsAuto-check passed
  • Event Delegation

    thedaviddias/Front-End-Checklist

    A skill your agent uses when reviewing scripts, client components, bundles, or runtime behavior related to Use event delegation for dynamic content.

    74k GitHub stars~500 tokensUpdated 4 days ago
    Auto-check passed
  • Scores news, announcements and macro events with the LLM, stores them in an event CSV and blends the decaying event signal with technical signals in signal_engine.py.

    35k GitHub stars~2.1k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed

More from netaart/cohub

All 30 skills in this repo
  • Pixijs Assets

    netaart/cohub

    A skill your agent uses when loading and managing resources in PixiJS v8.

    572 GitHub starsUsed in 1 repo~5k tokens
    Auto-check passed
  • A skill your agent uses when reasoning about the PixiJS v8 scene graph as a whole: how containers, leaves, transforms, and render order fit together.

    572 GitHub starsUsed in 1 repo~3.9k tokens
    Auto-check passed
  • Pixijs Scene Mesh

    netaart/cohub

    A skill your agent uses when rendering custom geometry in PixiJS v8.

    572 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Pixijs Scene Sprite

    netaart/cohub

    A skill your agent uses when drawing images in PixiJS v8. An agent skill from netaart/cohub.

    572 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Pixijs Scene Text

    netaart/cohub

    A skill your agent uses when rendering text in PixiJS v8. An agent skill from netaart/cohub.

    572 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • A skill your agent uses when understanding how PixiJS v8 renders frames: the systems-and-pipes renderer, the render loop, and how the library adapts to different environments.

    572 GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Questions about Pixijs Events

What does Pixijs Events do?

A skill your agent uses when handling pointer, mouse, touch, or wheel input in PixiJS v8. Pixijs Events is an agent skill from netaart/cohub. Use this skill when handling pointer, mouse, touch, or wheel input in PixiJS v8.

When should I use Pixijs Events?

Pixijs Events fits situations like: handling pointer; wheel input in PixiJS v8; federatedPointerEvent; globalpointermove.

How do I install Pixijs Events in Claude Code?

Run `npx skills add netaart/cohub --skill pixijs-events -a claude-code`. Or copy the skill folder (.agents/skills/pixijs-events in netaart/cohub) into .claude/skills/pixijs-events in your project. Claude Code loads it when a task matches its description.

How do I install Pixijs Events in Codex?

Run `npx skills add netaart/cohub --skill pixijs-events -a codex`. Or copy the skill folder (.agents/skills/pixijs-events in netaart/cohub) into .agents/skills/pixijs-events in your project. Codex loads it when a task matches its description.

Can I use Pixijs Events in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add netaart/cohub --skill pixijs-events -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pixijs-events, .gemini/skills/pixijs-events, .github/skills/pixijs-events and .opencode/skills/pixijs-events in your project.

What does Pixijs Events need to run?

Going by SKILL.md and its folder, Pixijs Events needs the command-line tools its instructions call (cursor).

Does Pixijs Events access the network?

SKILL.md names 1 domain. As links in the text: pixijs.download. This is read from the text; nothing was executed.

Is Pixijs Events safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pixijs Events use?

Pixijs Events is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pixijs Events use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pixijs Events?

Skills that share tags, products or a category with Pixijs Events: Events (coreyhaines31/marketingskills, 54k stars), No Pointer (remotion-dev/remotion, 63k stars), Event Sourcing Architect (davila7/claude-code-templates, 33k stars) and Event Store Design (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pixijs Events?

netaart (a GitHub organization) maintains it in netaart/cohub, which has 572 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on October 10, 2026.

Source: netaart/cohub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.