@rbxts/ui-scaler
v0.2.1
Published
This library will allow you to scalable ui
Downloads
217
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
SUMER (Discord: sumer_real)
Tesmi (Discord: tesmi)