mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Animate traffic on the frame port and follow the camera through the camera port
The traffic lifecycle listens on the frame port's preRender and on the camera port's changed (at its own 5% threshold) and moveEnd, instead of the scene's preRender, the camera's events and the shared percentageChanged ledger. It no longer reaches Cesium and leaves the allow-list; rendering.js, still listed for the surface identity, tile readiness and draped-line support, now loads the unbound camera and globe factories for the layer.
This commit is contained in:
1 parent
5715bf9df3
commit
38e0750715
11 files changed
+163
-46
No files matched your search
@@ -245,8 +245,16 @@ test('traffic timing pairs real ordering to the scheduling change and guards re-
|
||||
// The layer reads the camera through the renderer's camera port.
|
||||
const { bindRenderer } = await server.ssrLoadModule('/src/render/rendererOf.js');
|
||||
const degrees = (radians) => radians * 180 / Math.PI;
|
||||
const cameraEvents = { moveEnd, changed };
|
||||
const frameEvents = { preRender, postRender };
|
||||
bindRenderer(viewer, {
|
||||
// The scene's channels, raised by the test as Cesium would.
|
||||
frame: {
|
||||
on: (phase, cb) => frameEvents[phase].addEventListener(cb),
|
||||
requestRender() {},
|
||||
},
|
||||
camera: {
|
||||
on: (event, cb) => cameraEvents[event].addEventListener(cb),
|
||||
pose: () => ({
|
||||
lon: degrees(camera.positionCartographic.longitude),
|
||||
lat: degrees(camera.positionCartographic.latitude),
|
||||
|
||||
Reference in new issue
Block a user