Name | Type | Description |
---|---|---|
options |
NineSliceSpriteOptions | Texture |
Options to use |
options.texture |
The texture to use on the NineSlicePlane. |
|
options.leftWidth |
Width of the left vertical bar (A) |
|
options.topHeight |
Height of the top horizontal bar (C) |
|
options.rightWidth |
Width of the right vertical bar (B) |
|
options.bottomHeight |
Height of the bottom horizontal bar (D) |
|
options.width |
Width of the NineSlicePlane, setting this will actually modify the vertices and not the UV's of this plane. |
|
options.height |
Height of the NineSlicePlane, setting this will actually modify the vertices and not UV's of this plane. |
Example
import { NineSlicePlane, Texture } from 'pixi.js';
const plane9 = new NineSlicePlane(Texture.from('BoxWithRoundedCorners.png'), 15, 15, 15, 15);
Members
defaultOptions NineSliceSpriteOptions static
The default options, used to override the initial values of any options passed in the constructor.
Properties:
Name | Type | Default | Description |
---|---|---|---|
bottomHeight |
number | 10 | |
leftWidth |
number | 10 | |
rightWidth |
number | 10 | |
texture |
Texture.EMPTY | ||
topHeight |
number | 10 |
The width of the right column (b) of the NineSlicePlane.
The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane.
The width of the left column (a) of the NineSlicePlane.
The width of the right column (b) of the NineSlicePlane.
Whether or not to round the x/y position of the nine slice.
texture core
The texture that the NineSlicePlane is using.
The width of the right column (b) of the NineSlicePlane.
The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane.