UNPKG

kinetic-slider

Version:

A WebGL-powered kinetic slider component using PIXI.js

14 lines (13 loc) 554 B
/** * Calculate the appropriate scale for a sprite to fit in a container while maintaining aspect ratio * * @param imageWidth - Width of the image * @param imageHeight - Height of the image * @param containerWidth - Width of the container * @param containerHeight - Height of the container * @returns Object containing scale value and baseScale for reference */ export declare const calculateSpriteScale: (imageWidth: number, imageHeight: number, containerWidth: number, containerHeight: number) => { scale: number; baseScale: number; };