pixijs-scene-graphics

Draw and render vector graphics with PixiJS v8 Graphics API.

302|15|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-scene-graphics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixijs-scene-graphics
Source: https://github.com/pixijs/pixijs-skills/tree/main/skills/pixijs-scene-graphics
Command: npx skills add https://github.com/pixijs/pixijs-skills --skill pixijs-scene-graphics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PixiJS v8's Graphics API enables vector drawing by separating shape construction from styling, allowing you to render complex vector scenes without manual tessellation.

Core Features & Use Cases

  • Shape primitives: rect, circle, ellipse, poly, roundRect, star, regularPoly, roundPoly, roundShape, filletRect, chamferRect.
  • Path and drawing: moveTo, lineTo, bezierCurveTo, quadraticCurveTo, arc, arcTo, arcToSvg, closePath; beginPath to reset.
  • Styling: fill, stroke, FillGradient, FillPattern, fill/stroke with gradients and textures; holes via cut(); containsPoint hits; clone, clear, and bounds.
  • Advanced topics: SVG import/export (svg), graphicsContextToSvg export, GraphicsContext sharing across multiple Graphics, transform stack, Save/Restore.

Quick Start

Create a Graphics instance, draw a rounded rectangle, and apply fill and stroke to render a styled vector shape.

Frequently Asked Questions about pixijs-scene-graphics

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

FAQPage Schema
How do I draw and render vector graphics with PixiJS v8?

To draw vector graphics with PixiJS v8, create a Graphics instance, use shape primitives like rect or circle to construct paths, and apply fill and stroke methods to render the styled scene without manual tessellation.

Can I import and export SVG files using the PixiJS Graphics API?

Yes, the PixiJS Graphics API supports SVG import and export natively. You can load SVG files directly into graphics objects and export vector scenes back to SVG format using the graphicsContextToSvg method.

Does PixiJS v8 support gradients and texture fills for vector shapes?

PixiJS v8 supports advanced styling for vector shapes including FillGradient, FillPattern, and texture fills. You can apply these styles through the fill and stroke methods when rendering graphics primitives.

How do I create holes or cut shapes in a PixiJS vector graphic?

To create holes in PixiJS vector graphics, use the cut() method after defining your base shape. This allows you to subtract one shape from another, creating complex hollow areas within your vector scene.

What is GraphicsContext sharing and how does it optimize rendering?

GraphicsContext sharing allows multiple Graphics objects to reference the same vector drawing data. This optimizes rendering performance by avoiding duplicate geometry calculations when displaying identical vector shapes across different scene locations.

Can I perform hit testing on vector graphics in PixiJS?

Yes, PixiJS supports interactive hit testing on vector graphics. The containsPoint method allows you to detect if a specific coordinate intersects with your drawn shapes, enabling precise user interactions with vector elements.