Interface: NineSliceSpriteOptions

NineSliceSpriteOptions

Constructor options used for NineSliceSprite instances.

const nineSliceSprite = new NineSliceSprite({
   texture: Texture.from('button.png'),
   leftWidth: 20,
   topHeight: 20,
   rightWidth: 20,
   bottomHeight: 20,
});
Properties:
Name Type Description
bottomHeight number

Height of the bottom horizontal bar (D)

height number

Height of the NineSliceSprite, setting this will actually modify the vertices and not UV's of this plane.

leftWidth number

Width of the left vertical bar (A)

rightWidth number

Width of the right vertical bar (B)

roundPixels boolean

Whether or not to round the x/y position.

texture Texture

The texture to use on the NineSliceSprite.

topHeight number

Height of the top horizontal bar (C)

width number

Width of the NineSliceSprite, setting this will actually modify the vertices and not the UV's of this plane.

See:

Extends

Members

bottomHeight number

Height of the bottom horizontal bar (D)

height number

Height of the NineSliceSprite, setting this will actually modify the vertices and not UV's of this plane.

leftWidth number

Width of the left vertical bar (A)

rightWidth number

Width of the right vertical bar (B)

roundPixels boolean

Whether or not to round the x/y position.

texture Texture

The texture to use on the NineSliceSprite.

topHeight number

Height of the top horizontal bar (C)

width number

Width of the NineSliceSprite, setting this will actually modify the vertices and not the UV's of this plane.