From 316c3ea5af131ed29abed5886af661d4304eb29c Mon Sep 17 00:00:00 2001 From: ful1e5 <24286590+ful1e5@users.noreply.github.com> Date: Mon, 31 Aug 2020 11:22:54 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20`animatedClip`=20Config=20cleanu?= =?UTF-8?q?p?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/common/src/types.ts | 1 - packages/common/src/utils/render.ts | 6 ++---- packages/round/src/cursors.json | 6 ------ packages/round/src/helpers/schema.ts | 5 ++--- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/packages/common/src/types.ts b/packages/common/src/types.ts index 1b2228a9..121bca4c 100644 --- a/packages/common/src/types.ts +++ b/packages/common/src/types.ts @@ -9,7 +9,6 @@ interface Config { bitmapsDir: string; svgsDir: string; animatedCursors: AnimatedCursors; - animatedClip: AnimatedClip; } export { Config, AnimatedCursors, AnimatedClip }; diff --git a/packages/common/src/utils/render.ts b/packages/common/src/utils/render.ts index c7f41870..db423f82 100644 --- a/packages/common/src/utils/render.ts +++ b/packages/common/src/utils/render.ts @@ -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}`); } diff --git a/packages/round/src/cursors.json b/packages/round/src/cursors.json index b14a5cef..332aea0b 100644 --- a/packages/round/src/cursors.json +++ b/packages/round/src/cursors.json @@ -65,11 +65,5 @@ "wait.svg": { "frames": 45 } - }, - "animatedClip": { - "x": 4, - "y": 4, - "width": 200, - "height": 200 } } diff --git a/packages/round/src/helpers/schema.ts b/packages/round/src/helpers/schema.ts index ef025378..253ec6d2 100644 --- a/packages/round/src/helpers/schema.ts +++ b/packages/round/src/helpers/schema.ts @@ -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 }; }