Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Transform
Phaser 4.1.0
Phaser 4 examples
Transform
13
examples
Examples
13
Display Size
Demonstrates how to use the setDisplaySize method to scale an image to specific pixel dimensions.
Flip X
Demonstrates three ways to horizontally flip a Game Object: using the setFlipX method, the flipX property, or the toggleFlipX function.
Flip Y
Demonstrates how to vertically flip an image using the setFlipY method, the flipY property, and the toggleFlipY function.
Horizontal Origin Alignment
Demonstrates how changing the horizontal origin (originX) affects how a Game Object is positioned relative to its x-coordinate, showing left, center, and right alignment.
Image Angle
Demonstrates how to set the rotation of an image in degrees using the angle property and setAngle method.
Rotation
Demonstrates how to rotate game objects over time by updating the rotation property for both individual images and texture atlas frames.
Rotation and Origin
Demonstrates how changing the origin of a Game Object affects its pivot point when rotating.
Scale X
Demonstrates how to adjust the horizontal scale of a Game Object using the setScale method and the scaleX property.
Scale XY
Demonstrates how to set the scale of a Game Object using the setScale method for uniform or independent scaling, and by directly modifying the scaleX and scaleY properties.
Scale Y
Demonstrates how to adjust the vertical scale of an image using the setScale method and the scaleY property.
Sprite Origin X and Y
Demonstrates how setting the origin (or anchor point) of an image affects its positioning relative to its coordinates.
Sprite Positioning
Demonstrates different ways to position Game Objects, including using constructor arguments, direct property assignment, and the setPosition method.
Vertical Origin Alignment
Demonstrates how to adjust the vertical origin of images and atlas frames to align them by their top, center, or bottom edge.