graphics-and-shapes

Draw shape primitives and graphics in Phaser 4 using Graphics and Shape objects.

Updated Apr 20, 2026
One-click install
npx skills add https://github.com/Raphe-dev/phaser-cozy-mmo --skill graphics-and-shapes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphics-and-shapes
Source: https://github.com/Raphe-dev/phaser-cozy-mmo/tree/main/skills/graphics-and-shapes
Command: npx skills add https://github.com/Raphe-dev/phaser-cozy-mmo --skill graphics-and-shapes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Draw shape primitives and graphics in Phaser 4 using Graphics and Shape objects.

Core Features & Use Cases

  • Supports fill and stroke styles, gradients, path drawing, and texture generation via generateTexture using both Graphics and Shape objects.
  • Applicable to dynamic overlays, UI indicators, debug visuals, tutorials, and procedural textures in Phaser games.
  • Use cases include creating HUD elements, in-game indicators, and on-the-fly visual debugging.

Quick Start

Create a Graphics object and draw a filled rectangle and a stroked circle.

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 shape primitives and graphics in Phaser 4?

Use Graphics and Shape objects in Phaser 4 to draw shape primitives with fill and stroke styles, gradients, and path drawing. This approach supports dynamic overlays, UI indicators, and debug visuals.

Can I generate textures procedurally in Phaser 4?

Yes, generate procedural textures in Phaser 4 using the generateTexture method. This method works with both Graphics and Shape objects to create textures on the fly for game overlays and UI elements.

What's the best way to create in-game HUD elements and debug visuals in Phaser?

Creating in-game HUD elements and debug visuals is best handled by drawing shape primitives with Graphics and Shape objects. This allows dynamic overlays and visual debugging directly in your Phaser game.

Does Phaser 4 support gradients and path drawing for game graphics?

Phaser 4 supports gradients and path drawing through its Graphics and Shape objects. These features enable detailed visual styling for dynamic overlays, tutorials, and procedural textures.

When should I use Graphics objects versus Shape objects in Phaser 4?

Use Graphics and Shape objects in Phaser 4 for dynamic overlays, UI indicators, and procedural textures. Both support fill and stroke styles, gradients, and texture generation via generateTexture.