Fix analog clock angle calculations
This commit is contained in:
parent
9eb4b21986
commit
0bd1957112
7
clock.js
7
clock.js
@ -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)`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user