Spaces:
Running
Running
Commit ·
a58047e
1
Parent(s): 0c57009
Add camera rotation controls to index.html and update styles in style.css
Browse files- Introduced a new camera rotation control section in index.html with clockwise and counterclockwise buttons.
- Updated styles in style.css for the new camera rotation controls, enhancing layout and button design for improved usability.
- index.html +4 -7
- style.css +21 -10
index.html
CHANGED
|
@@ -50,6 +50,10 @@
|
|
| 50 |
|
| 51 |
<div id="canvas-wrap">
|
| 52 |
<svg id="c"></svg>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
<div class="zoom-bar">
|
| 54 |
<button type="button" class="zoom-btn" id="zoom-out" aria-label="Zoom out">−</button>
|
| 55 |
<span id="zoom-label" class="zoom-label">100%</span>
|
|
@@ -125,13 +129,6 @@
|
|
| 125 |
<label for="input-front-arc">Front arc <span id="val-front-arc">180</span>°</label>
|
| 126 |
<input id="input-front-arc" type="range" min="10" max="350" step="5" value="180" />
|
| 127 |
</div>
|
| 128 |
-
<div class="ctrl">
|
| 129 |
-
<label>Rotation</label>
|
| 130 |
-
<div class="dir-toggle">
|
| 131 |
-
<button type="button" class="dir-btn" id="dir-cw">↻ CW</button>
|
| 132 |
-
<button type="button" class="dir-btn" id="dir-ccw">↺ CCW</button>
|
| 133 |
-
</div>
|
| 134 |
-
</div>
|
| 135 |
</div>
|
| 136 |
</div>
|
| 137 |
|
|
|
|
| 50 |
|
| 51 |
<div id="canvas-wrap">
|
| 52 |
<svg id="c"></svg>
|
| 53 |
+
<div class="dir-bar" role="group" aria-label="Camera rotation direction">
|
| 54 |
+
<button type="button" class="dir-btn" id="dir-cw">↻ CW</button>
|
| 55 |
+
<button type="button" class="dir-btn" id="dir-ccw">↺ CCW</button>
|
| 56 |
+
</div>
|
| 57 |
<div class="zoom-bar">
|
| 58 |
<button type="button" class="zoom-btn" id="zoom-out" aria-label="Zoom out">−</button>
|
| 59 |
<span id="zoom-label" class="zoom-label">100%</span>
|
|
|
|
| 129 |
<label for="input-front-arc">Front arc <span id="val-front-arc">180</span>°</label>
|
| 130 |
<input id="input-front-arc" type="range" min="10" max="350" step="5" value="180" />
|
| 131 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
</div>
|
| 133 |
</div>
|
| 134 |
|
style.css
CHANGED
|
@@ -503,32 +503,43 @@ input[type='range']::-moz-range-thumb {
|
|
| 503 |
border-color: rgba(0, 0, 0, 0.18);
|
| 504 |
}
|
| 505 |
|
| 506 |
-
/*
|
| 507 |
-
.dir-
|
|
|
|
|
|
|
|
|
|
| 508 |
display: flex;
|
| 509 |
-
|
| 510 |
-
|
|
|
|
| 511 |
}
|
| 512 |
|
| 513 |
.dir-btn {
|
| 514 |
-
flex:
|
| 515 |
-
|
| 516 |
-
|
|
|
|
|
|
|
|
|
|
| 517 |
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 518 |
-
border-radius: var(--radious-
|
| 519 |
-
color: var(--content-
|
| 520 |
font-family: var(--font);
|
| 521 |
font-size: 16px;
|
| 522 |
font-weight: 500;
|
| 523 |
letter-spacing: 0.015em;
|
| 524 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
| 525 |
text-align: center;
|
| 526 |
text-transform: uppercase;
|
| 527 |
transition: background 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
|
|
|
| 528 |
}
|
| 529 |
|
| 530 |
.dir-btn:hover {
|
| 531 |
-
background: var(--surface-
|
| 532 |
color: var(--content-hi);
|
| 533 |
}
|
| 534 |
|
|
|
|
| 503 |
border-color: rgba(0, 0, 0, 0.18);
|
| 504 |
}
|
| 505 |
|
| 506 |
+
/* Camera rotation — overlay (pairs with .zoom-bar on the right) */
|
| 507 |
+
.dir-bar {
|
| 508 |
+
position: absolute;
|
| 509 |
+
bottom: var(--sp-m);
|
| 510 |
+
left: var(--sp-m);
|
| 511 |
display: flex;
|
| 512 |
+
align-items: center;
|
| 513 |
+
gap: var(--sp-s);
|
| 514 |
+
z-index: 10;
|
| 515 |
}
|
| 516 |
|
| 517 |
.dir-btn {
|
| 518 |
+
flex: 0 0 auto;
|
| 519 |
+
box-sizing: border-box;
|
| 520 |
+
min-width: 5.25rem;
|
| 521 |
+
height: 52px;
|
| 522 |
+
padding: 0 var(--sp-m);
|
| 523 |
+
background: var(--surface-3);
|
| 524 |
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 525 |
+
border-radius: var(--radious-m);
|
| 526 |
+
color: var(--content-mid);
|
| 527 |
font-family: var(--font);
|
| 528 |
font-size: 16px;
|
| 529 |
font-weight: 500;
|
| 530 |
letter-spacing: 0.015em;
|
| 531 |
cursor: pointer;
|
| 532 |
+
display: flex;
|
| 533 |
+
align-items: center;
|
| 534 |
+
justify-content: center;
|
| 535 |
text-align: center;
|
| 536 |
text-transform: uppercase;
|
| 537 |
transition: background 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;
|
| 538 |
+
line-height: 1;
|
| 539 |
}
|
| 540 |
|
| 541 |
.dir-btn:hover {
|
| 542 |
+
background: var(--surface-4);
|
| 543 |
color: var(--content-hi);
|
| 544 |
}
|
| 545 |
|