German Khokhlov
f1a2df5cfe
feat(time): the app clock on the engine
...
src/time/clock.js is the app's own time in ms since the epoch: by default
Date.now exactly (read at each call), with freeze/offset/rate/reset for QA
and tests, and one frame time latched per engine frame (beginFrame). The
contract gains engine.clock { now, frameTime, ticked }, in the fake engine
(a controllable wall clock, fake.advanceTime, fake.appClock), the contract
suite (one frame time for every listener of a frame, latched before
preUpdate, never decreasing), Cesium and Navara.
Cesium latches on the viewer clock's onTick, which CesiumWidget runs right
before scene.render, so scene listeners the app added before the engine
existed read the same frame time; the subscription appears on first use
and destroy removes it. The viewer clock itself is untouched: in the app
it never animates (shouldAnimate false, multiplier 1, its time frozen at
boot), and its time still drives Cesium's lighting as before. Navara
latches in the engine's handler of the view's preUpdate, and the look
reads the engine clock's frame time for the sun, so the app clock is the
one time source on Navara too.
src/time is a portable root in check-import-directions: no engine
packages, no browser globals.
2026-10-16 15:01:36 +04:00
..
2026-10-06 21:59:12 +01:00
2026-10-16 14:29:31 +04:00
2026-10-07 14:21:46 -07:00
2026-09-28 19:07:57 -05:00
2026-09-28 19:07:57 -05:00
2026-10-02 18:29:42 -07:00
2026-08-24 17:02:16 -05:00
2026-10-16 15:01:36 +04:00
2026-09-24 16:25:55 +05:30
2026-10-16 14:49:24 +04:00
2026-09-23 16:00:53 -05:00
2026-09-10 23:01:51 -07:00
2026-10-08 11:02:52 -07:00
2026-09-14 07:35:38 -07:00
2026-08-24 17:02:16 -05:00
2026-09-15 07:26:32 -07:00
2026-10-16 14:49:24 +04:00
2026-09-15 07:26:32 -07:00
2026-09-11 15:08:23 -07:00
2026-09-28 19:07:57 -05:00
2026-09-28 19:07:57 -05:00
2026-10-15 20:56:06 +04:00
2026-09-24 16:25:55 +05:30
2026-09-14 07:35:38 -07:00
2026-10-16 14:29:31 +04:00
2026-09-11 15:08:23 -07:00
2026-08-31 17:49:45 -05:00
2026-08-31 17:49:45 -05:00
2026-08-31 17:49:45 -05:00
2026-08-31 17:49:45 -05:00
2026-09-14 19:34:23 -05:00
2026-09-13 21:54:29 -05:00
2026-09-14 07:35:38 -07:00
2026-09-28 19:07:57 -05:00
2026-09-28 19:07:57 -05:00
2026-09-11 17:03:35 -07:00
2026-09-10 23:08:26 -07:00
2026-10-06 21:59:12 +01:00
2026-08-24 17:02:16 -05:00
2026-08-24 17:02:16 -05:00
2026-08-24 17:02:16 -05:00
2026-09-13 01:23:55 -07:00
2026-09-13 21:48:33 -05:00
2026-10-03 23:10:32 -07:00
2026-10-03 23:10:32 -07:00
2026-10-03 23:10:32 -07:00
2026-09-14 20:09:41 -05:00
2026-09-15 16:53:26 -07:00
2026-09-15 19:16:49 -07:00
2026-09-15 17:59:53 -07:00
2026-09-15 20:15:32 -07:00
2026-09-15 15:41:42 -07:00
2026-09-14 19:59:26 -05:00
2026-10-03 23:10:32 -07:00
2026-10-03 23:20:42 -07:00
2026-09-28 19:07:57 -05:00
2026-09-13 12:48:26 -07:00
2026-09-12 18:45:30 -07:00
2026-09-11 14:50:57 -07:00
2026-10-03 23:10:32 -07:00
2026-09-10 23:08:26 -07:00
2026-09-13 09:54:55 -07:00
2026-08-24 17:02:16 -05:00
2026-08-31 17:49:45 -05:00
2026-09-10 23:08:26 -07:00
2026-08-24 17:02:16 -05:00
2026-10-03 23:10:32 -07:00
2026-10-13 23:48:21 +02:00
2026-10-03 23:10:32 -07:00
2026-09-10 23:08:26 -07:00
2026-09-11 08:59:32 -07:00
2026-09-28 19:07:57 -05:00
2026-09-28 19:07:57 -05:00
2026-09-28 19:07:57 -05:00
2026-10-03 23:10:32 -07:00
2026-09-10 23:08:26 -07:00
2026-09-10 23:08:26 -07:00
2026-09-22 17:45:39 -05:00
2026-09-24 16:25:55 +05:30
2026-09-13 05:43:05 -07:00
2026-09-12 22:26:29 -07:00
2026-09-14 15:43:27 -07:00
2026-09-28 19:07:57 -05:00
2026-09-16 12:14:15 +05:30
2026-10-03 23:10:32 -07:00
2026-09-28 19:07:57 -05:00
2026-10-09 00:05:58 +01:00
2026-10-06 21:59:12 +01:00
2026-08-31 17:49:45 -05:00
2026-10-03 23:10:32 -07:00
2026-09-22 20:34:11 -05:00
2026-09-15 20:15:32 -07:00
2026-10-03 23:10:32 -07:00
2026-10-15 00:19:52 +04:00
2026-09-28 19:07:57 -05:00
2026-09-10 23:08:26 -07:00
2026-09-10 23:08:26 -07:00
2026-09-28 19:07:57 -05:00
2026-09-13 14:47:26 -07:00
2026-09-28 19:07:57 -05:00
2026-09-10 23:08:26 -07:00
2026-09-15 08:40:58 -07:00
2026-09-15 13:26:41 -05:00
2026-09-15 05:18:30 -05:00
2026-09-15 14:15:27 -05:00
2026-09-15 13:26:41 -05:00
2026-09-15 13:26:41 -05:00
2026-09-15 14:15:27 -05:00
2026-09-13 14:51:24 -07:00
2026-09-13 10:54:32 -07:00
2026-09-10 23:08:26 -07:00
2026-09-11 14:43:13 -07:00
2026-09-13 05:43:05 -07:00
2026-09-12 21:25:05 -07:00
2026-10-06 20:36:56 +05:00
2026-10-04 23:03:09 +05:00
2026-09-28 21:19:23 -05:00
2026-10-05 04:37:28 +05:30
2026-09-15 12:05:01 -07:00
2026-09-22 17:45:39 -05:00
2026-09-22 17:45:39 -05:00
2026-09-22 17:45:39 -05:00
2026-09-22 17:45:39 -05:00
2026-09-22 17:45:39 -05:00
2026-08-24 17:02:16 -05:00
2026-08-24 17:02:16 -05:00
2026-10-08 11:02:52 -07:00
2026-08-24 17:02:16 -05:00
2026-10-03 23:10:32 -07:00
2026-09-13 14:10:38 -07:00
2026-09-28 21:19:23 -05:00