Skip to content

Import a 3D Model and automatically assign and export animations

TypeScript

Add icons for transform tools and edit skeleton mesh preview

Scott Petrovic5bbd8a0ac10d
diff --git a/art-source/tool-icons.afdesign b/art-source/tool-icons.afdesign
new file mode 100644
index 0000000..db6afc7
Binary files /dev/null and b/art-source/tool-icons.afdesign differ
diff --git a/src/index.html b/src/index.html
index cd010a9..02fe62f 100644
--- a/src/index.html
+++ b/src/index.html
@@ -120,7 +120,6 @@
<span id="skeleton-step-actions">
-
<p class="step-instructions">Move bones into position.</p>
<p id="bone-selection-section">
@@ -129,8 +128,12 @@
<!-- controls to change transfrom mode between transform and rotation -->
<span style="display: flex; flex-direction: row; align-items: center; column-gap: 5px;">
<span>Controls:</span>
- <button id="translate-mode-button" class="secondary-button">Translate</button>
- <button id="rotate-mode-button" class="secondary-button">Rotate</button>
+ <button id="translate-mode-button" class="secondary-button">
+ <img src="images/icons/tool-move.svg" alt="Translate" width="20" height="20" title="translate" />
+ </button>
+ <button id="rotate-mode-button" class="secondary-button">
+ <img src="images/icons/tool-rotate.svg" alt="Translate" width="20" height="20" title="translate" />
+ </button>
</span>
</p>
@@ -145,8 +148,12 @@
<div style="display: flex; flex-direction: row; align-items: center; column-gap: 5px; ">
<span>Preview:</span>
<div id="texture-model-buttons-container" style="display: flex; gap: 5px;">
- <button class="secondary-button" id="model-preview-textured-button">Textured</button>
- <button class="secondary-button" id="model-preview-weight-painted-button">Weights</button>
+ <button class="secondary-button" id="model-preview-textured-button">
+ <img src="images/icons/display-textured.svg" alt="Textured" width="20" height="20" title="textured" />
+ </button>
+ <button class="secondary-button" id="model-preview-weight-painted-button">
+ <img src="images/icons/display-weight-painted.svg" alt="Weights" width="20" height="20" title="weights" />
+ </button>
</div>
</div>
diff --git a/src/styles.css b/src/styles.css
index f6ad07f..2edc920 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -67,7 +67,8 @@ input[type="number"] {
button.secondary-button {
background: #657a7638;
border-radius: 3px;
- border-width: 2px;
+ border-width: 1px;
+ border-color: grey;
cursor: pointer;
transition: all 0.1s ease-in-out;
}
diff --git a/static/images/icons/display-textured.svg b/static/images/icons/display-textured.svg
new file mode 100644
index 0000000..55624e7
--- /dev/null
+++ b/static/images/icons/display-textured.svg
@@ -0,0 +1,53 @@
+<?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:1.5;">
+ <g transform="matrix(1,0,0,1,-571.171,-0.756658)">
+ <g id="Artboard1" transform="matrix(1,0,0,1,571.171,0.756658)">
+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>
+ <clipPath id="_clip1">
+ <rect x="0" y="0" width="256" height="256"/>
+ </clipPath>
+ <g clip-path="url(#_clip1)">
+ <g transform="matrix(1.31425,0,0,1.36946,-1155.26,-54.916)">
+ <path d="M1071.78,61.585L1071.78,205.858C1071.78,215.799 1063.37,223.87 1053.01,223.87L902.86,223.87C892.501,223.87 884.091,215.799 884.091,205.858L884.091,61.585C884.091,51.644 892.501,43.573 902.86,43.573L1053.01,43.573C1063.37,43.573 1071.78,51.644 1071.78,61.585Z" style="fill:rgb(231,231,231);"/>
+ </g>
+ <g transform="matrix(1.47953,0,0,1.47953,-891.832,-65.6813)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(9.05951e-17,1.47953,-1.47953,9.05951e-17,445.864,-987.166)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(9.05951e-17,1.47953,-1.47953,9.05951e-17,445.864,-950.063)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(9.05951e-17,1.47953,-1.47953,9.05951e-17,445.864,-911.254)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(-1.47953,1.8119e-16,-1.8119e-16,-1.47953,1151.73,321.533)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(-1.47953,1.8119e-16,-1.8119e-16,-1.47953,1114.63,321.533)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(-1.47953,1.8119e-16,-1.8119e-16,-1.47953,1075.82,321.533)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(9.05951e-17,-1.47953,1.47953,9.05951e-17,-186.578,1243.02)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(9.05951e-17,-1.47953,1.47953,9.05951e-17,-186.578,1205.92)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(9.05951e-17,-1.47953,1.47953,9.05951e-17,-186.578,1167.11)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(1.47953,0,0,1.47953,-854.729,-65.6813)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ <g transform="matrix(1.47953,0,0,1.47953,-815.92,-65.6813)">
+ <path d="M696.437,213.797L696.437,130.925" style="fill:none;stroke:rgb(174,174,174);stroke-width:8.11px;"/>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/static/images/icons/display-weight-painted.svg b/static/images/icons/display-weight-painted.svg
new file mode 100644
index 0000000..8d546be
--- /dev/null
+++ b/static/images/icons/display-weight-painted.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,-854.917,-0.756658)">
+ <g id="Artboard1" transform="matrix(1,0,0,1,854.917,0.756658)">
+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>
+ <g transform="matrix(2.12318,0,0,2.12318,-1930.02,-116.591)">
+ <path d="M937.571,140.087C939.338,132.672 946.012,127.15 953.965,127.15C963.266,127.15 970.817,134.702 970.817,144.003C970.817,147.031 970.017,149.874 968.616,152.332C968.108,153.736 967.135,155.182 965.574,156.649C954.051,167.481 918.561,161.028 918.561,161.028C918.561,161.028 932.824,150.6 937.571,140.087Z" style="fill:rgb(223,223,223);"/>
+ </g>
+ <g transform="matrix(2.05161,0,0,2.05161,-1844.86,-201.795)">
+ <path d="M963.388,173.056C962.783,172.38 962.117,171.755 961.574,171.029C961.381,170.771 959.978,168.897 959.936,167.345C959.925,166.925 960.009,166.435 960.311,166.144C978.073,148.975 996.114,132.096 1014.02,115.072C1014.15,114.947 1014.89,114.239 1016.11,114.203C1016.36,114.196 1018.04,114.146 1018.78,115.862C1019.24,116.926 1018.9,117.898 1018.85,118.065C1018.38,119.404 1018.12,119.267 970.473,175.715C969.711,176.617 967.782,175.893 967.564,175.811C966.845,175.541 966.16,175.17 965.518,174.747C965.515,174.744 963.389,173.057 963.388,173.056Z" style="fill:rgb(226,226,226);"/>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/static/images/icons/tool-move.svg b/static/images/icons/tool-move.svg
new file mode 100644
index 0000000..f758776
--- /dev/null
+++ b/static/images/icons/tool-move.svg
@@ -0,0 +1,33 @@
+<?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,-282.99,-0.756658)">
+ <g id="Artboard1" transform="matrix(1,0,0,1,282.99,0.756658)">
+ <rect x="0" y="0" width="256" height="256" style="fill:none;"/>
+ <g transform="matrix(2.82994,3.04443e-32,-3.04443e-32,2.82994,-218.265,-435.363)">
+ <g transform="matrix(1,0,0,1,-1.85956,-0.929782)">
+ <path d="M125.464,155.827L137.861,173.493L113.067,173.493L125.464,155.827Z" style="fill:rgb(228,228,228);"/>
+ </g>
+ <rect x="120.192" y="175.754" width="6.03" height="11.743" style="fill:rgb(228,228,228);"/>
+ </g>
+ <g transform="matrix(1.73284e-16,2.82994,-2.82994,1.73284e-16,690.998,-220.296)">
+ <g transform="matrix(1,0,0,1,-1.85956,-0.929782)">
+ <path d="M125.464,155.827L137.861,173.493L113.067,173.493L125.464,155.827Z" style="fill:rgb(228,228,228);"/>
+ </g>
+ <rect x="120.192" y="175.754" width="6.03" height="11.743" style="fill:rgb(228,228,228);"/>
+ </g>
+ <g transform="matrix(-2.82994,3.46568e-16,-3.46568e-16,-2.82994,479.973,692.56)">
+ <g transform="matrix(1,0,0,1,-1.85956,-0.929782)">
+ <path d="M125.464,155.827L137.861,173.493L113.067,173.493L125.464,155.827Z" style="fill:rgb(228,228,228);"/>
+ </g>
+ <rect x="120.192" y="175.754" width="6.03" height="11.743" style="fill:rgb(228,228,228);"/>
+ </g>
+ <g transform="matrix(1.73284e-16,-2.82994,2.82994,1.73284e-16,-432.433,478.391)">
+ <g transform="matrix(1,0,0,1,-1.85956,-0.929782)">
+ <path d="M125.464,155.827L137.861,173.493L113.067,173.493L125.464,155.827Z" style="fill:rgb(228,228,228);"/>
+ </g>
+ <rect x="120.192" y="175.754" width="6.03" height="11.743" style="fill:rgb(228,228,228);"/>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/static/images/icons/tool-rotate.svg b/static/images/icons/tool-rotate.svg
new file mode 100644
index 0000000..0c27071
--- /dev/null
+++ b/static/images/icons/tool-rotate.svg
@@ -0,0 +1,22 @@
+<?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-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;">
+ <rect id="Artboard1" x="0" y="0" width="256" height="256" style="fill:none;"/>
+ <g id="Artboard11" serif:id="Artboard1">
+ <g transform="matrix(-2.54015,3.11079e-16,-3.11079e-16,-2.54015,357.977,558.3)">
+ <path d="M125.464,155.827L137.861,173.493L113.067,173.493L125.464,155.827Z" style="fill:rgb(228,228,228);"/>
+ </g>
+ <g transform="matrix(2.54015,-6.22158e-16,6.22158e-16,2.54015,-95.3207,-303.295)">
+ <path d="M125.464,155.827L137.861,173.493L113.067,173.493L125.464,155.827Z" style="fill:rgb(228,228,228);"/>
+ </g>
+ <g transform="matrix(2.88911,0,0,2.88911,-82.7847,-399.063)">
+ <path d="M43.196,173.622C43.196,173.622 44.692,158.517 65.015,150.811C83.743,143.71 96.752,158.497 96.752,158.497" style="fill:none;stroke:rgb(233,233,233);stroke-width:4.15px;"/>
+ </g>
+ <g transform="matrix(-2.88893,0.0319341,-0.0319341,-2.88893,351.75,652.914)">
+ <path d="M43.196,173.622C43.196,173.622 44.914,159.081 65.015,150.811C82.315,143.694 96.752,158.497 96.752,158.497" style="fill:none;stroke:rgb(233,233,233);stroke-width:4.15px;"/>
+ </g>
+ <g transform="matrix(1.40309,1.40309,-1.40309,1.40309,263.563,-246.883)">
+ <rect x="73.693" y="168.415" width="24.422" height="24.422" style="fill:rgb(228,228,228);"/>
+ </g>
+ </g>
+</svg>