sprites-and-images

Create and manipulate Phaser 4 Sprites and Images with transforms, tint, alpha, origin, and depth.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Creating and manipulating Sprites and Images in Phaser 4 can require juggling multiple APIs and lower-level details. This Skill provides a cohesive approach that unifies creation, transform, and rendering aspects under a consistent API and component system.

Core Features & Use Cases

  • Factory methods for creating Sprites and Images (this.add.sprite, this.add.image) with built-in transform support (position, scale, rotation).
  • Texture and frame management, tinting, alpha, origin, depth, and the component mixin system that applies common behavior across objects.
  • Use Case: rapidly assemble characters with static or animated visuals, apply consistent rendering order, and reuse component-driven capabilities across different game objects.

Quick Start

Instantiate a sprite in a scene with this.add.sprite(x, y, 'player', 'idle-0') and chain common setup calls like setPosition, setScale, and setTint.

Frequently Asked Questions about sprites-and-images

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

FAQPage Schema
How do I create and transform Phaser sprites in a game scene?

Create Phaser sprites using this.add.sprite(x, y, 'texture', 'frame') and chain transform methods like setPosition, setScale, and setRotation to manipulate game objects directly within your scene.

What's the difference between Phaser sprites and images for rendering game objects?

Sprites and images are both Phaser game objects, but sprites support animation frames while images are static. Both utilize the same component mixins for transform, tint, alpha, origin, and depth rendering.

Do I need Phaser 4 to use this sprite and image component system?

Yes, this sprite and image creation system requires Phaser 4. It relies on Phaser 4's component mixin system, accessing textures and frames to apply Transform, Tint, Alpha, Origin, and Depth behaviors.

How do I apply tint and alpha to game objects in Phaser?

Apply tint and alpha to Phaser game objects by chaining setTint and alpha modification methods during sprite creation. These rendering styles are managed through Phaser 4's built-in component mixins.

Can I reuse transform and rendering components across different Phaser game objects?

You can reuse component-driven capabilities across Phaser game objects. The mixin system consistently applies Transform, Tint, Alpha, Origin, and Depth behaviors, allowing rapid assembly of characters with shared rendering logic.

Why are my Phaser sprites not displaying the correct texture frame?

Phaser sprites require correct texture and frame management to display properly. Ensure the frame key exists in the loaded texture and pass it during this.add.sprite instantiation to avoid rendering issues.