mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-25 04:24:33 -04:00
⚡ Bibata-Original bitmaps
This commit is contained in:
parent
e86dec5163
commit
89eba25a9d
4 changed files with 79 additions and 8 deletions
|
@ -1,8 +1,37 @@
|
|||
import { main } from "bibata-core";
|
||||
import path from "path";
|
||||
|
||||
const hmm = async () => {
|
||||
main();
|
||||
console.log("Bibata Original");
|
||||
import { BitmapsGenerator, SVGHandler } from "bibata-core";
|
||||
import { config } from "./config";
|
||||
|
||||
const root = path.resolve(__dirname, "../../../../");
|
||||
const svgDir = path.resolve(root, "svg", "modern");
|
||||
|
||||
const main = async () => {
|
||||
for (const { themeName, color } of config) {
|
||||
console.log("=>", themeName);
|
||||
|
||||
const bitmapsDir = path.resolve(root, "bitmaps", themeName);
|
||||
const svg = new SVGHandler.SvgDirectoryParser(svgDir);
|
||||
|
||||
const png = new BitmapsGenerator(bitmapsDir);
|
||||
const browser = await png.getBrowser();
|
||||
|
||||
for (let { key, content } of svg.getStatic()) {
|
||||
console.log(" -> Saving", key, "...");
|
||||
|
||||
content = SVGHandler.colorSvg(content, color);
|
||||
await png.generateStatic(browser, content, key);
|
||||
}
|
||||
|
||||
for (let { key, content } of svg.getAnimated()) {
|
||||
console.log(" -> Saving", key, "...");
|
||||
|
||||
content = SVGHandler.colorSvg(content, color);
|
||||
await png.generateAnimated(browser, content, key);
|
||||
}
|
||||
|
||||
await browser.close();
|
||||
}
|
||||
};
|
||||
|
||||
hmm();
|
||||
main();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue