Checkpoint WebGL procedural book lab
This commit is contained in:
@@ -26,15 +26,16 @@
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
inset: 0 0 auto;
|
||||
height: 38px;
|
||||
min-height: 38px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 18px;
|
||||
gap: 16px;
|
||||
padding: 4px 14px;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(180deg, rgba(13, 9, 6, 0.94), rgba(13, 9, 6, 0.58));
|
||||
border-bottom: 1px solid rgba(214, 180, 125, 0.22);
|
||||
pointer-events: none;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
#lab_title {
|
||||
@@ -46,6 +47,75 @@
|
||||
#lab_status {
|
||||
font-size: 13px;
|
||||
color: rgba(241, 222, 192, 0.72);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#book_controls {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
font-size: 12px;
|
||||
color: rgba(241, 222, 192, 0.86);
|
||||
}
|
||||
|
||||
.control_group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.control_group label {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#book_controls input[type="range"] {
|
||||
width: clamp(96px, 15vw, 230px);
|
||||
accent-color: #d79b36;
|
||||
}
|
||||
|
||||
#book_controls output {
|
||||
min-width: 38px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
color: rgba(241, 222, 192, 0.76);
|
||||
}
|
||||
|
||||
.transport_button {
|
||||
width: 28px;
|
||||
height: 26px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: 1px solid rgba(214, 180, 125, 0.32);
|
||||
background: rgba(37, 19, 11, 0.72);
|
||||
color: #f1dec0;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.transport_button:disabled {
|
||||
opacity: 0.38;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
#lab_status {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#book_controls {
|
||||
justify-content: flex-end;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.control_group label {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -53,6 +123,22 @@
|
||||
<canvas id="scene" aria-label="Procedural book scene lab"></canvas>
|
||||
<div id="lab_menu">
|
||||
<div id="lab_title">Procedural Book Lab</div>
|
||||
<div id="book_controls" aria-label="Book controls">
|
||||
<button class="transport_button" id="fast_backward" type="button" title="Fast backward" aria-label="Fast backward">⏪</button>
|
||||
<button class="transport_button" id="flip_backward" type="button" title="Backward" aria-label="Backward">◀</button>
|
||||
<div class="control_group">
|
||||
<label for="progress_control">Progress</label>
|
||||
<input id="progress_control" type="range" min="0" max="1" step="0.001">
|
||||
<output id="progress_value" for="progress_control">0.28</output>
|
||||
</div>
|
||||
<div class="control_group">
|
||||
<label for="page_count_control">Pages</label>
|
||||
<input id="page_count_control" type="range" min="40" max="500" step="10">
|
||||
<output id="page_count_value" for="page_count_control">240</output>
|
||||
</div>
|
||||
<button class="transport_button" id="flip_forward" type="button" title="Forward" aria-label="Forward">▶</button>
|
||||
<button class="transport_button" id="fast_forward" type="button" title="Fast forward" aria-label="Fast forward">⏩</button>
|
||||
</div>
|
||||
<div id="lab_status">standalone scene</div>
|
||||
</div>
|
||||
<script type="module" src="/js/webgl-book-lab.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user