mirror of
https://github.com/ful1e5/apple_cursor.git
synced 2025-05-15 23:54:44 -04:00
13 lines
352 B
TypeScript
13 lines
352 B
TypeScript
import path from "path";
|
|
import { bitmapsDir } from "../config";
|
|
|
|
export const getOutPath = (number: number, length: number, svgFile: string) => {
|
|
let frame = "" + number;
|
|
while (frame.length < length) {
|
|
frame = "0" + frame;
|
|
}
|
|
|
|
const bitmap = `${path.basename(svgFile, ".svg")}-${frame}.png`;
|
|
|
|
return path.resolve(bitmapsDir, bitmap);
|
|
};
|