diff --git a/README.md b/README.md index 653a870..fbc9546 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ An interactive web app that visualizes the **CosmoChron Binary Epoch (CoBiE)** t ## Features - **Live CoBiE Clock**: Displays the current CoBiE timestamp, updating every second. +- **Analog Clock**: Full-screen clock with 16 hex markers and CoBiE hands. - **UTC & TAI Display**: Shows both UTC and International Atomic Time (TAI) in human-readable format. - **Timezone Selector**: Switch between UTC, TAI, or any IANA timezone. - **Interactive Calendar**: Browse past and future Megasequences and Eonstrips with Prev/Next controls. @@ -53,6 +54,9 @@ An interactive web app that visualizes the **CosmoChron Binary Epoch (CoBiE)** t ``` ├── index.html # Main HTML markup +├── analog.html # Analog clock interface +├── clock.js # Clock logic + ├── style.css # Separated styles ├── script.js # JavaScript logic ├── README.md # This documentation diff --git a/analog.html b/analog.html new file mode 100644 index 0000000..6c46615 --- /dev/null +++ b/analog.html @@ -0,0 +1,55 @@ + + + + + + CoBiE Analog Clock + + + + +
+
+
+
+
+
+
+ + + diff --git a/clock.js b/clock.js new file mode 100644 index 0000000..ee35db1 --- /dev/null +++ b/clock.js @@ -0,0 +1,84 @@ +// Minimal CoBiE analog clock logic +const COBIE_EPOCH = 0; +const COBIE_UNITS = { + second: 1, + xenocycle: 0x10, + quantic: 0x100, + chronon: 0x1000, + eonstrip: 0x10000 +}; +function floorDiv(a,b){ return Math.trunc(a/b); } +function getTAIOffsetAt(date){ + const taiEpoch = new Date('1958-01-01T00:00:00Z'); + if(date < taiEpoch) return 0; + const leapSeconds=[ + {date:'1972-01-01T00:00:00Z',offset:10}, + {date:'1972-07-01T00:00:00Z',offset:11}, + {date:'1973-01-01T00:00:00Z',offset:12}, + {date:'1974-01-01T00:00:00Z',offset:13}, + {date:'1975-01-01T00:00:00Z',offset:14}, + {date:'1976-01-01T00:00:00Z',offset:15}, + {date:'1977-01-01T00:00:00Z',offset:16}, + {date:'1978-01-01T00:00:00Z',offset:17}, + {date:'1979-01-01T00:00:00Z',offset:18}, + {date:'1980-01-01T00:00:00Z',offset:19}, + {date:'1981-07-01T00:00:00Z',offset:20}, + {date:'1982-07-01T00:00:00Z',offset:21}, + {date:'1983-07-01T00:00:00Z',offset:22}, + {date:'1985-07-01T00:00:00Z',offset:23}, + {date:'1988-01-01T00:00:00Z',offset:24}, + {date:'1990-01-01T00:00:00Z',offset:25}, + {date:'1991-01-01T00:00:00Z',offset:26}, + {date:'1992-07-01T00:00:00Z',offset:27}, + {date:'1993-07-01T00:00:00Z',offset:28}, + {date:'1994-07-01T00:00:00Z',offset:29}, + {date:'1996-01-01T00:00:00Z',offset:30}, + {date:'1997-07-01T00:00:00Z',offset:31}, + {date:'1999-01-01T00:00:00Z',offset:32}, + {date:'2006-01-01T00:00:00Z',offset:33}, + {date:'2009-01-01T00:00:00Z',offset:34}, + {date:'2012-07-01T00:00:00Z',offset:35}, + {date:'2015-07-01T00:00:00Z',offset:36}, + {date:'2017-01-01T00:00:00Z',offset:37} + ]; + for(let i=0;i{ + placeMarkers(); + updateClock(); + setInterval(updateClock,1000); +});