Skip to content

Commit 556319a

Browse files
Refactor heatmap UI: update styles and improve label rendering for better clarity
1 parent 8174e08 commit 556319a

3 files changed

Lines changed: 6 additions & 28 deletions

File tree

_includes/heatmap.html

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,16 +345,6 @@
345345
}
346346
}
347347

348-
// close the hand select if the finger one is open
349-
/*fingerCheckbox.addEventListener('change', () => {
350-
handCheckbox.checked = false;
351-
})
352-
353-
// close the finger select if the hand one is open
354-
handCheckbox.addEventListener('change', () => {
355-
fingerCheckbox.checked = false;
356-
})*/
357-
358348
// the first select options start the first select handler
359349
handOptions.forEach(elem => {
360350
elem.addEventListener('click', () => {

assets/css/heatmap.css

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* 3d render style */
12
#model-container {
23
width: -webkit-calc(100% - 100px);
34
width: calc(100% - 100px);
@@ -42,6 +43,7 @@
4243
cursor: grabbing;
4344
}
4445

46+
/* IU style */
4547
#interface {
4648
display: flex;
4749
justify-content: center;
@@ -176,18 +178,4 @@ label {
176178
cursor: pointer;
177179
pointer-events: auto;
178180
user-select: none;
179-
}
180-
181-
/* Responsive */
182-
@media (max-width: 900px) {
183-
}
184-
185-
@media (max-width: 768px) {
186-
.bottom-bar { padding: 10px 14px; }
187-
}
188-
189-
@media (max-width: 480px) {
190-
.bottom-bar { gap: 6px; padding: 8px 10px; }
191-
.heatmap-legend { font-size: 10px; }
192-
.heatmap-gradient { width: 60px; height: 8px; }
193181
}

assets/js/model-viewer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ export class Keycube {
237237
createTextLabel(text, axis, sign) {
238238
const {mesh, canvas, texture} = this.createLabelPlane(0.13, 256, axis, sign);
239239
const ctx = canvas.getContext('2d');
240-
ctx.font = 'bold 224px Arial';
240+
ctx.font = 'bold 112px Arial';
241241
ctx.textAlign = 'center';
242242
ctx.textBaseline = 'middle';
243243
ctx.strokeStyle = 'rgba(0,0,0,0.7)';
244244
ctx.lineWidth = 16;
245-
ctx.strokeText(text, 256, 256);
245+
ctx.strokeText(text, 128, 128);
246246
ctx.fillStyle = 'white';
247-
ctx.fillText(text, 256, 256);
247+
ctx.fillText(text, 128, 128);
248248
texture.needsUpdate = true;
249249
mesh.userData = {isLabel: true};
250250
return mesh;
@@ -314,7 +314,7 @@ export class Keycube {
314314
const bbox = new THREE.Box3().setFromObject(object);
315315
const sphere = new THREE.Sphere();
316316
bbox.getBoundingSphere(sphere);
317-
return sphere; // { center: Vector3, radius: Number }
317+
return sphere;
318318
}
319319

320320
/**

0 commit comments

Comments
 (0)