mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
feat(render): the Cesium renderer can run an application's camera controller
createCesiumRendererPlugin({cameraController}) (render/cesium/plugin) puts
the camera port on the shared camera controller over a native camera on
Cesium's (controlledCamera.js): poses written exactly, out of any lookAt
transform, the vertical field of view as Cesium's wide-side fov and kept
on a resize. Cesium's own controls hold their input off and their
collision off while it drives; the controller runs before and after the
preUpdate listeners, and what it throws is reported. A followed item's
position is where its GPU icon set draws it (drawnPosition), and the
input port's camera holds are the controller's.
The conformance harness, given a controller, steps a virtual clock 1/60 s
a frame for ticks and pointer events, so flights and pointer scripts are
compared frame by frame.
This commit is contained in:
1 parent
1a7ef7fc7a
commit
aa58886e40
11 files changed
+826
-36
No files matched your search
@@ -5204,6 +5204,16 @@ export function createCesiumDraw({
|
||||
sets,
|
||||
version: () => setsVersion,
|
||||
tilesets,
|
||||
/**
|
||||
* Where a GPU icon set draws an item it moves itself, `aheadMs` after
|
||||
* `time` (a Julian date; now without one), on its segment; null for any
|
||||
* other item, whose own position stays the answer.
|
||||
*/
|
||||
drawnPosition(ref, aheadMs = 0, time = undefined) {
|
||||
const record = sets.get(ref?.set);
|
||||
if (!record || record.kind !== 'icons' || !record.gpu) return null;
|
||||
return record.gpu.drawnAt(ref.id, aheadMs, time ? { time } : undefined);
|
||||
},
|
||||
/** Whether a set's ground primitives are still being built. */
|
||||
building: () => [...sets.values()].some((record) => record.pending),
|
||||
/** Each frame, before it draws: the horizon cull. */
|
||||
|
||||
Reference in new issue
Block a user