mirror of
https://github.com/ful1e5/Bibata_Cursor.git
synced 2025-05-31 23:28:28 -04:00
🧹 animatedClip
Config cleanup
This commit is contained in:
parent
79234d06de
commit
316c3ea5af
4 changed files with 4 additions and 14 deletions
|
@ -9,7 +9,6 @@ interface Config {
|
||||||
bitmapsDir: string;
|
bitmapsDir: string;
|
||||||
svgsDir: string;
|
svgsDir: string;
|
||||||
animatedCursors: AnimatedCursors;
|
animatedCursors: AnimatedCursors;
|
||||||
animatedClip: AnimatedClip;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export { Config, AnimatedCursors, AnimatedClip };
|
export { Config, AnimatedCursors, AnimatedClip };
|
||||||
|
|
|
@ -20,8 +20,7 @@ export const renderCursors = async ({
|
||||||
staticCursors,
|
staticCursors,
|
||||||
bitmapsDir,
|
bitmapsDir,
|
||||||
svgsDir,
|
svgsDir,
|
||||||
animatedCursors,
|
animatedCursors
|
||||||
animatedClip
|
|
||||||
}: Config) => {
|
}: Config) => {
|
||||||
const browser = await puppeteer.launch({
|
const browser = await puppeteer.launch({
|
||||||
ignoreDefaultArgs: [" --single-process ", "--no-sandbox"],
|
ignoreDefaultArgs: [" --single-process ", "--no-sandbox"],
|
||||||
|
@ -92,8 +91,7 @@ export const renderCursors = async ({
|
||||||
// Render
|
// Render
|
||||||
await svgElement.screenshot({
|
await svgElement.screenshot({
|
||||||
omitBackground: true,
|
omitBackground: true,
|
||||||
path: out,
|
path: out
|
||||||
clip: animatedClip
|
|
||||||
});
|
});
|
||||||
// console.log(`${svg} frame ${frame}/${frames} rendered at ${out}`);
|
// console.log(`${svg} frame ${frame}/${frames} rendered at ${out}`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,11 +65,5 @@
|
||||||
"wait.svg": {
|
"wait.svg": {
|
||||||
"frames": 45
|
"frames": 45
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"animatedClip": {
|
|
||||||
"x": 4,
|
|
||||||
"y": 4,
|
|
||||||
"width": 200,
|
|
||||||
"height": 200
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
import { staticCursors, animatedCursors, animatedClip } from "../cursors.json";
|
import { staticCursors, animatedCursors } from "../cursors.json";
|
||||||
import {
|
import {
|
||||||
schemesPath,
|
schemesPath,
|
||||||
bitmapsPath,
|
bitmapsPath,
|
||||||
|
@ -82,8 +82,7 @@ const generateConfigs = (colorSchemes: ColorSchema, dirPrefix: string) => {
|
||||||
svgsDir: schemaSvgsPath,
|
svgsDir: schemaSvgsPath,
|
||||||
bitmapsDir,
|
bitmapsDir,
|
||||||
animatedCursors,
|
animatedCursors,
|
||||||
staticCursors,
|
staticCursors
|
||||||
animatedClip
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue