Skip to content

1681-engine / index / sliceBorders

Function: sliceBorders() ​

ts
function sliceBorders(key): 
  | {
  bottom: number;
  left: number;
  right: number;
  top: number;
}
  | undefined;

Defined in: src/anim/asepriteSlices.ts:25

The 9-slice borders of a key with a centre — how far in from each edge the stretchable middle starts — in the shape Pixi's NineSliceSprite and Texture.defaultBorders take. Undefined for a key with no centre.

Parameters ​

ParameterType
keyAsepriteSliceKey

Returns ​

| { bottom: number; left: number; right: number; top: number; } | undefined

Released under the MIT License.