pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
1 lines • 30.8 kB
Source Map (JSON)
{"version":3,"file":"NineSliceSprite.mjs","sources":["../../../src/scene/sprite-nine-slice/NineSliceSprite.ts"],"sourcesContent":["import { ObservablePoint } from '../../maths/point/ObservablePoint';\nimport { type PointData } from '../../maths/point/PointData';\nimport { Texture } from '../../rendering/renderers/shared/texture/Texture';\nimport { deprecation, v8_0_0 } from '../../utils/logging/deprecation';\nimport { ViewContainer, type ViewContainerOptions } from '../view/ViewContainer';\nimport { NineSliceGeometry } from './NineSliceGeometry';\nimport { type NineSliceSpriteGpuData } from './NineSliceSpritePipe';\n\nimport type { Size } from '../../maths/misc/Size';\nimport type { View } from '../../rendering/renderers/shared/view/View';\nimport type { Optional } from '../container/container-mixins/measureMixin';\nimport type { DestroyOptions } from '../container/destroyTypes';\n\n/**\n * Constructor options used for `NineSliceSprite` instances.\n * Defines how the sprite's texture is divided and scaled in nine sections.\n * <pre>\n * A B\n * +---+----------------------+---+\n * C | 1 | 2 | 3 |\n * +---+----------------------+---+\n * | | | |\n * | 4 | 5 | 6 |\n * | | | |\n * +---+----------------------+---+\n * D | 7 | 8 | 9 |\n * +---+----------------------+---+\n * When changing this objects width and/or height:\n * areas 1 3 7 and 9 will remain unscaled.\n * areas 2 and 8 will be stretched horizontally\n * areas 4 and 6 will be stretched vertically\n * area 5 will be stretched both horizontally and vertically\n * </pre>\n * @example\n * ```ts\n * // Create a basic nine-slice sprite\n * const button = new NineSliceSprite({\n * texture: Texture.from('button.png'),\n * leftWidth: 20, // Left border (A)\n * rightWidth: 20, // Right border (B)\n * topHeight: 20, // Top border (C)\n * bottomHeight: 20, // Bottom border (D)\n * width: 100, // Initial width\n * height: 50, // Initial height\n * anchor: 0.5, // Center anchor point\n * });\n * ```\n * @see {@link NineSliceSprite} For the main sprite class\n * @see {@link Texture#defaultBorders} For texture-level border settings\n * @category scene\n * @standard\n */\nexport interface NineSliceSpriteOptions extends PixiMixins.NineSliceSpriteOptions, ViewContainerOptions\n{\n /**\n * The texture to use on the NineSliceSprite.\n * ```ts\n * // Create a sprite with a texture\n * const sprite = new NineSliceSprite({\n * texture: Texture.from('path/to/image.png')\n * });\n * // Update the texture later\n * sprite.texture = Texture.from('path/to/another-image.png');\n * ```\n * @default Texture.EMPTY\n */\n texture: Texture;\n\n /**\n * Width of the left vertical bar (A).\n * Controls the size of the left edge that remains unscaled\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., leftWidth: 20 });\n * sprite.leftWidth = 20; // Set left border width\n * ```\n * @default 10\n */\n leftWidth?: number;\n\n /**\n * Height of the top horizontal bar (C).\n * Controls the size of the top edge that remains unscaled\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., topHeight: 20 });\n * sprite.topHeight = 20; // Set top border height\n * ```\n * @default 10\n */\n topHeight?: number;\n\n /**\n * Width of the right vertical bar (B).\n * Controls the size of the right edge that remains unscaled\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., rightWidth: 20 });\n * sprite.rightWidth = 20; // Set right border width\n * ```\n * @default 10\n */\n rightWidth?: number;\n\n /**\n * Height of the bottom horizontal bar (D).\n * Controls the size of the bottom edge that remains unscaled\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., bottomHeight: 20 });\n * sprite.bottomHeight = 20; // Set bottom border height\n * ```\n * @default 10\n */\n bottomHeight?: number;\n\n /**\n * Width of the NineSliceSprite.\n * Modifies the vertices directly rather than UV coordinates\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., width: 200 });\n * sprite.width = 200; // Set the width of the sprite\n * ```\n * @default 100\n */\n width?: number;\n\n /**\n * Height of the NineSliceSprite.\n * Modifies the vertices directly rather than UV coordinates\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., height: 100 });\n * sprite.height = 100; // Set the height of the sprite\n * ```\n * @default 100\n */\n height?: number;\n\n /**\n * Whether to round the x/y position to whole pixels\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., roundPixels: true });\n * ```\n * @default false\n */\n roundPixels?: boolean;\n\n /**\n * The anchor point of the NineSliceSprite (0-1 range)\n *\n * Controls the origin point for rotation, scaling, and positioning.\n * Can be a number for uniform anchor or a PointData for separate x/y values.\n * @default 0\n * @example\n * ```ts\n * // Centered anchor\n * const sprite = new NineSliceSprite({ ..., anchor: 0.5 });\n * sprite.anchor = 0.5;\n * // Separate x/y anchor\n * sprite.anchor = { x: 0.5, y: 0.5 };\n * // Right-aligned anchor\n * sprite.anchor = { x: 1, y: 0 };\n * // Update anchor directly\n * sprite.anchor.set(0.5, 0.5);\n * ```\n */\n anchor?: PointData | number;\n}\n// eslint-disable-next-line requireExport/require-export-jsdoc, requireMemberAPI/require-member-api-doc\nexport interface NineSliceSprite extends PixiMixins.NineSliceSprite, ViewContainer<NineSliceSpriteGpuData> {}\n\n/**\n * The NineSliceSprite allows you to stretch a texture using 9-slice scaling. The corners will remain unscaled (useful\n * for buttons with rounded corners for example) and the other areas will be scaled horizontally and or vertically\n *\n * <pre>\n * A B\n * +---+----------------------+---+\n * C | 1 | 2 | 3 |\n * +---+----------------------+---+\n * | | | |\n * | 4 | 5 | 6 |\n * | | | |\n * +---+----------------------+---+\n * D | 7 | 8 | 9 |\n * +---+----------------------+---+\n * When changing this objects width and/or height:\n * areas 1 3 7 and 9 will remain unscaled.\n * areas 2 and 8 will be stretched horizontally\n * areas 4 and 6 will be stretched vertically\n * area 5 will be stretched both horizontally and vertically\n * </pre>\n * @example\n * ```ts\n * import { NineSliceSprite, Texture } from 'pixi.js';\n *\n * const plane9 = new NineSliceSprite({\n * texture: Texture.from('BoxWithRoundedCorners.png'),\n * leftWidth: 15,\n * topHeight: 15,\n * rightWidth: 15,\n * bottomHeight: 15,\n * width: 200,\n * height: 100,\n * });\n * ```\n * @category scene\n * @standard\n */\nexport class NineSliceSprite extends ViewContainer<NineSliceSpriteGpuData> implements View\n{\n /**\n * The default options used to override initial values of any options passed in the constructor.\n * These values are used as fallbacks when specific options are not provided.\n * @example\n * ```ts\n * // Override default options globally\n * NineSliceSprite.defaultOptions.texture = Texture.from('defaultButton.png');\n * // Create sprite with default texture\n * const sprite = new NineSliceSprite({...});\n * // sprite will use 'defaultButton.png' as its texture\n *\n * // Reset to empty texture\n * NineSliceSprite.defaultOptions.texture = Texture.EMPTY;\n * ```\n * @type {NineSliceSpriteOptions}\n * @see {@link NineSliceSpriteOptions} For all available options\n * @see {@link Texture#defaultBorders} For texture-level border settings\n */\n public static defaultOptions: NineSliceSpriteOptions = {\n /** @default Texture.EMPTY */\n texture: Texture.EMPTY,\n };\n\n /** @internal */\n public override readonly renderPipeId: string = 'nineSliceSprite';\n /** @internal */\n public _texture: Texture;\n /** @internal */\n public _anchor: ObservablePoint;\n /** @internal */\n public batched = true;\n private _leftWidth: number;\n private _topHeight: number;\n private _rightWidth: number;\n private _bottomHeight: number;\n private _width: number;\n private _height: number;\n\n constructor(options: NineSliceSpriteOptions | Texture)\n {\n if ((options instanceof Texture))\n {\n options = { texture: options };\n }\n\n const {\n width,\n height,\n anchor,\n leftWidth,\n rightWidth,\n topHeight,\n bottomHeight,\n texture,\n roundPixels,\n ...rest\n } = options;\n\n super({\n label: 'NineSliceSprite',\n ...rest\n });\n\n this._leftWidth = leftWidth ?? texture?.defaultBorders?.left ?? NineSliceGeometry.defaultOptions.leftWidth;\n this._topHeight = topHeight ?? texture?.defaultBorders?.top ?? NineSliceGeometry.defaultOptions.topHeight;\n this._rightWidth = rightWidth ?? texture?.defaultBorders?.right ?? NineSliceGeometry.defaultOptions.rightWidth;\n this._bottomHeight = bottomHeight\n ?? texture?.defaultBorders?.bottom\n ?? NineSliceGeometry.defaultOptions.bottomHeight;\n\n this._width = width ?? texture.width ?? NineSliceGeometry.defaultOptions.width;\n this._height = height ?? texture.height ?? NineSliceGeometry.defaultOptions.height;\n\n this.allowChildren = false;\n this.texture = texture ?? NineSliceSprite.defaultOptions.texture;\n this.roundPixels = roundPixels ?? false;\n\n this._anchor = new ObservablePoint(\n {\n _onUpdate: () =>\n {\n this.onViewUpdate();\n }\n },\n );\n\n if (anchor)\n {\n this.anchor = anchor;\n }\n else if (this.texture.defaultAnchor)\n {\n this.anchor = this.texture.defaultAnchor;\n }\n }\n\n /**\n * The anchor sets the origin point of the sprite. The default value is taken from the {@link Texture}\n * and passed to the constructor.\n *\n * - The default is `(0,0)`, this means the sprite's origin is the top left.\n * - Setting the anchor to `(0.5,0.5)` means the sprite's origin is centered.\n * - Setting the anchor to `(1,1)` would mean the sprite's origin point will be the bottom right corner.\n *\n * If you pass only single parameter, it will set both x and y to the same value as shown in the example below.\n * @example\n * ```ts\n * // Center the anchor point\n * sprite.anchor = 0.5; // Sets both x and y to 0.5\n * sprite.position.set(400, 300); // Sprite will be centered at this position\n *\n * // Set specific x/y anchor points\n * sprite.anchor = {\n * x: 1, // Right edge\n * y: 0 // Top edge\n * };\n *\n * // Using individual coordinates\n * sprite.anchor.set(0.5, 1); // Center-bottom\n *\n * // For rotation around center\n * sprite.anchor.set(0.5);\n * sprite.rotation = Math.PI / 4; // 45 degrees around center\n *\n * // For scaling from center\n * sprite.anchor.set(0.5);\n * sprite.scale.set(2); // Scales from center point\n * ```\n */\n get anchor(): ObservablePoint\n {\n return this._anchor;\n }\n\n set anchor(value: PointData | number)\n {\n typeof value === 'number' ? this._anchor.set(value) : this._anchor.copyFrom(value);\n }\n\n /**\n * The width of the NineSliceSprite, setting this will actually modify the vertices and UV's of this plane.\n * The width affects how the middle sections are scaled.\n * @example\n * ```ts\n * // Create a nine-slice sprite with fixed width\n * const panel = new NineSliceSprite({\n * texture: Texture.from('panel.png'),\n * width: 200 // Sets initial width\n * });\n *\n * // Adjust width dynamically\n * panel.width = 300; // Stretches middle sections\n * ```\n * @see {@link NineSliceSprite#setSize} For setting both width and height efficiently\n * @see {@link NineSliceSprite#height} For setting height\n */\n override get width(): number\n {\n return this._width;\n }\n\n override set width(value: number)\n {\n this._width = value;\n this.onViewUpdate();\n }\n\n /**\n * The height of the NineSliceSprite, setting this will actually modify the vertices and UV's of this plane.\n * The height affects how the middle sections are scaled.\n * @example\n * ```ts\n * // Create a nine-slice sprite with fixed height\n * const panel = new NineSliceSprite({\n * texture: Texture.from('panel.png'),\n * height: 150 // Sets initial height\n * });\n *\n * // Adjust height dynamically\n * panel.height = 200; // Stretches middle sections\n *\n * // Create responsive UI element\n * const dialog = new NineSliceSprite({\n * texture: Texture.from('dialog.png'),\n * topHeight: 30,\n * bottomHeight: 30,\n * height: parent.height * 0.5 // 50% of parent height\n * });\n * ```\n * @see {@link NineSliceSprite#setSize} For setting both width and height efficiently\n * @see {@link NineSliceSprite#width} For setting width\n */\n override get height(): number\n {\n return this._height;\n }\n\n override set height(value: number)\n {\n this._height = value;\n this.onViewUpdate();\n }\n\n /**\n * Sets the size of the NineSliceSprite to the specified width and height.\n * This method directly modifies the vertices and UV coordinates of the sprite.\n *\n * Using this is more efficient than setting width and height separately as it only triggers one update.\n * @example\n * ```ts\n * // Set to specific dimensions\n * panel.setSize(300, 200); // Width: 300, Height: 200\n *\n * // Set uniform size\n * panel.setSize(200); // Makes a square 200x200\n *\n * // Set size using object\n * panel.setSize({\n * width: 400,\n * height: 300\n * });\n * ```\n * @param value - This can be either a number or a Size object with width/height properties\n * @param height - The height to set. Defaults to the value of `width` if not provided\n * @see {@link NineSliceSprite#width} For setting width only\n * @see {@link NineSliceSprite#height} For setting height only\n */\n public override setSize(value: number | Optional<Size, 'height'>, height?: number): void\n {\n if (typeof value === 'object')\n {\n height = value.height ?? value.width;\n value = value.width;\n }\n\n this._width = value;\n this._height = height ?? value;\n\n this.onViewUpdate();\n }\n\n /**\n * Retrieves the size of the NineSliceSprite as a [Size]{@link Size} object.\n * This method is more efficient than getting width and height separately.\n * @example\n * ```ts\n * // Get basic size\n * const size = panel.getSize();\n * console.log(`Size: ${size.width}x${size.height}`);\n *\n * // Reuse existing size object\n * const reuseSize = { width: 0, height: 0 };\n * panel.getSize(reuseSize);\n * ```\n * @param out - Optional object to store the size in, to avoid allocating a new object\n * @returns The size of the NineSliceSprite\n * @see {@link NineSliceSprite#width} For getting just the width\n * @see {@link NineSliceSprite#height} For getting just the height\n * @see {@link NineSliceSprite#setSize} For setting both width and height efficiently\n */\n public override getSize(out?: Size): Size\n {\n out ||= {} as Size;\n out.width = this._width;\n out.height = this._height;\n\n return out;\n }\n\n /**\n * Width of the left vertical bar (A).\n * Controls the size of the left edge that remains unscaled\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., leftWidth: 20 });\n * sprite.leftWidth = 20; // Set left border width\n * ```\n * @default 10\n */\n get leftWidth(): number\n {\n return this._leftWidth;\n }\n\n set leftWidth(value: number)\n {\n this._leftWidth = value;\n\n this.onViewUpdate();\n }\n\n /**\n * Height of the top horizontal bar (C).\n * Controls the size of the top edge that remains unscaled\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., topHeight: 20 });\n * sprite.topHeight = 20; // Set top border height\n * ```\n * @default 10\n */\n get topHeight(): number\n {\n return this._topHeight;\n }\n\n set topHeight(value: number)\n {\n this._topHeight = value;\n this.onViewUpdate();\n }\n\n /**\n * Width of the right vertical bar (B).\n * Controls the size of the right edge that remains unscaled\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., rightWidth: 20 });\n * sprite.rightWidth = 20; // Set right border width\n * ```\n * @default 10\n */\n get rightWidth(): number\n {\n return this._rightWidth;\n }\n\n set rightWidth(value: number)\n {\n this._rightWidth = value;\n this.onViewUpdate();\n }\n\n /**\n * Height of the bottom horizontal bar (D).\n * Controls the size of the bottom edge that remains unscaled\n * @example\n * ```ts\n * const sprite = new NineSliceSprite({ ..., bottomHeight: 20 });\n * sprite.bottomHeight = 20; // Set bottom border height\n * ```\n * @default 10\n */\n get bottomHeight(): number\n {\n return this._bottomHeight;\n }\n\n set bottomHeight(value: number)\n {\n this._bottomHeight = value;\n this.onViewUpdate();\n }\n\n /**\n * The texture to use on the NineSliceSprite.\n * ```ts\n * // Create a sprite with a texture\n * const sprite = new NineSliceSprite({\n * texture: Texture.from('path/to/image.png')\n * });\n * // Update the texture later\n * sprite.texture = Texture.from('path/to/another-image.png');\n * ```\n * @default Texture.EMPTY\n */\n get texture(): Texture\n {\n return this._texture;\n }\n\n set texture(value: Texture)\n {\n value ||= Texture.EMPTY;\n\n const currentTexture = this._texture;\n\n if (currentTexture === value) return;\n\n if (currentTexture && currentTexture.dynamic) currentTexture.off('update', this.onViewUpdate, this);\n if (value.dynamic) value.on('update', this.onViewUpdate, this);\n\n this._texture = value;\n\n this.onViewUpdate();\n }\n\n /**\n * The original width of the texture before any nine-slice scaling.\n * This is the width of the source texture used to create the nine-slice sprite.\n * @example\n * ```ts\n * // Get original dimensions\n * console.log(`Original size: ${sprite.originalWidth}x${sprite.originalHeight}`);\n *\n * // Use for relative scaling\n * sprite.width = sprite.originalWidth * 2; // Double the original width\n *\n * // Reset to original size\n * sprite.setSize(sprite.originalWidth, sprite.originalHeight);\n * ```\n * @readonly\n * @see {@link NineSliceSprite#width} For the current displayed width\n * @see {@link Texture#width} For direct texture width access\n * @returns The original width of the texture\n */\n get originalWidth()\n {\n return this._texture.width;\n }\n\n /**\n * The original height of the texture before any nine-slice scaling.\n * This is the height of the source texture used to create the nine-slice sprite.\n * @example\n * ```ts\n * // Get original dimensions\n * console.log(`Original size: ${sprite.originalWidth}x${sprite.originalHeight}`);\n *\n * // Use for relative scaling\n * sprite.height = sprite.originalHeight * 2; // Double the original height\n *\n * // Reset to original size\n * sprite.setSize(sprite.originalWidth, sprite.originalHeight);\n * ```\n * @readonly\n * @see {@link NineSliceSprite#height} For the current displayed height\n * @see {@link Texture#height} For direct texture height access\n * @returns The original height of the texture\n */\n get originalHeight()\n {\n return this._texture.height;\n }\n\n /**\n * Destroys this sprite renderable and optionally its texture.\n * @param options - Options parameter. A boolean will act as if all options\n * have been set to that value\n * @example\n * nineSliceSprite.destroy();\n * nineSliceSprite.destroy(true);\n * nineSliceSprite.destroy({ texture: true, textureSource: true });\n */\n public override destroy(options?: DestroyOptions): void\n {\n super.destroy(options);\n\n const destroyTexture = typeof options === 'boolean' ? options : options?.texture;\n\n if (destroyTexture)\n {\n const destroyTextureSource = typeof options === 'boolean' ? options : options?.textureSource;\n\n this._texture.destroy(destroyTextureSource);\n }\n\n this._texture = null;\n }\n\n /** @private */\n protected override updateBounds()\n {\n const bounds = this._bounds;\n\n const anchor = this._anchor;\n\n const width = this._width;\n const height = this._height;\n\n bounds.minX = -anchor._x * width;\n bounds.maxX = bounds.minX + width;\n\n bounds.minY = -anchor._y * height;\n bounds.maxY = bounds.minY + height;\n }\n}\n\n/**\n * Please use the {@link NineSliceSprite} class instead.\n * The NineSlicePlane is deprecated and will be removed in future versions.\n * @deprecated since 8.0.0\n * @category scene\n */\nexport class NineSlicePlane extends NineSliceSprite\n{\n constructor(options: NineSliceSpriteOptions | Texture);\n /** @deprecated since 8.0.0 */\n constructor(texture: Texture, leftWidth: number, topHeight: number, rightWidth: number, bottomHeight: number);\n constructor(...args: [NineSliceSpriteOptions | Texture] | [Texture, number, number, number, number])\n {\n let options = args[0];\n\n if (options instanceof Texture)\n {\n // #if _DEBUG\n // eslint-disable-next-line max-len\n deprecation(v8_0_0, 'NineSlicePlane now uses the options object {texture, leftWidth, rightWidth, topHeight, bottomHeight}');\n // #endif\n\n options = {\n texture: options,\n leftWidth: args[1],\n topHeight: args[2],\n rightWidth: args[3],\n bottomHeight: args[4],\n };\n }\n\n // #if _DEBUG\n deprecation(v8_0_0, 'NineSlicePlane is deprecated. Use NineSliceSprite instead.');\n // #endif\n\n super(options);\n }\n}\n"],"names":[],"mappings":";;;;;;;AAoNO,MAAM,gBAAA,GAAN,MAAM,gBAAA,SAAwB,aACrC,CAAA;AAAA,EAuCI,YAAY,OACZ,EAAA;AACI,IAAA,IAAK,mBAAmB,OACxB,EAAA;AACI,MA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