UNPKG

@koreez/phaser3-ninepatch

Version:
27 lines (26 loc) 976 B
import { IPatchesConfig } from "./IPatchesConfig"; export declare class NinePatch extends Phaser.GameObjects.Container { private static readonly __BASE; private static readonly patches; private originTexture; private originFrame; private config; private finalXs; private finalYs; private internalTint; constructor(scene: Phaser.Scene, x: number, y: number, width: number, height: number, key: string, frame?: string | number, config?: IPatchesConfig); resize(width: number, height: number): this; setTexture(key: string, frame?: string | integer): this; setFrame(frame: string | integer): this; setSize(width: number, height: number): this; setTint(tint: number): this; setTintFill(tint: number): this; clearTint(): this; tintFill: boolean; tint: number; readonly isTinted: boolean; private createPatches; private drawPatches; private createPatchFrame; private getPatchNameByIndex; }