Phaser home
Phaser AE
Open source
Phaser 4
Download
Learn
Editor
Tools
Docs
Examples
News
Log in
Examples
/
Game Objects
/
Nine Slice
Phaser 4.1.0
Phaser 4 examples
Nine Slice
8
examples
Examples
8
3 Slice Button
Demonstrates using Nine Slice Game Objects to create UI buttons that can be dynamically resized horizontally while preserving their edge graphics.
Create Nine Slice
Demonstrates how to create and display Nine Slice Game Objects using textures from an atlas, allowing for resizable UI elements with preserved corners.
Interactive Nine Slice Button
Demonstrates how to enable interactivity on a NineSlice Game Object and handle pointer events to trigger actions like repositioning.
Nine Slice Panel
Demonstrates creating a Nine Slice Game Object and dynamically resizing its width and height using a tween. It shows how the corners and edges are preserved while the center scales, and how to update text word wrapping to match the changing panel dimensions.
Nine Slice Progress Bar
Demonstrates how to create an animated progress bar using Nine Slice game objects by tweening the width property while preserving texture corners.
Nine Slice Stress Test
A performance demonstration rendering 256 Nine Slice Game Objects simultaneously, featuring randomized dimensions and real-time width and height tweening.
Nine Slice vs Scaling
A visual comparison showing how a Nine Slice object preserves its border and corner proportions when resized, compared to the distortion of a standard scaled Image.
Nine Slice with Texture Atlas
Demonstrates how to create Nine Slice Game Objects using frames loaded from a Texture Packer atlas.