Skip to main content
Version: Phaser v3.88.2

Types.GameObjects.NineSlice

NineSliceConfig

<static> NineSliceConfig

nametypeoptionaldefaultdescription
keystring | Phaser.Textures.TextureYesThe key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
framestring | numberYesAn optional frame from the Texture this Game Object is rendering with.
widthnumberYes256The width of the Nine Slice Game Object. You can adjust the width post-creation.
heightnumberYes256The height of the Nine Slice Game Object. If this is a 3 slice object the height will be fixed to the height of the texture and cannot be changed.
leftWidthnumberYes10The size of the left vertical column (A).
rightWidthnumberYes10The size of the right vertical column (B).
topHeightnumberYes0The size of the top horiztonal row (C). Set to zero or undefined to create a 3 slice object.
bottomHeightnumberYes0The size of the bottom horiztonal row (D). Set to zero or undefined to create a 3 slice object.

Type: object

Member of: Phaser.Types.GameObjects.NineSlice

Source: src/gameobjects/nineslice/typedefs/NineSliceConfig.js#L1
Since: 3.60.0