@osbjs/osbjs
Version:
a minimalist osu! storyboarding framework
13 lines (12 loc) • 532 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.scaleExact = void 0;
const image_size_1 = require("image-size");
const Utils_1 = require("../Utils");
function scaleExact(commandable, width, height, time, path) {
const size = (0, image_size_1.imageSize)(path);
if (!size.width || !size.height)
throw new Error('Invalid image.');
commandable.ScaleVecAtTime(time, new Utils_1.OsbVector2(width / size.width, height / size.height));
}
exports.scaleExact = scaleExact;