koreezgames/phaser3-ninepatch-plugin

View on GitHub
src/com/koreez/plugin/ninepatch/IPatchesConfig.ts

Summary

Maintainability
A
0 mins
Test Coverage
export interface IPatchesConfig {
    top: number;
    left?: number;
    right?: number;
    bottom?: number;
}

const normalizePatchesConfig: (config: IPatchesConfig) => IPatchesConfig = (config: IPatchesConfig) => {
    config.bottom = config.bottom || config.top;
    config.left = config.left || config.top;
    config.right = config.right || config.left;
    return config;
};

export { normalizePatchesConfig };