
Sprites And Images
This covers the fundamentals of working with sprites and images in Phaser 4: factory methods, texture and frame selection, and all the visual properties you'd expect like position, scale, rotation, tint, flip, alpha, origin, and depth. The documentation clearly explains when to use Image versus Sprite (basically, use Image unless you need animations, since it skips the per-frame update cost), and digs into the component mixin system that both classes share. Good reference material for the common chaining patterns and the differences from Phaser 3, like how setTintFill is gone in favor of setTint plus setTintMode. If you're building anything visual in Phaser 4, you'll be using these methods constantly.
- skills.sh installs
- 1.2K
- GitHub stars
- 40.7K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add phaserjs/phaser --skill sprites-and-images --agent claude-codeInstalls into .claude/skills of the current project.
Files
Sprites and Images
Creating and manipulating Sprite and Image game objects in Phaser 4 -- factory methods, texture/frame selection, the component mixin system, and common visual operations (position, scale, rotation, tint, flip, alpha, origin, depth).
Key source paths: src/gameobjects/sprite/, src/gameobjects/image/, src/gameobjects/GameObject.js, src/gameobjects/components/
Related skills: ../loading-assets/SKILL.md, ../animations/SKILL.md, ../physics-arcade/SKILL.md, ../game-object-components/SKILL.md
Quick Start
// In a Scene's create() method:
// Static image (no animation support, slightly cheaper)
const bg = this.add.image(400, 300, 'background');
// Sprite (supports animations)
const player = this.add.sprite(100, 200, 'player', 'idle-0');
// Common operations -- all methods return `this` for chaining
player.setPosition(200, 300);
player.setScale(2);
player.setAngle(45);
player.setTint(0xff0000);
player.setAlpha(0.8);
player.setOrigin(0, 1); // bottom-left
player.setDepth(10);
player.setFlip(true, false); // flip horizontally
player.setVisible(false);
Sponsors
Details
- Repository
- github.com/phaserjs/phaser
- Categories
- Frontend Development, Game Development
- First seen
- Jun 3, 2026