graphics-and-shapes

Draw dynamic shapes and graphics in Phaser 4 using Graphics and Shape objects.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/GiantCroissant-Lunar/proto-breakout --skill graphics-and-shapes-giantcroissant-lunar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphics-and-shapes
Source: https://github.com/GiantCroissant-Lunar/proto-breakout/tree/main/.agent/skills/01-phaser/graphics-and-shapes
Command: npx skills add https://github.com/GiantCroissant-Lunar/proto-breakout --skill graphics-and-shapes-giantcroissant-lunar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Phaser projects often rely on textured assets, but for UI and lightweight visuals you want immediate shapes and primitives without creating textures. This Skill provides a structured approach to drawing graphics and shape objects using Phaser 4 Graphics and Shape APIs, enabling dynamic visuals, debugging aids, and lightweight UI elements without asset pipelines.

Core Features & Use Cases

  • Draws a variety of primitives (rectangles, circles, ellipses, triangles, polygons) using Graphics and Shape objects.
  • Supports path drawing, gradients, and per-shape styling, with options to generate textures for reuse.
  • Use cases include HUD indicators, debug overlays, procedural UI, and lightweight decorative elements in 2D Phaser games.

Quick Start

Draw a filled rectangle and a stroked circle using Phaser 4's Graphics and Shape objects.

Frequently Asked Questions about graphics-and-shapes

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

FAQPage Schema
How do I draw dynamic shapes and primitives in Phaser 4?

Generate reusable textures from Phaser 4 Graphics by calling the generateTexture API after drawing and styling your shapes. This allows you to cache dynamic graphics as standard textures for repeated use across your 2D scenes.

Can I use Phaser 4 Graphics for UI elements and HUD indicators?

Yes, you can use Phaser 4 Graphics and Shape objects to create procedural UI elements, HUD indicators, and debug overlays. They replace traditional asset pipelines by styling lightweight decorative primitives directly in your 2D scenes.

Do I need external libraries to render 2D graphics in Phaser 4?

No external libraries are needed to render 2D graphics in Phaser 4. This Skill requires only the Phaser 4 core libraries and uses the built-in Graphics and Shape APIs to draw, style, and fill primitives directly within your game scenes.

What is the best way to draw iso shapes and grids in Phaser 4?

The best way to draw iso shapes and grids in Phaser 4 is by using the Graphics and Shape APIs to construct custom polygons and paths. This supports per-shape styling and path drawing for complex decorative elements without textures.