What problem does it solve?
It helps you render Phaser 4 graphics and geometric Shape game objects accurately, avoiding common mistakes with styles, angles, and object differences that lead to incorrect visuals or inefficient performance.
Core Features & Use Cases
- Graphics primitives and paths: Create filled/stroked rectangles, circles, ellipses, triangles, rounded rectangles, lines, arcs, slices, polygons, and point sets using a single Graphics object for richer procedural drawing.
- Shape objects for UI and physics-ready geometry: Use Rectangle, Circle/Arc, Ellipse, Polygon, Triangle, Star, Line, Grid, Curve, IsoBox, and IsoTriangle with proper fill/stroke setup and game-object features like origin and bounds.
- Gradients and texture baking: Apply gradient fills/lines (WebGL) and optionally generate textures from Graphics drawings for reuse when shapes are static.
Quick Start
Use the graphics-and-shapes skill to draw a filled rectangle and a stroked circle in Phaser 4, ensuring you set fillStyle or lineStyle before calling the corresponding fill or stroke methods.