mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
feat(render): the Cesium renderer passes every conformance check a page can run
- Cesium's own tweens (its flights) step on the renderer's clock, so the flight traces compare frame by frame; dispose gives the scene its own clock back. - moveStart and moveEnd are measured each tick on that clock, by the shared move detection, a change of the field of view or aspect included; Cesium's own events timed them by the system clock. - A follow of a drawn item tracks where the draw port draws it. - Pick rays are summed from the eye's axes: Cesium's lose about 1e-9 of direction at a near plane of 0.1 m. Ellipsoid picks and the view rectangle use them; a canvas with no size has none, as in Cesium. - The harness always runs the virtual clock and claims 120 checks: 119 pass on the page and query.heights skips. The five pointer traces need a camera controller there, and are recorded from Cesium's own controller in Node. - The package boundaries list the cesium plugin export and the modules its groups now import.
This commit is contained in:
1 parent
720932e1f9
commit
e9085e8df3
13 files changed
+545
-95
No files matched your search
@@ -34,13 +34,15 @@ const angleDelta = (a, b) => {
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether two world views are the same: the same position, and directions
|
||||
* and ups whose dot products are each one's own.
|
||||
* Whether two world views are the same: the same position, directions and
|
||||
* ups whose dot products are each one's own, and the same `lens` (a
|
||||
* renderer's key for its field of view and aspect, where it gives one).
|
||||
*/
|
||||
function sameView(a, b) {
|
||||
return (
|
||||
a &&
|
||||
b &&
|
||||
a.lens === b.lens &&
|
||||
distance(a.position, b.position) === 0 &&
|
||||
dot(a.direction, b.direction) === dot(a.direction, a.direction) &&
|
||||
dot(a.up, b.up) === dot(a.up, a.up)
|
||||
@@ -152,7 +154,12 @@ export function createCameraEvents({
|
||||
*/
|
||||
function stepMoveDetection(now) {
|
||||
const v = world();
|
||||
const current = { position: v.position, direction: v.direction, up: v.up };
|
||||
const current = {
|
||||
position: v.position,
|
||||
direction: v.direction,
|
||||
up: v.up,
|
||||
lens: v.lens,
|
||||
};
|
||||
const changed = lastView && !sameView(lastView, current);
|
||||
lastView = current;
|
||||
if (changed) {
|
||||
|
||||
Reference in new issue
Block a user