mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-23 19:46:57 -04:00
🧰 Common utils functions
This commit is contained in:
parent
7d6bf0aad3
commit
9d06f81e7c
3 changed files with 3 additions and 23 deletions
|
@ -2,31 +2,11 @@ import fs from "fs";
|
|||
import path from "path";
|
||||
import puppeteer from "puppeteer";
|
||||
|
||||
import { generateRenderTemplate } from "./helpers/htmlTemplate";
|
||||
|
||||
// --------------------------- Types
|
||||
type AnimatedCursors = {
|
||||
readonly [name: string]: {
|
||||
readonly frames: number;
|
||||
};
|
||||
};
|
||||
|
||||
type AnimatedClip = {
|
||||
readonly x: number;
|
||||
readonly y: number;
|
||||
readonly width: number;
|
||||
readonly height: number;
|
||||
};
|
||||
|
||||
interface Config {
|
||||
staticCursors: Array<string>;
|
||||
bitmapsDir: string;
|
||||
svgsDir: string;
|
||||
animatedCursors: AnimatedCursors;
|
||||
animatedClip: AnimatedClip;
|
||||
}
|
||||
import { generateRenderTemplate } from "./htmlTemplate";
|
||||
import { Config } from "../types";
|
||||
|
||||
// --------------------------- Helpers
|
||||
|
||||
const frameNumber = (number: number, length: number) => {
|
||||
var str = "" + number;
|
||||
while (str.length < length) {
|
Loading…
Add table
Add a link
Reference in a new issue