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
Usage
API
Props
Name | Description |
---|---|
bottomHeight | number The height of the bottom row. |
drawMode | PIXI.DRAW_MODES The way the Mesh should be drawn, can be any of the PIXI.DRAW_MODES constants. |
geometry | PIXI.Geometry Includes vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers, reducing the cost of passing all this data to the GPU. Can be shared between multiple Mesh objects. |
instance | PIXI.NineSlicePlane The PIXI.NineSlicePlane instance. Can be set or bound to. |
leftWidth | number The width of the left column. |
rightWidth | number The width of the right column. |
shader | PIXI.Shader PIXI.MeshMaterial Represents the vertex and fragment shaders that processes the geometry and runs on the GPU. Can be shared between multiple Mesh objects. |
state | PIXI.State Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g., blend mode, culling, depth testing, direction of rendering triangles, backface, etc. |
texture | PIXI.Texture The texture to use on the NineSlicePlane. |
topHeight | number The height of the top row. |
Additional props are passed on to Container
Slots
Name | Props | Fallback |
---|---|---|
default | {} |
Events
Name | Type | Detail |
---|---|---|
added | forwarded | |
click | forwarded | |
create | forwarded | |
globalmousemove | forwarded | |
globalpointermove | forwarded | |
globaltouchmove | forwarded | |
mousedown | forwarded | |
mousemove | forwarded | |
mouseout | forwarded | |
mouseover | forwarded | |
mouseup | forwarded | |
mouseupoutside | forwarded | |
pointercancel | forwarded | |
pointerdown | forwarded | |
pointermove | forwarded | |
pointerout | forwarded | |
pointerover | forwarded | |
pointertap | forwarded | |
pointerup | forwarded | |
pointerupoutside | forwarded | |
removed | forwarded | |
removedFrom | forwarded | |
rightclick | forwarded | |
rightdown | forwarded | |
rightup | forwarded | |
rightupoutside | forwarded | |
tap | forwarded | |
touchcancel | forwarded | |
touchend | forwarded | |
touchendoutside | forwarded | |
touchmove | forwarded | |
touchstart | forwarded |