[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CSRNJZPBN8HHY8QBSWDDH8":3,"skill-same:01M7CSRNJZPBN8HHY8QBSWDDH8":52},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7CSRNJZPBN8HHY8QBSWDDH8","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.","om-scogo\u002Fskillsh-scraper","om-scogo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F160466840?v=4","01M79AWB6DFVCQ7RK70CS34B96","Om Achrekar","01M79AWB6ZM9SKR8KDH1WSSM22",0,"MIT","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fpixijs-pixijs-skills\u002Fpixijs-events\u002FSkill.md",[],[],"2026-11-15 14:19:17",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\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},"main","8859218955d9504cd18b59e7892100718039d3b4","data\u002Fskills\u002Fpixijs-pixijs-skills\u002Fpixijs-events",1,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper","https:\u002F\u002Fgithub.com\u002Fom-scogo","SDE-1 @ Scogo ","2026-07-18 12:22:46",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add om-scogo\u002Fskillsh-scraper --skill pixijs-events",{"tool":38,"command":39},"bunx","bunx skills add om-scogo\u002Fskillsh-scraper --skill pixijs-events",{"tool":41,"command":42},"pnpm","pnpm dlx skills add om-scogo\u002Fskillsh-scraper --skill pixijs-events","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fpixijs-pixijs-skills\u002Fpixijs-events\u002FSkill.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"metadata.json","REFERENCE","参考文档",437,"https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fpixijs-pixijs-skills\u002Fpixijs-events\u002Fmetadata.json",[53,60,65,72,77,84],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7D6MC9FAAEV4CMNYX8W7JTG","arxiv-search","Search arXiv physics, math, and computer science preprints using natural language queries. Powered by Valyu semantic search.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002Fskills\u002Farxiv-search\u002FSKILL.md",[],[],{"skillNo":61,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7D6M85CKKN87TA98VCQV4H7","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fyorkeccak-scientific-skills\u002Farxiv-search\u002FSkill.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7D4ZTCS4DR3CE4JY06X84T2","working-with-legacy-code","Safely change and test untested codebases using Feathers' \"Working Effectively with Legacy Code\". Use when the user mentions \"legacy code\", \"no tests\", \"untested codebase\", \"how do I test this\", \"seams\", \"characterization tests\", \"golden master\", \"sprout method\", \"afraid to change this code\", \"monster method\", \"dependency breaking\", or \"inherited a messy codebase\". Also trigger when changing code without tests safely, getting a class under test when constructors, statics, or singletons block it, adding features to tangled modules, or planning incremental test coverage for an old codebase. Covers the legacy-code change algorithm, seams, characterization tests, sprout\u002Fwrap, and dependency-breaking techniques. For refactoring code that already has tests, see refactoring-patterns. For day-to-day code quality, see clean-code.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002Fworking-with-legacy-code\u002FSKILL.md",[],[],{"skillNo":73,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7D4ZHZKJD2RSNGAF63V14P4","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fworking-with-legacy-code\u002FSkill.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7D4ZB4CJBFW5JE67CPH2QRV","web-typography","Select, pair, and implement typefaces for web projects. Use when the user mentions \"font pairing\", \"which typeface\", \"line height\", \"responsive typography\", \"web font loading\", \"type hierarchy\", \"variable fonts\", \"FOUT\u002FFOIT\", \"typographic scale\", or \"the text is hard to read\". Also trigger when choosing between system fonts and web fonts, optimizing font-loading performance, or designing readable long-form content. Covers readability evaluation, CSS implementation, and performance optimization. For overall UI design systems, see refactoring-ui. For dramatic typographic experiences, see top-design.","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002Fweb-typography\u002FSKILL.md",[],[],{"skillNo":85,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7D4Z4MVYVY3NMJ18BNV6WNA","https:\u002F\u002Fgithub.com\u002Fom-scogo\u002Fskillsh-scraper\u002Fblob\u002Fmain\u002Fdata\u002Fskills\u002Fwondelai-skills\u002Fweb-typography\u002FSkill.md",[],[]]