mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
refactor(overlays): use the globe engine
The world overlay host takes its frames (frames.postRender), camera events
(camera.moveEnd), canvas size (host.size), projection matrix
(projector.viewProjection), horizon test (projector.horizonVisible) and
render requests (render.request('world-overlay')) from the globe engine.
initWorldOverlay accepts an engine or, for callers that still hold a
viewer, resolves the viewer's engine through engineFromViewer.
Contract: camera.position(result) becomes camera.livePosition, one
engine-owned object holding the current position, so per-frame readers
and paint lanes keep a live camera position without allocating; engine
events gain raiseValue for argument-list-free frame dispatch. Steady-state
frame allocation is unchanged (worker probe, 30 chunks: 2696/9536/38593
B/frame before and after; detection 473749 -> 408085).
This commit is contained in:
1 parent
58a196374f
commit
aaa6074663
11 files changed
+284
-134
No files matched your search
@@ -18,7 +18,7 @@ import { createEngineEvent } from '../contract.js';
|
||||
export function bridgeEvent(source, mapArgs, { unary } = {}) {
|
||||
const event = createEngineEvent();
|
||||
const forward = unary
|
||||
? (a, b, c) => event.raiseEvent(unary(a, b, c))
|
||||
? (a, b, c) => event.raiseValue(unary(a, b, c))
|
||||
: mapArgs
|
||||
? (...args) => event.raiseEvent(...mapArgs(...args))
|
||||
: (...args) => event.raiseEvent(...args);
|
||||
|
||||
Reference in new issue
Block a user