3D viewer: non-blocking STEP parse in Web Worker, loading progress bar, data overlay (file size + triangle count), finer tessellation + flat shading
This commit is contained in:
@@ -810,6 +810,7 @@ html.theme-light #content code {
|
||||
|
||||
/* ---------- 3D model viewer (STL / STEP) ---------- */
|
||||
.model-viewer {
|
||||
position: relative;
|
||||
margin: 1em 0;
|
||||
background: #1d2021;
|
||||
border: 1px solid var(--background-highlight);
|
||||
@@ -817,6 +818,22 @@ html.theme-light #content code {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.model-viewer-data {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 10px;
|
||||
z-index: 3;
|
||||
display: none;
|
||||
font-size: 0.75em;
|
||||
color: #a89984;
|
||||
background: rgba(40, 40, 40, 0.8);
|
||||
border: 1px solid #504945;
|
||||
border-radius: 6px;
|
||||
padding: 2px 10px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.model-viewer-canvas {
|
||||
position: relative;
|
||||
}
|
||||
@@ -832,6 +849,33 @@ html.theme-light #content code {
|
||||
color: #fb4934;
|
||||
}
|
||||
|
||||
.model-viewer-progress {
|
||||
position: relative;
|
||||
height: 6px;
|
||||
margin: 0 48px 22px;
|
||||
background: #3c3836;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.model-viewer-progress-fill {
|
||||
height: 100%;
|
||||
width: 0;
|
||||
background: #b8bb26;
|
||||
border-radius: 3px;
|
||||
transition: width 150ms ease;
|
||||
}
|
||||
|
||||
.model-viewer-progress-fill.indeterminate {
|
||||
width: 40%;
|
||||
animation: model-progress 1.1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes model-progress {
|
||||
0% { transform: translateX(-100%); }
|
||||
100% { transform: translateX(250%); }
|
||||
}
|
||||
|
||||
.model-viewer-hint {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
|
||||
Reference in New Issue
Block a user