sprites-and-images

Create and manipulate Sprite and Image objects in Phaser 4.

Updated Feb 11, 2026
One-click install
npx skills add https://github.com/ArtRiv/game-topicos-especiais --skill sprites-and-images-artriv
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sprites-and-images
Source: https://github.com/ArtRiv/game-topicos-especiais/tree/main/skills/sprites-and-images
Command: npx skills add https://github.com/ArtRiv/game-topicos-especiais --skill sprites-and-images-artriv

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you create and manipulate visual Sprite and Image objects in Phaser 4 without getting lost in the many component mixins and rendering-related APIs.

Core Features & Use Cases

  • Sprite vs Image selection: Choose Image when you don’t need per-frame animation updates, and Sprite when you do.
  • Texture, frames, and cropping: Switch textures/frames safely, and crop regions of the texture for focused visuals.
  • Visual transformations: Control position, scale, rotation/angle, origin, depth ordering, flip, tint, and alpha in a consistent way.
  • Component-mixin understanding: Use the correct method source (e.g., Alpha, Tint, Transform) to avoid confusion about where properties come from.
  • Quick integration examples: Common object creation patterns using this.add.image and this.add.sprite, including method chaining.

Quick Start

Create an Image or Sprite in your Scene and chain visual setup like texture, frame, scale, tint, alpha, origin, depth, and flip using methods supported by Phaser 4’s component mixins.

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 configure Phaser sprites and images with visual transforms?

To create Phaser sprites and images, use `this.add.image` or `this.add.sprite` in your Scene and chain methods for texture, scale, tint, alpha, origin, depth, and flip using Phaser 4 component mixins like Transform and Alpha.

When should I use an Image instead of a Sprite in Phaser 4?

Use a Phaser 4 Image when you do not need per-frame animation updates, and choose a Sprite when your game object requires animation. This distinction optimizes rendering logic and component mixin behavior for your specific visual needs.

How do I apply tint, alpha, and cropping to a Phaser game object?

You apply tint, alpha, and cropping to Phaser game objects by invoking the correct component mixin methods such as Tint, Alpha, and TextureCrop. These configure the visual render state directly on the created sprite or image instance.

Can I switch textures and frames safely on an existing Phaser sprite?

Yes, you can switch textures and frames safely on an existing Phaser sprite. The Skill provides patterns for texture and frame selection along with cropping regions, ensuring your visual updates apply correctly through Phaser 4 object methods.

Why are my sprite properties scattered across different methods in Phaser 4?

Sprite properties are scattered because Phaser 4 uses component mixins like Transform, Origin, Depth, Flip, Size, and BlendMode. Understanding which mixin provides each property helps you avoid confusion about where specific visual manipulation methods originate.

What's the best way to manage depth and scroll factor for Phaser textures?

The best way to manage depth and scroll factor for Phaser textures is to use the Depth and ScrollFactor component mixins. These allow you to control rendering order and camera scrolling behavior consistently on your sprite and image objects.