[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FBAWTEHPNZH7F31CTVEWS9":3,"skill-same:01M7FBAWTEHPNZH7F31CTVEWS9":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":45},"01M7FBAWTEHPNZH7F31CTVEWS9","pixijs-events",null,"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.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fpixijs-events\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: pixijs-events\ndescription: \"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.\"\nlicense: MIT\ndisable-model-invocation: true\n---\n\nPixiJS'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.\n\n## Quick Start\n\n```ts\nconst button = new Sprite(await Assets.load(\"button.png\"));\nbutton.eventMode = \"static\";\nbutton.cursor = \"pointer\";\napp.stage.addChild(button);\n\nbutton.on(\"pointertap\", (event) => {\n  console.log(\"clicked at\", event.global.x, event.global.y);\n});\n\nlet dragging = false;\nbutton.on(\"pointerdown\", () => {\n  dragging = true;\n});\nbutton.on(\"pointerup\", () => {\n  dragging = false;\n});\nbutton.on(\"pointerupoutside\", () => {\n  dragging = false;\n});\nbutton.on(\"globalpointermove\", (event) => {\n  if (dragging) button.parent.toLocal(event.global, undefined, button.position);\n});\n```\n\n**Related skills:** `pixijs-accessibility` (screen reader + keyboard), `pixijs-scene-dom-container` (HTML overlays), `pixijs-performance` (event-heavy scenes).\n\n## Core Patterns\n\n### eventMode values\n\n```ts\nimport { Sprite } from \"pixi.js\";\n\nconst sprite = new Sprite();\n\n\u002F\u002F No interaction at all; children also ignored\nsprite.eventMode = \"none\";\n\n\u002F\u002F Default. Self not interactive; interactive children still work\nsprite.eventMode = \"passive\";\n\n\u002F\u002F Hit tested only when a parent is interactive\nsprite.eventMode = \"auto\";\n\n\u002F\u002F Standard interaction: receives pointer\u002Fmouse\u002Ftouch events\nsprite.eventMode = \"static\";\n\n\u002F\u002F Like static, but also fires synthetic events from the ticker\n\u002F\u002F when the pointer is stationary (for animated objects under cursor)\nsprite.eventMode = \"dynamic\";\n```\n\nUse `'static'` for buttons, UI elements, and drag targets. Use `'dynamic'` only for objects that move under a stationary cursor and need continuous hover updates.\n\nUse `isInteractive()` to check whether an object can receive events:\n\n```ts\nsprite.eventMode = \"static\";\nsprite.isInteractive(); \u002F\u002F true\n\nsprite.eventMode = \"passive\";\nsprite.isInteractive(); \u002F\u002F false\n```\n\n### Event types\n\nPointer events (recommended for cross-device compatibility): `pointerdown`, `pointerup`, `pointerupoutside`, `pointermove`, `pointerover`, `pointerout`, `pointerenter`, `pointerleave`, `pointertap`, `pointercancel`.\n\nMouse events: `mousedown`, `mouseup`, `mouseupoutside`, `mousemove`, `mouseover`, `mouseout`, `mouseenter`, `mouseleave`, `click`, `rightdown`, `rightup`, `rightupoutside`, `rightclick`, `wheel`.\n\nTouch 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.\n\nGlobal move events: `globalpointermove`, `globalmousemove`, `globaltouchmove`. These fire on every pointer movement regardless of whether the pointer is over the listening object.\n\nContainer lifecycle events (no `eventMode` required): `added`, `removed`, `destroyed`, `childAdded`, `childRemoved`, `visibleChanged`.\n\n### Listening styles\n\n```ts\nimport { Sprite } from \"pixi.js\";\n\nconst sprite = new Sprite();\nsprite.eventMode = \"static\";\n\n\u002F\u002F EventEmitter style (recommended)\nconst handler = (e) => console.log(\"clicked\");\nsprite.on(\"pointerdown\", handler);\nsprite.once(\"pointerdown\", handler); \u002F\u002F one-time\nsprite.off(\"pointerdown\", handler);\n\n\u002F\u002F DOM style\nsprite.addEventListener(\n  \"click\",\n  (event) => {\n    console.log(\"Clicked!\", event.detail);\n  },\n  { once: true },\n);\n\n\u002F\u002F Property-based handlers\nsprite.onclick = (event) => {\n  console.log(\"Clicked!\", event.detail);\n};\n```\n\n### Pointer events and propagation\n\n```ts\nimport { Sprite, Container } from \"pixi.js\";\n\nconst parent = new Container();\nparent.eventMode = \"static\";\n\nconst child = new Sprite();\nchild.eventMode = \"static\";\nparent.addChild(child);\n\nchild.on(\"pointerdown\", (event) => {\n  console.log(\"child pressed\");\n  event.stopPropagation(); \u002F\u002F prevent parent from receiving this event\n});\n\nparent.on(\"pointerdown\", () => {\n  console.log(\"parent pressed (only if child did not stop propagation)\");\n});\n```\n\n### Capture phase events\n\nAll 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.\n\n```ts\ncontainer.addEventListener(\n  \"pointerdown\",\n  (event) => {\n    event.stopImmediatePropagation(); \u002F\u002F blocks event from reaching children\n  },\n  { capture: true },\n);\n```\n\n### Hit testing\n\nWhen a pointer event fires, PixiJS walks the display tree to find the top-most interactive element under the pointer. The traversal follows these rules:\n\n- `eventMode = 'none'` on a container skips that element and its entire subtree.\n- `interactiveChildren = false` on a container skips its children (the container itself can still be tested).\n- A `hitArea` overrides bounds-based testing; only the shape is checked.\n- Objects that are not visible, not renderable, or not measurable are skipped.\n\nSet a custom `hitArea` to override bounds-based testing. This also speeds up hit tests on large or complex objects by reducing the geometry checked:\n\n```ts\nimport { Sprite, Rectangle, Circle, Polygon } from \"pixi.js\";\n\nconst sprite = new Sprite();\nsprite.eventMode = \"static\";\n\n\u002F\u002F Rectangular hit area\nsprite.hitArea = new Rectangle(0, 0, 100, 50);\n\n\u002F\u002F Circular hit area\nsprite.hitArea = new Circle(50, 50, 40);\n\n\u002F\u002F Polygon hit area\nsprite.hitArea = new Polygon([0, 0, 100, 0, 50, 100]);\n\n\u002F\u002F Custom hit test via contains()\nsprite.hitArea = {\n  contains(x: number, y: number): boolean {\n    return x >= 0 && x \u003C= 100 && y >= 0 && y \u003C= 100;\n  },\n};\n```\n\n### Global move events and drag\n\n```ts\nimport { Sprite, FederatedPointerEvent } from \"pixi.js\";\n\nconst sprite = new Sprite();\nsprite.eventMode = \"static\";\nsprite.cursor = \"grab\";\n\nlet dragging = false;\n\nsprite.on(\"pointerdown\", (event: FederatedPointerEvent) => {\n  dragging = true;\n  sprite.cursor = \"grabbing\";\n});\n\n\u002F\u002F globalpointermove fires even when pointer leaves the object\nsprite.on(\"globalpointermove\", (event: FederatedPointerEvent) => {\n  if (dragging) {\n    sprite.position.set(event.global.x, event.global.y);\n  }\n});\n\nsprite.on(\"pointerup\", () => {\n  dragging = false;\n  sprite.cursor = \"grab\";\n});\n\nsprite.on(\"pointerupoutside\", () => {\n  dragging = false;\n  sprite.cursor = \"grab\";\n});\n```\n\n### Cursor styles\n\nBasic usage sets the `cursor` property per-object. For reusable cursors, register named styles on the event system:\n\n```ts\napp.renderer.events.cursorStyles.default = \"url('bunny.png'), auto\";\napp.renderer.events.cursorStyles.hover = \"url('bunny_saturated.png'), auto\";\n\nsprite.eventMode = \"static\";\nsprite.cursor = \"hover\"; \u002F\u002F uses the registered 'hover' style\n```\n\nCursor styles can be strings (CSS cursor values), objects (applied as CSS styles), or functions (called with the mode string).\n\n### Event properties\n\n`FederatedPointerEvent` carries rich input data; the more useful fields are:\n\n```ts\nsprite.on(\"pointerdown\", (event: FederatedPointerEvent) => {\n  event.global; \u002F\u002F scene-space Point where the event happened\n  event.client; \u002F\u002F CSS-pixel Point relative to the viewport\n  event.offset; \u002F\u002F Point w.r.t. target Container in world space (not supported at the moment)\n  event.target; \u002F\u002F the Container that received the event\n  event.currentTarget; \u002F\u002F the Container whose listener is running\n\n  event.pointerType; \u002F\u002F 'mouse' | 'pen' | 'touch'\n  event.pointerId; \u002F\u002F unique id for multi-touch tracking\n  event.isPrimary; \u002F\u002F first pointer in a multi-pointer gesture\n  event.pressure; \u002F\u002F 0-1 pen\u002Ftouch pressure\n  event.button; \u002F\u002F 0 left, 1 middle, 2 right\n  event.buttons; \u002F\u002F bitmask of held buttons\n  event.altKey; \u002F\u002F modifier key state\n  event.ctrlKey;\n  event.shiftKey;\n  event.metaKey;\n\n  event.nativeEvent; \u002F\u002F the underlying DOM PointerEvent \u002F MouseEvent \u002F Touch\n  event.preventDefault();\n  event.stopPropagation();\n  event.stopImmediatePropagation();\n});\n```\n\n`FederatedWheelEvent` adds `deltaX`, `deltaY`, `deltaZ`, and `deltaMode`. Wheel events fire on the same hit-tested object as pointer events.\n\n### Event features\n\nToggle event categories globally for performance:\n\n```ts\nawait app.init({\n  eventFeatures: {\n    move: true, \u002F\u002F pointer\u002Fmouse\u002Ftouch move events\n    globalMove: true, \u002F\u002F global move events (globalpointermove, etc.)\n    click: true, \u002F\u002F click\u002Ftap\u002Fpress events\n    wheel: true, \u002F\u002F mouse wheel events\n  },\n});\n\n\u002F\u002F or configure after init\napp.renderer.events.features.globalMove = false;\n```\n\n### Performance tips\n\n- Set `eventMode = 'none'` on non-interactive subtrees to skip hit testing entirely.\n- Set `interactiveChildren = false` on containers where only the container itself needs interaction.\n- Use `hitArea` on large or complex objects to replace bounds-based hit testing with a cheap shape check.\n- Prefer `'static'` for stationary elements; reserve `'dynamic'` for objects that move or animate under a stationary pointer.\n- Disable unused event features via `eventFeatures` (e.g., `globalMove: false`) to cut per-frame work.\n\n## Common Mistakes\n\n### [HIGH] Default eventMode is passive\n\nWrong:\n\n```ts\nconst sprite = new Sprite(texture);\nsprite.on(\"pointerdown\", () => {\n  console.log(\"clicked\");\n});\n```\n\nCorrect:\n\n```ts\nconst sprite = new Sprite(texture);\nsprite.eventMode = \"static\";\nsprite.on(\"pointerdown\", () => {\n  console.log(\"clicked\");\n});\n```\n\nThe 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.\n\n\n### [HIGH] buttonMode removed; use cursor\n\nWrong:\n\n```ts\nsprite.interactive = true;\nsprite.buttonMode = true;\n```\n\nCorrect:\n\n```ts\nsprite.eventMode = \"static\";\nsprite.cursor = \"pointer\";\n```\n\n`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.\n\n\n### [HIGH] Move events only fire over the object in v8\n\nWrong:\n\n```ts\nsprite.eventMode = \"static\";\nsprite.on(\"pointermove\", (event) => {\n  \u002F\u002F expects to fire everywhere; only fires inside sprite bounds\n  updateDrag(event.global.x, event.global.y);\n});\n```\n\nCorrect:\n\n```ts\nsprite.eventMode = \"static\";\nsprite.on(\"globalpointermove\", (event) => {\n  \u002F\u002F fires everywhere, even outside sprite bounds\n  updateDrag(event.global.x, event.global.y);\n});\n```\n\nIn 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`.\n\n\n### [MEDIUM] Cursor does not inherit from parent\n\nSetting `cursor` on a parent container has no effect on its children. Only the direct hit target's `cursor` value is applied.\n\n```ts\n\u002F\u002F This does NOT make children show a pointer cursor\nparent.cursor = \"pointer\";\n\n\u002F\u002F Each interactive child needs its own cursor\nchild.eventMode = \"static\";\nchild.cursor = \"pointer\";\n```\n\nIf 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.\n\n\n## API Reference\n\n- [EventSystem](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.EventSystem.html.md)\n- [FederatedEvent](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.FederatedEvent.html.md)\n- [FederatedPointerEvent](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.FederatedPointerEvent.html.md)\n- [FederatedMouseEvent](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.FederatedMouseEvent.html.md)\n- [FederatedWheelEvent](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.FederatedWheelEvent.html.md)\n- [EventBoundary](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.EventBoundary.html.md)\n","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.\n\n## Quick Start\n\n```ts\nconst button = new Sprite(await Assets.load(\"button.png\"));\nbutton.eventMode = \"static\";\nbutton.cursor = \"pointer\";\napp.stage.addChild(button);\n\nbutton.on(\"pointertap\", (event) => {\n  console.log(\"clicked at\", event.global.x, event.global.y);\n});\n\nlet dragging = false;\nbutton.on(\"pointerdown\", () => {\n  dragging = true;\n});\nbutton.on(\"pointerup\", () => {\n  dragging = false;\n});\nbutton.on(\"pointerupoutside\", () => {\n  dragging = false;\n});\nbutton.on(\"globalpointermove\", (event) => {\n  if (dragging) button.parent.toLocal(event.global, undefined, button.position);\n});\n```\n\n**Related skills:** `pixijs-accessibility` (screen reader + keyboard), `pixijs-scene-dom-container` (HTML overlays), `pixijs-performance` (event-heavy scenes).\n\n## Core Patterns\n\n### eventMode values\n\n```ts\nimport { Sprite } from \"pixi.js\";\n\nconst sprite = new Sprite();\n\n\u002F\u002F No interaction at all; children also ignored\nsprite.eventMode = \"none\";\n\n\u002F\u002F Default. Self not interactive; interactive children still work\nsprite.eventMode = \"passive\";\n\n\u002F\u002F Hit tested only when a parent is interactive\nsprite.eventMode = \"auto\";\n\n\u002F\u002F Standard interaction: receives pointer\u002Fmouse\u002Ftouch events\nsprite.eventMode = \"static\";\n\n\u002F\u002F Like static, but also fires synthetic events from the ticker\n\u002F\u002F when the pointer is stationary (for animated objects under cursor)\nsprite.eventMode = \"dynamic\";\n```\n\nUse `'static'` for buttons, UI elements, and drag targets. Use `'dynamic'` only for objects that move under a stationary cursor and need continuous hover updates.\n\nUse `isInteractive()` to check whether an object can receive events:\n\n```ts\nsprite.eventMode = \"static\";\nsprite.isInteractive(); \u002F\u002F true\n\nsprite.eventMode = \"passive\";\nsprite.isInteractive(); \u002F\u002F false\n```\n\n### Event types\n\nPointer events (recommended for cross-device compatibility): `pointerdown`, `pointerup`, `pointerupoutside`, `pointermove`, `pointerover`, `pointerout`, `pointerenter`, `pointerleave`, `pointertap`, `pointercancel`.\n\nMouse events: `mousedown`, `mouseup`, `mouseupoutside`, `mousemove`, `mouseover`, `mouseout`, `mouseenter`, `mouseleave`, `click`, `rightdown`, `rightup`, `rightupoutside`, `rightclick`, `wheel`.\n\nTouch 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.\n\nGlobal move events: `globalpointermove`, `globalmousemove`, `globaltouchmove`. These fire on every pointer movement regardless of whether the pointer is over the listening object.\n\nContainer lifecycle events (no `eventMode` required): `added`, `removed`, `destroyed`, `childAdded`, `childRemoved`, `visibleChanged`.\n\n### Listening styles\n\n```ts\nimport { Sprite } from \"pixi.js\";\n\nconst sprite = new Sprite();\nsprite.eventMode = \"static\";\n\n\u002F\u002F EventEmitter style (recommended)\nconst handler = (e) => console.log(\"clicked\");\nsprite.on(\"pointerdown\", handler);\nsprite.once(\"pointerdown\", handler); \u002F\u002F one-time\nsprite.off(\"pointerdown\", handler);\n\n\u002F\u002F DOM style\nsprite.addEventListener(\n  \"click\",\n  (event) => {\n    console.log(\"Clicked!\", event.detail);\n  },\n  { once: true },\n);\n\n\u002F\u002F Property-based handlers\nsprite.onclick = (event) => {\n  console.log(\"Clicked!\", event.detail);\n};\n```\n\n### Pointer events and propagation\n\n```ts\nimport { Sprite, Container } from \"pixi.js\";\n\nconst parent = new Container();\nparent.eventMode = \"static\";\n\nconst child = new Sprite();\nchild.eventMode = \"static\";\nparent.addChild(child);\n\nchild.on(\"pointerdown\", (event) => {\n  console.log(\"child pressed\");\n  event.stopPropagation(); \u002F\u002F prevent parent from receiving this event\n});\n\nparent.on(\"pointerdown\", () => {\n  console.log(\"parent pressed (only if child did not stop propagation)\");\n});\n```\n\n### Capture phase events\n\nAll 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.\n\n```ts\ncontainer.addEventListener(\n  \"pointerdown\",\n  (event) => {\n    event.stopImmediatePropagation(); \u002F\u002F blocks event from reaching children\n  },\n  { capture: true },\n);\n```\n\n### Hit testing\n\nWhen a pointer event fires, PixiJS walks the display tree to find the top-most interactive element under the pointer. The traversal follows these rules:\n\n- `eventMode = 'none'` on a container skips that element and its entire subtree.\n- `interactiveChildren = false` on a container skips its children (the container itself can still be tested).\n- A `hitArea` overrides bounds-based testing; only the shape is checked.\n- Objects that are not visible, not renderable, or not measurable are skipped.\n\nSet a custom `hitArea` to override bounds-based testing. This also speeds up hit tests on large or complex objects by reducing the geometry checked:\n\n```ts\nimport { Sprite, Rectangle, Circle, Polygon } from \"pixi.js\";\n\nconst sprite = new Sprite();\nsprite.eventMode = \"static\";\n\n\u002F\u002F Rectangular hit area\nsprite.hitArea = new Rectangle(0, 0, 100, 50);\n\n\u002F\u002F Circular hit area\nsprite.hitArea = new Circle(50, 50, 40);\n\n\u002F\u002F Polygon hit area\nsprite.hitArea = new Polygon([0, 0, 100, 0, 50, 100]);\n\n\u002F\u002F Custom hit test via contains()\nsprite.hitArea = {\n  contains(x: number, y: number): boolean {\n    return x >= 0 && x \u003C= 100 && y >= 0 && y \u003C= 100;\n  },\n};\n```\n\n### Global move events and drag\n\n```ts\nimport { Sprite, FederatedPointerEvent } from \"pixi.js\";\n\nconst sprite = new Sprite();\nsprite.eventMode = \"static\";\nsprite.cursor = \"grab\";\n\nlet dragging = false;\n\nsprite.on(\"pointerdown\", (event: FederatedPointerEvent) => {\n  dragging = true;\n  sprite.cursor = \"grabbing\";\n});\n\n\u002F\u002F globalpointermove fires even when pointer leaves the object\nsprite.on(\"globalpointermove\", (event: FederatedPointerEvent) => {\n  if (dragging) {\n    sprite.position.set(event.global.x, event.global.y);\n  }\n});\n\nsprite.on(\"pointerup\", () => {\n  dragging = false;\n  sprite.cursor = \"grab\";\n});\n\nsprite.on(\"pointerupoutside\", () => {\n  dragging = false;\n  sprite.cursor = \"grab\";\n});\n```\n\n### Cursor styles\n\nBasic usage sets the `cursor` property per-object. For reusable cursors, register named styles on the event system:\n\n```ts\napp.renderer.events.cursorStyles.default = \"url('bunny.png'), auto\";\napp.renderer.events.cursorStyles.hover = \"url('bunny_saturated.png'), auto\";\n\nsprite.eventMode = \"static\";\nsprite.cursor = \"hover\"; \u002F\u002F uses the registered 'hover' style\n```\n\nCursor styles can be strings (CSS cursor values), objects (applied as CSS styles), or functions (called with the mode string).\n\n### Event properties\n\n`FederatedPointerEvent` carries rich input data; the more useful fields are:\n\n```ts\nsprite.on(\"pointerdown\", (event: FederatedPointerEvent) => {\n  event.global; \u002F\u002F scene-space Point where the event happened\n  event.client; \u002F\u002F CSS-pixel Point relative to the viewport\n  event.offset; \u002F\u002F Point w.r.t. target Container in world space (not supported at the moment)\n  event.target; \u002F\u002F the Container that received the event\n  event.currentTarget; \u002F\u002F the Container whose listener is running\n\n  event.pointerType; \u002F\u002F 'mouse' | 'pen' | 'touch'\n  event.pointerId; \u002F\u002F unique id for multi-touch tracking\n  event.isPrimary; \u002F\u002F first pointer in a multi-pointer gesture\n  event.pressure; \u002F\u002F 0-1 pen\u002Ftouch pressure\n  event.button; \u002F\u002F 0 left, 1 middle, 2 right\n  event.buttons; \u002F\u002F bitmask of held buttons\n  event.altKey; \u002F\u002F modifier key state\n  event.ctrlKey;\n  event.shiftKey;\n  event.metaKey;\n\n  event.nativeEvent; \u002F\u002F the underlying DOM PointerEvent \u002F MouseEvent \u002F Touch\n  event.preventDefault();\n  event.stopPropagation();\n  event.stopImmediatePropagation();\n});\n```\n\n`FederatedWheelEvent` adds `deltaX`, `deltaY`, `deltaZ`, and `deltaMode`. Wheel events fire on the same hit-tested object as pointer events.\n\n### Event features\n\nToggle event categories globally for performance:\n\n```ts\nawait app.init({\n  eventFeatures: {\n    move: true, \u002F\u002F pointer\u002Fmouse\u002Ftouch move events\n    globalMove: true, \u002F\u002F global move events (globalpointermove, etc.)\n    click: true, \u002F\u002F click\u002Ftap\u002Fpress events\n    wheel: true, \u002F\u002F mouse wheel events\n  },\n});\n\n\u002F\u002F or configure after init\napp.renderer.events.features.globalMove = false;\n```\n\n### Performance tips\n\n- Set `eventMode = 'none'` on non-interactive subtrees to skip hit testing entirely.\n- Set `interactiveChildren = false` on containers where only the container itself needs interaction.\n- Use `hitArea` on large or complex objects to replace bounds-based hit testing with a cheap shape check.\n- Prefer `'static'` for stationary elements; reserve `'dynamic'` for objects that move or animate under a stationary pointer.\n- Disable unused event features via `eventFeatures` (e.g., `globalMove: false`) to cut per-frame work.\n\n## Common Mistakes\n\n### [HIGH] Default eventMode is passive\n\nWrong:\n\n```ts\nconst sprite = new Sprite(texture);\nsprite.on(\"pointerdown\", () => {\n  console.log(\"clicked\");\n});\n```\n\nCorrect:\n\n```ts\nconst sprite = new Sprite(texture);\nsprite.eventMode = \"static\";\nsprite.on(\"pointerdown\", () => {\n  console.log(\"clicked\");\n});\n```\n\nThe 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.\n\n\n### [HIGH] buttonMode removed; use cursor\n\nWrong:\n\n```ts\nsprite.interactive = true;\nsprite.buttonMode = true;\n```\n\nCorrect:\n\n```ts\nsprite.eventMode = \"static\";\nsprite.cursor = \"pointer\";\n```\n\n`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.\n\n\n### [HIGH] Move events only fire over the object in v8\n\nWrong:\n\n```ts\nsprite.eventMode = \"static\";\nsprite.on(\"pointermove\", (event) => {\n  \u002F\u002F expects to fire everywhere; only fires inside sprite bounds\n  updateDrag(event.global.x, event.global.y);\n});\n```\n\nCorrect:\n\n```ts\nsprite.eventMode = \"static\";\nsprite.on(\"globalpointermove\", (event) => {\n  \u002F\u002F fires everywhere, even outside sprite bounds\n  updateDrag(event.global.x, event.global.y);\n});\n```\n\nIn 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`.\n\n\n### [MEDIUM] Cursor does not inherit from parent\n\nSetting `cursor` on a parent container has no effect on its children. Only the direct hit target's `cursor` value is applied.\n\n```ts\n\u002F\u002F This does NOT make children show a pointer cursor\nparent.cursor = \"pointer\";\n\n\u002F\u002F Each interactive child needs its own cursor\nchild.eventMode = \"static\";\nchild.cursor = \"pointer\";\n```\n\nIf 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.\n\n\n## API Reference\n\n- [EventSystem](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.EventSystem.html.md)\n- [FederatedEvent](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.FederatedEvent.html.md)\n- [FederatedPointerEvent](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.FederatedPointerEvent.html.md)\n- [FederatedMouseEvent](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.FederatedMouseEvent.html.md)\n- [FederatedWheelEvent](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.FederatedWheelEvent.html.md)\n- [EventBoundary](https:\u002F\u002Fpixijs.download\u002Frelease\u002Fdocs\u002Fevents.EventBoundary.html.md)\n",{"name":5,"license":15,"description":7,"disable-model-invocation":24},true,"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","06-前端与设计\u002Fpixijs-events",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":24},[35,38,41],{"tool":36,"command":37},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill pixijs-events",{"tool":39,"command":40},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill pixijs-events",{"tool":42,"command":43},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill pixijs-events","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F06-前端与设计\u002Fpixijs-events\u002FSKILL.md",[],[47,54,59,66,73,80],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],{"skillNo":55,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]