Import a 3D Model and automatically assign and export animations
TypeScript
/* Explore page left sidebar: skeleton buttons on top, model variations below */
body.explore-page {
--explore-sidebar-width: 10.5rem;
/* tool panel width is content-driven, so this is an approximation */
--explore-tool-panel-width: 25rem;
}
/* center the animation player between the left sidebar and right tool panel */
body.explore-page #animation-player {
left: calc(50% + (var(--explore-sidebar-width) - var(--explore-tool-panel-width)) / 2);
}
.model-selection-section {
display: flex;
flex-direction: column;
gap: 0.75rem;
position: fixed;
left: 0;
top: var(--navigation-height);
bottom: 0;
width: var(--explore-sidebar-width);
box-sizing: border-box;
padding: 0.75rem;
z-index: 1; /* above the 3d gizmo if they overlap on small screens */
background: radial-gradient(circle, var(--bg-alternate) 0%, var(--bg-primary) 100%);
box-shadow: 1px 1px 8px 0px var(--bg-primary);
border-right: 1px solid var(--bg-tertiary);
}
.sidebar-heading {
margin: 0;
text-align: center;
font-size: 0.85rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
opacity: 0.7;
flex-shrink: 0;
}
/* the sidebar's flex gap already spaces sections; keep each heading close to its own content */
.sidebar-heading + #skeleton-buttons {
margin-top: -0.4rem;
}
#skeleton-buttons {
display: flex;
flex-direction: column;
flex-shrink: 0;
}
#skeleton-buttons button:first-child {
border-top-left-radius: 1rem;
border-top-right-radius: 1rem;
}
#skeleton-buttons button:last-child {
border-bottom-left-radius: 1rem;
border-bottom-right-radius: 1rem;
}
#skeleton-buttons button {
height: 2.5rem;
background: none;
box-shadow: none;
border-radius: 0;
border: 1px solid var(--bg-tertiary); /* neutral so the selected rig's fill stands out */
background-color: var(--nav-background);
}
#skeleton-buttons button:hover {
transform: scale(1.0);
background-color: var(--nav-active-item-bg);
}
/* selected rig: softened fill. Needs the id selector to beat '#skeleton-buttons button' above */
#skeleton-buttons button.active-button,
#skeleton-buttons button.active-button:hover {
background-color: color-mix(in srgb, var(--button-primary-bg) 55%, var(--nav-background));
}
/* variation list takes the remaining sidebar height and scrolls on its own */
#variation-section {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
gap: 0.35rem;
}
.variation-grid {
display: flex;
flex-direction: column;
gap: 0.25rem;
flex: 1;
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
}
.variation-empty-message {
padding: 0.5rem;
text-align: center;
font-style: italic;
opacity: 0.7;
}
.variation-card {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.25rem;
border: 2px solid var(--border-color);
border-radius: 8px;
padding: 0.25rem;
cursor: pointer;
background: var(--bg-alternate);
transition: box-shadow 0.25s;
position: relative;
flex-shrink: 0; /* keep cards full height so the list scrolls instead of squashing them */
box-sizing: border-box;
max-width: 100%;
}
.variation-card:hover {
box-shadow: 0 0 0 2px var(--text-alternate);
}
.variation-card.selected {
box-shadow: 0 0 0 2px var(--text-primary);
}
.variation-preview-image {
width: 100%;
aspect-ratio: 1;
flex-shrink: 0;
object-fit: contain;
border-radius: 6px;
background: var(--bg-primary);
margin: 0;
filter: none !important; /* avoid inverting image like we do for icons in light mode */
}
/* license chip overlaid on the bottom-right of the thumbnail */
.variation-details {
position: absolute;
left: 0.6rem;
right: 0.6rem;
bottom: 0.6rem;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
gap: 0.3rem;
min-width: 0;
pointer-events: none; /* clicks fall through to the card; license chip re-enables for its tooltip */
}
.variation-tooltip-author {
font-weight: normal;
margin-bottom: 0.2rem;
}
.variation-license-chip {
flex-shrink: 0;
margin-left: auto; /* stay bottom-right even when there is no credit */
padding: 0.1rem 0.4rem;
border-radius: 4px;
background: rgba(0, 0, 0, 0.55);
color: #fff;
font-size: 80%;
pointer-events: auto;
}
.variation-license-chip:hover {
background: rgba(0, 0, 0, 0.8);
}
.variation-loading-container {
display: flex;
flex-direction: column;
flex-shrink: 0;
margin: 0;
}
.variation-loading-track {
width: 100%;
background: var(--bg-alternate);
border-radius: 4px;
overflow: hidden;
border: 1px solid var(--border-color);
display: flex;
flex-direction: row;
gap: 0.5rem;
align-items: center;
}
.variation-loading-bar {
flex: 1;
height: 100%;
background-color: var(--button-primary-bg);
border-radius: 4px;
transform: scaleX(0);
transform-origin: left center;
transition: transform 0.2s ease;
display: block;
}
.variation-loading-text {
color: var(--text-primary);
white-space: nowrap;
flex-shrink: 0;
font-size: 90%;
}
/* mouse hints, view gizmo and build version sit to the right of the sidebar */
body.explore-page #header-ui,
body.explore-page #view-control-hitbox,
body.explore-page #build-version {
left: var(--explore-sidebar-width);
}
body.explore-page #header-ui {
margin-left: 5px;
}