Import a 3D Model and automatically assign and export animations
TypeScript
Use a 3 col grid layout when showing animations
Scott Petrovicd185593cad8f
diff --git a/src/lib/AnimationSearch.ts b/src/lib/AnimationSearch.tsindex 2e5156f..b524251 100644--- a/src/lib/AnimationSearch.ts+++ b/src/lib/AnimationSearch.ts@@ -138,10 +138,10 @@ export class AnimationSearch {`<div class="anim-item"><button class="secondary-button play" data-index="${original_index}" style="display: flex; flex-direction:column"><div class="anim-preview-placeholder" data-src="../animpreviews/${preview_folder}/${theme_name}_${anim_name}.webm" style="pointer-events: none;"></div>- <span class="anim-preview-label">${this.animation_name_clean(animation_clip.name)}</span></button><div class="styled-checkbox"><input type="checkbox" name="${animation_clip.name}" value="${original_index}" ${checked_attribute}>+ <span class="anim-preview-label">${this.animation_name_clean(animation_clip.name)}</span></div></div>`})diff --git a/src/styles.css b/src/styles.cssindex 064c412..f1c0db4 100644--- a/src/styles.css+++ b/src/styles.css@@ -26,7 +26,7 @@--text-alternate: #96a5ac;--bg-primary: #ecf0f1;- --bg-alternate: #cdd7dd;+ --bg-alternate: #bac9d2;--bg-tertiary: #8b9bac;--button-primary-bg: #73b6e2f8;@@ -133,12 +133,21 @@ button.secondary-button:hover {button.secondary-button.play{- padding: 0.2rem 0.5rem;+ padding: 0;display: inline-flex;+ background: var(--bg-primary);flex-grow: 1;align-items: center;border: none;border-radius: 0;+ box-shadow: none;+ margin-right: 0;+ border: 1px solid var(--bg-tertiary);+}+button.secondary-button.play:hover {+ transform: scale(1.0);+ border: 1px solid var(--text-alternate);+ transition: all 0.4s ease;}button, .button {@@ -250,7 +259,7 @@ option {box-shadow: 1px 1px 8px 0px var(--bg-primary);top: 0;right: 0;- border: 1px dotted var(--text-primary);+ border-left: 1px solid var(--bg-tertiary);padding: 0.5rem;height: 100%;overflow-y: auto;@@ -292,16 +301,21 @@ option {#animations-items{max-height: 15rem;- display: flex;- overflow: auto;- flex-direction: column;+ display: inline-flex;+ overflow: auto;;+ flex-direction: row;margin-bottom: 1rem;- border: 1px solid var(--text-primary);+ background: var(--bg-alternate);+ border: 1px solid var(--bg-tertiary);+ gap: 0.25rem;+ flex-wrap: wrap;+ overflow-x: hidden;+ width: 25.7rem; /* createss 3 column of animation items */}#animations-items div {- display: flex;- justify-content: space-between;+ display: inline-flex;+ padding: 0;}/* have every other div child be a different background color */#animations-items > div:nth-child(odd) {@@ -313,8 +327,13 @@ option {.anim-item {display: flex;+ flex-direction: column;justify-content: space-between;padding: 0;++ /* specify dimensions helps grid layout without jumbling elements */+ width: 100px;+ height: 153px;}.anim-preview-label {@@ -430,6 +449,7 @@ input[type="file"] {display: flex;align-items: center;gap: 0; /* Space between checkbox and label */+ margin-bottom: 0.4rem;}.styled-checkbox input[type="checkbox"] {