Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Game Objects
/
Images
Phaser 4.1.0
Phaser 4 examples
Images
16
examples
Examples
16
Custom Game Object
Extend a built-in Sprite class and register it with the Game Object Factory to enable shorthand creation and custom internal update logic.
Custom Image Class
Learn how to extend the Phaser Image class to create your own custom game object types and add them to the Scene.
Custom Image Class with ES6
Demonstrates how to create a custom game object by extending the Image class using ES6 syntax and adding instances to the scene.
Destroy an Image
Demonstrates how to permanently remove an Image Game Object from a Scene using the destroy method, including how to safely check for the object's existence in the update loop.
Flip Image
Demonstrates how to flip a Game Object horizontally and vertically using the flipX and flipY properties.
Get Image Bounds
Demonstrates using the getBounds method to retrieve the axis-aligned bounding box of a Game Object as it scales and rotates.
Image Alpha
Demonstrates how to change the transparency of an image by setting its alpha property.
Image Bounds
Demonstrates how to retrieve and visualize the axis-aligned bounding box (AABB) of rotating and scaling images using the getBounds method.
Image Edge Points
Demonstrates how to retrieve the world coordinates of an Image's corners and center edges using methods like getTopLeft and getBottomRight, even as the object rotates and scales.
Image Offset
Demonstrates how to position multiple images at specific X and Y coordinates within a scene.
Image Rotation
Rotate an image by incrementing its rotation property inside the update loop.
Make Image from Configuration
Demonstrates how to create an image using a configuration object, featuring the use of random range generators (randInt, randFloat), random selection from arrays, and dynamic functions for property values.
Multiple Image Alpha
Demonstrates how to set different transparency levels for multiple image Game Objects using the setAlpha method.
Multiple Image Rotation
Learn how to rotate multiple Image Game Objects independently by updating their rotation property at different speeds and directions within the update loop.
Single Image Rotation
Demonstrates loading an image, displaying it on the screen, and updating its rotation property every frame.
Sprite Additive Blending
Demonstrates how to apply the 'ADD' blend mode to images, showing how colors combine additively as they move over a background sprite.