78 lines
2.2 KiB
HTML
78 lines
2.2 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Book Shape Lab</title>
|
|
<style>
|
|
html,
|
|
body {
|
|
margin: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
background: #202124;
|
|
color: #eeeeee;
|
|
font-family: system-ui, sans-serif;
|
|
}
|
|
|
|
#scene {
|
|
display: block;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
}
|
|
|
|
#shape_panel {
|
|
position: fixed;
|
|
left: 16px;
|
|
right: 16px;
|
|
bottom: 16px;
|
|
display: grid;
|
|
grid-template-columns: auto 1fr auto;
|
|
gap: 12px;
|
|
align-items: center;
|
|
max-width: 720px;
|
|
padding: 10px 12px;
|
|
background: rgba(20, 20, 20, 0.86);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: 6px;
|
|
}
|
|
|
|
#progress,
|
|
#page_count {
|
|
width: 100%;
|
|
}
|
|
|
|
button {
|
|
min-height: 32px;
|
|
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
border-radius: 4px;
|
|
background: #2b2d30;
|
|
color: #f0f0f0;
|
|
font: inherit;
|
|
cursor: pointer;
|
|
}
|
|
|
|
button:disabled {
|
|
cursor: default;
|
|
opacity: 0.45;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<canvas id="scene" aria-label="Procedural book shape lab"></canvas>
|
|
<div id="shape_panel">
|
|
<label for="progress">Reading progress</label>
|
|
<input id="progress" type="range" min="0" max="1" step="0.001" value="0.25">
|
|
<output id="progress_value" for="progress">0.25</output>
|
|
<label for="page_count">Book pages</label>
|
|
<input id="page_count" type="range" min="40" max="600" step="10" value="240">
|
|
<output id="page_count_value" for="page_count">240</output>
|
|
<button id="flip_backward" type="button">Backward</button>
|
|
<button id="flip_forward" type="button">Forward</button>
|
|
<output id="flip_count">0 / 10</output>
|
|
</div>
|
|
<script type="module" src="/js/webgl-book-shape-lab.js?v=flip-3d-surface-3"></script>
|
|
</body>
|
|
</html>
|