scale-and-responsive

Scale and resize Phaser 4 games via ScaleManager with centering, fullscreen, and orientation handling.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/kehwar/pixi-square --skill scale-and-responsive-kehwar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scale-and-responsive
Source: https://github.com/kehwar/pixi-square/tree/main/.agents/skills/scale-and-responsive
Command: npx skills add https://github.com/kehwar/pixi-square --skill scale-and-responsive-kehwar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Phaser 4 games often struggle to adapt to different screen sizes and devices, causing UI and gameplay elements to appear misaligned or off-screen.

Core Features & Use Cases

  • ScaleManager integration with common modes (FIT, RESIZE, ENVELOP, etc.) to maintain aspect ratio and fit within parent containers.
  • Auto-centering, fullscreen toggles, and orientation handling to provide a consistent user experience across devices.
  • Responsive resize event handling to update cameras and UI when the display area changes, such as window resize or device rotation.

Quick Start

Configure your game with a FIT scale mode and auto-centering, then listen for resize events to adjust cameras and UI accordingly.

Frequently Asked Questions about scale-and-responsive

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

FAQPage Schema
How do I make a Phaser 4 game responsive across different screen sizes?▼

Responsive Phaser 4 games use the ScaleManager to configure scaling modes like FIT or RESIZE, applying auto-centering and resize event handling to adjust cameras and UI dynamically across screen sizes.

What is the best way to handle device orientation changes in Phaser 4?▼

Device orientation changes in Phaser 4 are handled by listening for resize events triggered by rotation, allowing you to update camera views and UI layouts to maintain a consistent user experience.

How do I configure ScaleManager in Phaser 4 to maintain aspect ratio?▼

ScaleManager maintains aspect ratio by using the FIT scale mode within parent containers, ensuring the game scales proportionally while auto-centering prevents misalignment on various displays.

Does Phaser 4 support fullscreen toggles and auto-centering for gameplay?▼

Fullscreen toggles and auto-centering are supported in Phaser 4 through ScaleManager, providing consistent rendering and reliable user experiences across different display areas and aspect ratios.

Why do my Phaser 4 UI elements appear misaligned off-screen on mobile devices?▼

Misaligned UI elements occur when games lack responsive resize event handling, which requires ScaleManager integration to update camera and UI positions when the display area changes.

Can I use RESIZE and ENVELOP scale modes for dynamic UI layouts in Phaser 4?▼

Dynamic UI layouts in Phaser 4 utilize RESIZE and ENVELOP scale modes to adapt the rendering area, ensuring responsive gameplay elements fit properly within varying parent container dimensions.