Skip to content
On this page

NineSlicePlane

Creates a NineSlicePlane

Allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically

API

NineSlicePlane Attributes

NameTypeDefaultDescription
blend-modeBLEND_MODES.NORMALThe blend mode to be applied to the sprite.
draw-mode

number DRAW_MODES

DRAW_MODES.TRIANGLESThe draw mode to be used.
texturestring objectundefinedThe texture to use on the NineSlicePlane.
left-widthnumberundefinedThe width of the left column of the grid
right-widthnumberundefinedThe width of the right column of the grid
top-heightnumberundefinedThe height of the top row of the grid
bottom-heightnumberundefinedThe height of the bottom row of the grid
geometryobjectundefinedThe geometry the mesh will use.

more props in Container Props and PIXI.NineSlicePlane

NineSlicePlane Events

NameTypeDescription
renderfunctioncustom render function

more events in Container Events