Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rbxts/ui-scaler) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
📐 UI Scaler
This library will allow you to scalable ui
☄️ Installation
NPM(https://www.npmjs.com/package/@rbxts/ui-scaler)
npm i @rbxts/ui-scaler
📚 Documentation
Scaler
You need to create a scaler
const BASE_RESOLUTION = new Vector2(1920, 1080);
const scaleApi = useScaler(BASE_RESOLUTION);Scale calculator
You can now use the scale-aware counting functions
scaleApi.px(100);
scaleApi.unscale(100);Hooks
You can also use hooks that will re-render your component, after changing the scale
scaleApi.usePx();
scaleApi.useUnscale();❤️ Credits
Tesmi (Discord: tesmi)