Update card production workflow and workspaces

This commit is contained in:
2026-09-26 10:42:05 -07:00
parent 5e49435127
commit c09f3b815c
549 changed files with 27659 additions and 64 deletions

View File

@@ -262,7 +262,11 @@ function setControlsCollapsed(collapsed: boolean) {
collapsed ? 'v' : '^'
}
setControlsCollapsed(window.matchMedia('(max-width: 880px)').matches)
const narrowControlsMedia = window.matchMedia('(max-width: 880px)')
const shortPackControlsMedia = window.matchMedia(
'(max-height: 540px) and (min-aspect-ratio: 4/3) and (max-width: 1120px)',
)
setControlsCollapsed(narrowControlsMedia.matches)
const renderer = new THREE.WebGLRenderer({
canvas,
@@ -817,6 +821,7 @@ function updateMode() {
const previousMode = mode
mode = modeSelect.value as AppMode
if (previousMode !== mode) {
setControlsCollapsed(narrowControlsMedia.matches || (mode === 'Pack' && shortPackControlsMedia.matches))
frameTimes.length = 0
cpuUpdateTimes.length = 0
cpuSubmitTimes.length = 0
@@ -833,7 +838,6 @@ function updateMode() {
// Freeze the normal pose, including a partially finished flip, while it is hidden.
rotationTarget.copy(cardRoot.rotation)
loadingElement.hidden = true
if (window.matchMedia('(max-width: 880px)').matches) setControlsCollapsed(true)
void preparePack()
} else {
pack?.setActive(false)
@@ -1830,6 +1834,12 @@ function animate(frameTime: number) {
renderer.setAnimationLoop(animate)
window.addEventListener('resize', resizeRenderer)
const syncResponsiveControls = () => {
setControlsCollapsed(narrowControlsMedia.matches || (mode === 'Pack' && shortPackControlsMedia.matches))
requestAnimationFrame(resizeRenderer)
}
narrowControlsMedia.addEventListener('change', syncResponsiveControls)
shortPackControlsMedia.addEventListener('change', syncResponsiveControls)
new ResizeObserver(resizeRenderer).observe(canvas)
orbit.addEventListener('change', () => renderCadence.invalidate())
// Capture before handlers mutate controls or poses. Async asset completion also

View File

@@ -390,7 +390,9 @@ button:disabled {
.pack-mode .toolbar .variant-control { display: grid; }
.pack-mode .toolbar {
flex: 0 1 400px;
/* Pack currently exposes five controls. Keep enough intrinsic width for one
row instead of retaining the old two-control, 400px layout. */
flex: 1 1 760px;
}
.pack-mode .hint {
@@ -413,6 +415,13 @@ button:disabled {
flex-basis: 100%;
justify-content: flex-start;
}
/* The compact Pack toolbar still fits beside the title at desktop widths.
This pack-specific rule also prevents the base flex shorthand from
accidentally defeating responsive flex-basis changes. */
.pack-mode .toolbar {
flex-basis: 760px;
}
}
@media (max-width: 880px) {
@@ -542,6 +551,47 @@ button:disabled {
}
@media (max-height: 540px) and (min-aspect-ratio: 4/3) {
.pack-mode .topbar {
flex-wrap: nowrap;
align-items: flex-end;
gap: 12px;
min-height: 0;
padding: 6px 12px;
}
.pack-mode .title-row {
flex: 0 0 auto;
}
.pack-mode .eyebrow {
display: none;
}
.pack-mode h1 {
font-size: 18px;
line-height: 34px;
white-space: nowrap;
}
.pack-mode .toolbar {
flex: 1 1 auto;
flex-wrap: nowrap;
width: auto;
}
.pack-mode .toolbar label {
flex: 1 1 110px;
min-width: 0;
}
.pack-mode .toolbar .pack-style {
flex: 1.5 1 170px;
}
.pack-mode footer {
display: none;
}
.pack-controls {
right: 12px;
left: auto;
@@ -583,3 +633,24 @@ button:disabled {
font-size: 10px;
}
}
@media (max-height: 540px) and (min-aspect-ratio: 4/3) and (max-width: 1120px) {
.pack-mode .topbar {
flex-wrap: wrap;
align-items: flex-start;
}
.pack-mode .title-row {
width: 100%;
}
.pack-mode .controls-toggle {
display: inline-flex;
}
.pack-mode .toolbar {
flex-basis: 100%;
flex-wrap: wrap;
width: 100%;
}
}