Compare commits

...

2 Commits

Author SHA1 Message Date
Kiyomichi Kosaka 14a8b553a4 Merge pull request #18 from ok2/codex/fix-analog-clock-angle-calculation
Fix analog clock rotation drift
2025-06-14 23:56:44 +02:00
Kiyomichi Kosaka 0bd1957112 Fix analog clock angle calculations 2025-06-14 23:56:31 +02:00
+4 -3
View File
@@ -89,9 +89,10 @@
function updateClock() {
const now = new Date();
const cob = toCobiets(now);
const xf = cob / COBIE_UNITS.quantic;
const qf = cob / COBIE_UNITS.chronon;
const cf = cob / COBIE_UNITS.eonstrip;
// Use fractional progress within each unit so angles stay small
const xf = (cob % COBIE_UNITS.quantic) / COBIE_UNITS.quantic;
const qf = (cob % COBIE_UNITS.chronon) / COBIE_UNITS.chronon;
const cf = (cob % COBIE_UNITS.eonstrip) / COBIE_UNITS.eonstrip;
document.getElementById('handXeno').style.transform = `rotate(${xf * 360}deg)`;
document.getElementById('handQuantic').style.transform = `rotate(${qf * 360}deg)`;
document.getElementById('handChronon').style.transform = `rotate(${cf * 360}deg)`;