Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

Completely remove google fonts and fix play/pause toggle

Scott Petrovicf1a679f3a80a
diff --git a/src/animation-player.css b/src/animation-player.css
index 6281dfd..fc2ad59 100644
--- a/src/animation-player.css
+++ b/src/animation-player.css
@@ -71,11 +71,6 @@
}
-.animation-control-button .material-symbols-outlined {
- font-size: 22px;
- font-weight: 400;
-}
-
#animation-scrubber {
flex: 1;
height: 4px;
diff --git a/src/create.html b/src/create.html
index 233ef34..5b30613 100644
--- a/src/create.html
+++ b/src/create.html
@@ -23,10 +23,6 @@
<link rel="stylesheet" href="./dialog.css" crossorigin="anonymous" />
<link rel="stylesheet" href="./settings-dropdown.css" crossorigin="anonymous" />
- <link
- rel="stylesheet"
- href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0"
- />
<nav>
<div style="display: inline-flex; align-items: center">
diff --git a/src/index.html b/src/index.html
index 6888030..3e43a7c 100644
--- a/src/index.html
+++ b/src/index.html
@@ -19,8 +19,6 @@
<link rel="stylesheet" href="./settings-dropdown.css" crossorigin="anonymous" />
<link rel="stylesheet" href="./marketing/marketing.css" crossorigin="anonymous" />
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
-
<nav>
<div style="display: inline-flex; align-items: center;">
<a href="https://mesh2motion.org"><img src="./images/mesh2motion.svg" width="200" /></a>
diff --git a/src/lib/DOMUtilities.ts b/src/lib/DOMUtilities.ts
index 1b1247c..2a9a990 100644
--- a/src/lib/DOMUtilities.ts
+++ b/src/lib/DOMUtilities.ts
@@ -101,7 +101,7 @@ export class DOMUtilities {
<div id="play-controls">
<button id="play-pause-button" class="animation-control-button" disabled>
- <span class="material-symbols-outlined">play_arrow</span>
+ <img src="../images/icons/play.svg" alt="Play" width="14" height="14" />
</button>
<span>
diff --git a/src/lib/processes/animations-listing/AnimationPlayer.ts b/src/lib/processes/animations-listing/AnimationPlayer.ts
index 71e2e3a..43f880d 100644
--- a/src/lib/processes/animations-listing/AnimationPlayer.ts
+++ b/src/lib/processes/animations-listing/AnimationPlayer.ts
@@ -170,9 +170,17 @@ export class AnimationPlayer {
return
}
- const icon = this.ui.dom_play_pause_button.querySelector('.material-symbols-outlined')
+ // Update the play/pause button icon based on the current state
+ const icon = this.ui.dom_play_pause_button.querySelector('img')
if (icon !== null) {
- icon.textContent = this.is_playing || this.was_playing_before_user_scrubbed ? 'pause' : 'play_arrow'
+ // swap the img src based on play/pause state
+ if (this.is_playing || this.was_playing_before_user_scrubbed) {
+ icon.src = '../images/icons/pause.svg'
+ icon.alt = 'Pause'
+ } else {
+ icon.src = '../images/icons/play.svg'
+ icon.alt = 'Play'
+ }
}
}
diff --git a/src/retarget/index.html b/src/retarget/index.html
index d74a439..ebd2425 100644
--- a/src/retarget/index.html
+++ b/src/retarget/index.html
@@ -12,7 +12,6 @@
<link rel="stylesheet" href="../settings-dropdown.css" crossorigin="anonymous" />
<link rel="stylesheet" href="./retarget.css" crossorigin="anonymous" />
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
<link rel="stylesheet" href="../dialog.css" crossorigin="anonymous" />
</head>
diff --git a/src/styles.css b/src/styles.css
index b81ad69..1df8daa 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -357,11 +357,6 @@ button:disabled {
justify-content: center;
}
-#download-settings-toggle.download-split-toggle .material-symbols-outlined {
- font-size: 1.35rem;
- line-height: 1;
-}
-
.download-settings-panel {
position: absolute;
right: 0;
diff --git a/static/images/icons/pause.svg b/static/images/icons/pause.svg
new file mode 100644
index 0000000..eef7b37
--- /dev/null
+++ b/static/images/icons/pause.svg
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
+ <g transform="matrix(1,0,0,1,-553.674389,-604.917133)">
+ <g id="pause" transform="matrix(1,0,0,1,553.674389,604.917133)">
+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>
+ <g transform="matrix(0.849057,0,0,1,-350.047293,-617.395341)">
+ <rect x="579.646" y="657.686" width="81.554" height="175.418" style="fill:rgb(204,204,204);"/>
+ </g>
+ <g transform="matrix(0.849057,0,0,1,-447.501845,-617.395341)">
+ <rect x="579.646" y="657.686" width="81.554" height="175.418" style="fill:rgb(204,204,204);"/>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/static/images/icons/play.svg b/static/images/icons/play.svg
new file mode 100644
index 0000000..ebb7a8e
--- /dev/null
+++ b/static/images/icons/play.svg
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
+ <g transform="matrix(1,0,0,1,-849.203704,-604.917133)">
+ <g id="play" transform="matrix(1,0,0,1,849.203704,604.917133)">
+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>
+ <g transform="matrix(-0,1.39576,-1.36721,-0,762.499935,-1683.502462)">
+ <path d="M1297.861,399.42L1353.738,511.172L1241.985,511.172L1297.861,399.42Z" style="fill:rgb(212,212,212);"/>
+ </g>
+ </g>
+ </g>
+</svg>