Skip to content

Commit

Permalink
Optimise some SVGs
Browse files Browse the repository at this point in the history
Removed
  - Mull
  • Loading branch information
k4ustu3h committed Nov 28, 2023
1 parent bc48b38 commit 6cffbab
Show file tree
Hide file tree
Showing 540 changed files with 566 additions and 9,444 deletions.
1 change: 0 additions & 1 deletion app/assets/appfilter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,6 @@
<item component="ComponentInfo{bin.mt.plus/bin.mt.plus.MainDarkIcon}" drawable="mt_manager" name="MT Manager" />
<item component="ComponentInfo{bin.mt.plus/bin.mt.plus.MainLightIcon}" drawable="mt_manager" name="MT Manager" />
<item component="ComponentInfo{bin.mt.plus/bin.mt.plus.MainNoBgIcon}" drawable="mt_manager" name="MT Manager" />
<item component="ComponentInfo{us.spotco.fennec_dos/us.spotco.fennec_dos.App}" drawable="mull" name="Mull" />
<item component="ComponentInfo{com.kyant.vanilla/com.kyant.vanilla.MainActivity}" drawable="music" name="Music" />
<item component="ComponentInfo{com.miui.player/.ui.MusicBrowserActivity}" drawable="music" name="Music" />
<item component="ComponentInfo{com.miui.player/com.miui.player.component.MusicBrowserActivity}" drawable="music" name="Music" />
Expand Down
38 changes: 29 additions & 9 deletions svgo.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -154,27 +154,47 @@ const enterElement = (element) => {
const end = cursor;
const diff1 = args[0] - argsO[0];
const diff2 = args[1] - argsO[1];
if (diff1 == 0 && diff2 == 0 || (args[0] > 1 && args[1] > 1 && diff1 > -.1 && diff1 < .1 && diff2 > -.1 && diff2 < .1)) {
const oldACenter = getArcCenter(start, midway, argsO.slice(0, 5));
if (
(diff1 == 0 && diff2 == 0) ||
(args[0] > 1 &&
args[1] > 1 &&
diff1 > -0.1 &&
diff1 < 0.1 &&
diff2 > -0.1 &&
diff2 < 0.1)
) {
const oldACenter = getArcCenter(
start,
midway,
argsO.slice(0, 5)
);
const oldBCenter = getArcCenter(midway, end, args.slice(0, 5));
const newCenter = getArcCenter(start, end, args.slice(0, 5));
const diffA = Math.sqrt(
Math.pow(newCenter[0] - oldACenter[0], 2) +
Math.pow(newCenter[1] - oldACenter[1], 2)
)
Math.pow(newCenter[1] - oldACenter[1], 2)
);
const diffB = Math.sqrt(
Math.pow(newCenter[0] - oldBCenter[0], 2) +
Math.pow(newCenter[1] - oldBCenter[1], 2)
)
Math.pow(newCenter[1] - oldBCenter[1], 2)
);
if (diffA + diffB < 0.2) {
path.splice(i, 1)
path.splice(i, 1);
i -= 1;
path[i] = {
...path[i],
base: start,
command: "A",
args: [args[0], args[1], args[2], args[3], args[4], cursor[0], cursor[1]],
}
args: [
args[0],
args[1],
args[2],
args[3],
args[4],
cursor[0],
cursor[1],
],
};
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion svgs/abstruct.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svgs/activity_launcher.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svgs/adobe_acrobat_reader.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion svgs/adobe_scan.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6cffbab

Please sign in to comment.