Import a 3D Model and automatically assign and export animations
TypeScript
Start replacing material icons with SVG images
Scott Petrovicbf6bf08c68a4
diff --git a/src/create.html b/src/create.htmlindex a5a38ed..233ef34 100644--- a/src/create.html+++ b/src/create.html@@ -61,9 +61,9 @@data-tippy-content="GLB and FBX preferred. ZIP is for GLTF+BIN and textures separately. DAE+textures is also supported in ZIP format."><span class="button-icon-group">- <span class="material-symbols-outlined">upload</span>+ <img src="images/icons/upload.svg" alt="Upload" width="16" height="16" /><span>Upload</span>- <span class="material-symbols-outlined">help</span>+ <img src="images/icons/help.svg" alt="Help" width="20" height="20" /></span></label><input@@ -95,11 +95,10 @@/><label for="load-model-debug-checkbox">Debug</label>- <span- class="material-symbols-outlined"+ <imgdata-tippy-content="Replaces all materials with a 'normal' shader for debugging"- >help</span- >+ src="images/icons/help.svg" alt="Help" width="20" height="20" />+</div></div>@@ -149,7 +148,9 @@<div id="hand-skeleton-options" class="alternate-background-section"><span style="display: flex; gap: 1rem;"><span>Hand Options</span>- <span class="material-symbols-outlined" data-tippy-content="Variations on which finger bones you want to keep. Single Hand Bone removes all fingers and keeps only the hand bone.">help</span>++ <img data-tippy-content="Variations on which finger bones you want to keep. Single Hand Bone removes all fingers and keeps only the hand bone." src="images/icons/help.svg" alt="Help" width="20" height="20" />+</span><select id="hand-skeleton-selection"><option value="all-fingers">All Fingers</option>@@ -163,7 +164,9 @@<div id="scale-skeleton-controls" style="display: none; flex-direction: column;"><div style="display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 1rem;"><label style="display:inline-flex">Scale skeleton</label>- <span class="material-symbols-outlined" data-tippy-content="Adjust the overall scale of the skeleton">help</span>++ <img data-tippy-content="Adjust the overall scale of the skeleton" src="images/icons/help.svg" alt="Help" width="20" height="20" />+<button class="secondary-button" id="reset-skeleton-scale-button"><img src="images/icons/reset.svg" alt="Reset Skeleton Scale" width="20" height="20" /></button>@@ -280,7 +283,9 @@<div class="styled-checkbox"><input type="checkbox" id="preview-plane-checkbox" /><label for="preview-plane-checkbox">Use Head Weight Correction</label>- <span class="material-symbols-outlined" data-tippy-content="If you are having issues with the arms distorting your head (e.g. chibi characters), use a divider to help define the head area.">help</span>++ <img data-tippy-content="If you are having issues with the arms distorting your head (e.g. chibi characters), use a divider to help define the head area." src="images/icons/help.svg" alt="Help" width="20" height="20" />+</div><div id="preview-plane-setting-container" style="display: flex; align-items: center; gap: 0.5rem;"><label for="preview-plane-height-input">Height:</label>@@ -346,11 +351,10 @@"><label style="display: inline-flex">Expand / Contract Arms</label>- <span- class="material-symbols-outlined"- data-tippy-content="Fine-tune arm spread across all animations for heavier or skinnier characters."- >help</span- >+++ <img src="../images/icons/help.svg" alt="Help" width="20" height="20"+ data-tippy-content="Fine-tune arm spread across all animations for heavier or skinnier characters." /><button class="secondary-button" id="reset-arm-extension-button"><img@@ -427,7 +431,9 @@data-tippy-content="Import GLB animations. Only Mesh2Motion rigs are supported at this time."aria-label="Import GLB animations. Only Mesh2Motion rigs are supported at this time.">- <span class="material-symbols-outlined">upload</span>++ <img src="images/icons/upload.svg" alt="Upload" width="16" height="16" />+</button><inputid="import-animations-input"@@ -443,7 +449,8 @@data-tippy-content="Exporting will combine all animations into a single GLB file."><span class="button-icon-group">- <span class="material-symbols-outlined">save_alt</span>+ <img src="images/icons/download.svg" alt="Download" width="16" height="16" />+<span>Download<span id="animation-selection-count">0</span></span@@ -465,7 +472,7 @@data-tippy-content="Download options"aria-label="Open download options">- <span class="material-symbols-outlined">arrow_drop_down</span>+ <img src="images/icons/arrow-dropdown.svg" alt="dropdown" width="16" height="16" /></button><divdiff --git a/src/index.html b/src/index.htmlindex fd78749..6888030 100644--- a/src/index.html+++ b/src/index.html@@ -153,15 +153,15 @@</div><button class="secondary-button" id="import-animations-button" data-tippy-content="Import GLB animations. Only Mesh2Motion rigs are supported at this time." aria-label="Import GLB animations. Only Mesh2Motion rigs are supported at this time.">- <span class="material-symbols-outlined">upload</span>+ <img src="images/icons/upload.svg" alt="Upload" width="20" height="20" /></button><input id="import-animations-input" type="file" accept=".glb" multiple style="display:none" /><div class="download-combo"><button id="export-button" data-tippy-content="Exporting will combine all animations into a single GLB file."><span class="button-icon-group">- <span class="material-symbols-outlined">save_alt</span>- <span>Download <span id="animation-selection-count">0</span></span>+ <img src="images/icons/download.svg" alt="Download" width="16" height="16" />+ <span>Download <span id="animation-selection-count">0</span></span></span></button>@@ -176,7 +176,9 @@data-tippy-content="Download options"aria-label="Open download options">- <span class="material-symbols-outlined">arrow_drop_down</span>++ <img src="images/icons/arrow-dropdown.svg" alt="dropdown" width="16" height="16" />+</button><div id="download-settings" class="download-settings-panel" role="dialog" aria-label="Download settings" hidden>diff --git a/src/lib/DOMUtilities.ts b/src/lib/DOMUtilities.tsindex f5c4be0..1b1247c 100644--- a/src/lib/DOMUtilities.ts+++ b/src/lib/DOMUtilities.ts@@ -135,7 +135,9 @@ export class DOMUtilities {mount.innerHTML = `<div id="settings-dropdown-container" class="nav-dropdown"><button id="settings-toggle" class="nav-icon-button" aria-expanded="false" aria-controls="settings-dropdown-content" aria-haspopup="true" aria-label="Open settings">- <span class="material-symbols-outlined">settings</span>++ <img src="images/icons/settings.svg" alt="Settings" width="30" height="30" />+</button><div id="settings-dropdown-content" class="nav-dropdown-content" hidden>diff --git a/src/retarget/index.html b/src/retarget/index.htmlindex b36dd8a..d74a439 100644--- a/src/retarget/index.html+++ b/src/retarget/index.html@@ -53,7 +53,9 @@<span data-tippy-content="This feature is still being developed. The main stable workflow is to use a Mesh2Motion rig that you 'skin' in another application like Blender. Mixamo skeletons supported as long as there is only 1 skeleton in the file." ><span class="button-icon-group"><span>Experimental</span>- <span class="material-symbols-outlined" >help</span>++ <img src="../images/icons/help.svg" alt="Help" width="20" height="20" />+</span></span>@@ -135,7 +137,8 @@aria-label="Continue requirements help"style="display: inline-flex; align-items: center; color: var(--text-secondary); cursor: help;">- <span class="material-symbols-outlined" style="font-size: 1.2rem;">help</span>++ <img src="../images/icons/help.svg" alt="Help" width="20" height="20" /></span></div></span>@@ -184,7 +187,9 @@<!-- I renamed the button ID since we need to process the animations differently --><button id="export-retargeting-button" data-tippy-content="Exporting will combine all animations into a single GLB file."><span class="button-icon-group">- <span class="material-symbols-outlined">save_alt</span>++ <img src="../images/icons/download.svg" alt="Help" width="16" height="16" />+<span>Download <span id="animation-selection-count">0</span></span></span></button>diff --git a/src/settings-dropdown.css b/src/settings-dropdown.cssindex 6b77906..a634404 100644--- a/src/settings-dropdown.css+++ b/src/settings-dropdown.css@@ -14,6 +14,7 @@box-shadow: none;border-radius: 0;padding: 0;+ align-items: anchor-center;}#settings-toggle span {align-content: center; /* vertical align icon */diff --git a/src/styles.css b/src/styles.cssindex ab9036e..b81ad69 100644--- a/src/styles.css+++ b/src/styles.css@@ -310,7 +310,7 @@ button:disabled {.button-icon-group {display: flex;- align-items: end;+ align-items: anchor-center;justify-content: center;column-gap: 6px;}diff --git a/static/images/icons/arrow-dropdown.svg b/static/images/icons/arrow-dropdown.svgnew file mode 100644index 0000000..fb3ffd0--- /dev/null+++ b/static/images/icons/arrow-dropdown.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,-1133.185126,-294.932969)">+ <g id="Arrow-drop-down" serif:id="Arrow drop-down" transform="matrix(1,0,0,1,1133.185126,294.932969)">+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>+ <g transform="matrix(-1.39576,-0,0,-0.90106,1946.957288,546.665917)">+ <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>diff --git a/static/images/icons/download.svg b/static/images/icons/download.svgnew file mode 100644index 0000000..6b16ec7--- /dev/null+++ b/static/images/icons/download.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,-558.875313,-294.932969)">+ <g id="Download" transform="matrix(1,0,0,1,558.875313,294.932969)">+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>+ <g transform="matrix(13.01357,0,0,13.01357,-28.162844,-28.162844)">+ <path d="M18,15L18,18L6,18L6,15L4,15L4,18C4,19.1 4.9,20 6,20L18,20C19.1,20 20,19.1 20,18L20,15L18,15ZM17,11L15.59,9.59L13,12.17L13,4L11,4L11,12.17L8.41,9.59L7,11L12,16L17,11Z" style="fill:rgb(210,210,210);fill-rule:nonzero;"/>+ </g>+ </g>+ </g>+</svg>diff --git a/static/images/icons/help.svg b/static/images/icons/help.svgnew file mode 100644index 0000000..3cbad2b--- /dev/null+++ b/static/images/icons/help.svg@@ -0,0 +1,17 @@+<?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,-0.509721,-604.917133)">+ <g id="Help" transform="matrix(1,0,0,1,0.509721,604.917133)">+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>+ <g transform="matrix(1.118914,0,0,1.118914,-21.577433,-690.567928)">+ <path d="M133.681,633.445C187.84,633.445 231.81,677.415 231.81,731.573C231.81,785.732 187.84,829.702 133.681,829.702C79.522,829.702 35.552,785.732 35.552,731.573C35.552,677.415 79.522,633.445 133.681,633.445ZM133.681,647.919C87.511,647.919 50.027,685.403 50.027,731.573C50.027,777.744 87.511,815.228 133.681,815.228C179.851,815.228 217.335,777.744 217.335,731.573C217.335,685.403 179.851,647.919 133.681,647.919Z" style="fill:rgb(216,216,216);"/>+ </g>+ <g transform="matrix(1.377827,0,0,1.377827,-29.787789,-877.785197)">+ <g transform="matrix(109.152811,0,0,109.152811,145.64495,769.099755)">+ </g>+ <text x="83.074px" y="769.1px" style="font-family:'ArialRoundedMTBold', 'Arial Rounded MT Bold', sans-serif;font-size:109.153px;fill:rgb(202,202,202);">?</text>+ </g>+ </g>+ </g>+</svg>diff --git a/static/images/icons/settings.svg b/static/images/icons/settings.svgnew file mode 100644index 0000000..9125e8c--- /dev/null+++ b/static/images/icons/settings.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,-276.928684,-604.917133)">+ <g id="Settings" transform="matrix(1,0,0,1,276.928684,604.917133)">+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>+ <g transform="matrix(1.07993,0,0,1.07993,-317.476261,-668.739064)">+ <path d="M424.326,657.489L470.601,675.371L458.78,701.996L487.319,690.967L506.487,734.138L477.948,745.166L506.487,756.194L487.319,799.365L458.78,788.337L470.601,814.961L424.326,832.843L412.505,806.218L400.683,832.843L354.408,814.961L366.23,788.337L337.69,799.365L318.522,756.194L347.062,745.166L318.522,734.138L337.69,690.967L366.23,701.996L354.408,675.371L400.683,657.489L412.505,684.114L424.326,657.489ZM430.37,672.104L422.973,688.762C421.136,692.9 417.033,695.568 412.505,695.568C407.977,695.568 403.874,692.9 402.036,688.762L394.64,672.104L369.759,681.719L376.698,697.347C378.579,701.584 377.721,706.536 374.525,709.893C371.329,713.251 366.425,714.35 362.101,712.68L343.734,705.582L333.873,727.79L351.19,734.482C355.605,736.188 358.516,740.433 358.516,745.166C358.516,749.899 355.605,754.144 351.19,755.85L333.873,762.542L343.734,784.75L362.101,777.652C366.425,775.982 371.329,777.082 374.525,780.439C377.721,783.796 378.579,788.748 376.698,792.985L369.759,808.614L394.64,818.228L402.036,801.57C403.874,797.432 407.977,794.764 412.505,794.764C417.033,794.764 421.136,797.432 422.973,801.57L430.37,818.228L455.251,808.614L448.312,792.985C446.431,788.748 447.288,783.796 450.484,780.439C453.681,777.082 458.585,775.982 462.909,777.652L481.276,784.75L491.137,762.542L473.819,755.85C469.405,754.144 466.494,749.899 466.494,745.166C466.494,740.433 469.405,736.188 473.819,734.482L491.137,727.79L481.276,705.582L462.909,712.68C458.585,714.35 453.681,713.251 450.484,709.893C447.288,706.536 446.431,701.584 448.312,697.347L455.251,681.719L430.37,672.104Z" style="fill:rgb(216,216,216);"/>+ </g>+ <g transform="matrix(0.603175,0,0,0.603175,-116.277393,-308.523027)">+ <circle cx="404.986" cy="736.952" r="31.843" style="fill:rgb(218,218,218);"/>+ </g>+ </g>+ </g>+</svg>diff --git a/static/images/icons/upload.svg b/static/images/icons/upload.svgnew file mode 100644index 0000000..fb78471--- /dev/null+++ b/static/images/icons/upload.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,-853.064108,-294.932969)">+ <g id="Upload" transform="matrix(1,0,0,1,853.064108,294.932969)">+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>+ <g transform="matrix(13.01357,0,0,13.01357,-26.868907,-28.162844)">+ <path d="M18,15L18,18L6,18L6,15L4,15L4,18C4,19.1 4.9,20 6,20L18,20C19.1,20 20,19.1 20,18L20,15L18,15ZM7,9L8.41,10.41L11,7.83L11,16L13,16L13,7.83L15.59,10.41L17,9L12,4L7,9Z" style="fill:rgb(212,212,212);fill-rule:nonzero;"/>+ </g>+ </g>+ </g>+</svg>