🧹 animatedClip Config cleanup

This commit is contained in:
ful1e5 2020-08-31 11:22:54 +05:30
parent 79234d06de
commit 316c3ea5af
4 changed files with 4 additions and 14 deletions

View file

@ -9,7 +9,6 @@ interface Config {
bitmapsDir: string;
svgsDir: string;
animatedCursors: AnimatedCursors;
animatedClip: AnimatedClip;
}
export { Config, AnimatedCursors, AnimatedClip };

View file

@ -20,8 +20,7 @@ export const renderCursors = async ({
staticCursors,
bitmapsDir,
svgsDir,
animatedCursors,
animatedClip
animatedCursors
}: Config) => {
const browser = await puppeteer.launch({
ignoreDefaultArgs: [" --single-process ", "--no-sandbox"],
@ -92,8 +91,7 @@ export const renderCursors = async ({
// Render
await svgElement.screenshot({
omitBackground: true,
path: out,
clip: animatedClip
path: out
});
// console.log(`${svg} frame ${frame}/${frames} rendered at ${out}`);
}

View file

@ -65,11 +65,5 @@
"wait.svg": {
"frames": 45
}
},
"animatedClip": {
"x": 4,
"y": 4,
"width": 200,
"height": 200
}
}

View file

@ -1,7 +1,7 @@
import fs from "fs";
import path from "path";
import { staticCursors, animatedCursors, animatedClip } from "../cursors.json";
import { staticCursors, animatedCursors } from "../cursors.json";
import {
schemesPath,
bitmapsPath,
@ -82,8 +82,7 @@ const generateConfigs = (colorSchemes: ColorSchema, dirPrefix: string) => {
svgsDir: schemaSvgsPath,
bitmapsDir,
animatedCursors,
staticCursors,
animatedClip
staticCursors
};
}