mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Name the surface heights answer against: globe.surfaceVersion and the surface settle kind
A new capability, surfaceIdentity, adds globe.surfaceVersion(): a number that changes whenever what surface heights answer against changes (base, terrain or photoreal swapped, the globe shown or hidden) and never on camera moves or tile loads, so the app can key cached heights by it. The settle kind 'surface' says whether that surface has loaded what is in view: the terrain while the globe is shown, otherwise the drawn tiles, false with neither; a renderer without the capability answers it as base. The Cesium globe port reads both off the scene, so a base changed around the port counts too; its versions come from one counter shared by every port. The stub bumps on real base, terrain, photoreal and visibility changes. A conformance check and a globe port test cover them.
This commit is contained in:
1 parent
e15cfb3e32
commit
456645f291
11 files changed
+165
-3
No files matched your search
Vendored
+2
@@ -160,6 +160,8 @@ export type Capability =
|
||||
| 'imageryFrames'
|
||||
/** Wind-relief and similar shading of the globe surface. */
|
||||
| 'surfaceShading'
|
||||
/** A version of what surface heights answer against (`globe.surfaceVersion`). */
|
||||
| 'surfaceIdentity'
|
||||
/** Volumetric clouds (`globe.setClouds`). */
|
||||
| 'clouds'
|
||||
/** A water surface on the oceans (`globe.setWater`). */
|
||||
|
||||
Vendored
+14
-1
@@ -248,7 +248,13 @@ export interface LoadProgress {
|
||||
terrainPending: number;
|
||||
}
|
||||
|
||||
export type SettleKind = 'base' | 'tiles' | 'terrain' | 'imagery';
|
||||
/**
|
||||
* `surface`: what `against: 'surface'` heights answer from has loaded what
|
||||
* is in view: the terrain while the globe is shown, otherwise the drawn
|
||||
* tiles; false when neither is drawn. A renderer that predates it answers
|
||||
* as `base`.
|
||||
*/
|
||||
export type SettleKind = 'base' | 'tiles' | 'terrain' | 'imagery' | 'surface';
|
||||
|
||||
export interface GlobePort {
|
||||
/** Switch the whole base at once; resolves when the new base has settled. */
|
||||
@@ -265,6 +271,13 @@ export interface GlobePort {
|
||||
* drawn.
|
||||
*/
|
||||
isGlobeVisible?(): boolean;
|
||||
/**
|
||||
* `surfaceIdentity`: a number that changes whenever what heights answer
|
||||
* against changes (base, terrain or photoreal route swapped, the globe
|
||||
* shown or hidden) and never otherwise (not on camera moves or tile
|
||||
* loads). The application keys cached surface heights by it.
|
||||
*/
|
||||
surfaceVersion?(): number;
|
||||
/** `surfaceShading`. */
|
||||
setSurfaceShading?(shading: SurfaceShading | null): void;
|
||||
/** `clouds`: the renderer's volumetric clouds, or none. */
|
||||
|
||||
@@ -23,6 +23,7 @@ export const CAPABILITIES = Object.freeze([
|
||||
'splitSwipe',
|
||||
'imageryFrames',
|
||||
'surfaceShading',
|
||||
'surfaceIdentity',
|
||||
'clouds',
|
||||
'water',
|
||||
'imageHooks',
|
||||
@@ -151,6 +152,7 @@ export const PORTS = deepFreeze({
|
||||
'on',
|
||||
),
|
||||
['isGlobeVisible', 'globeVisibility'],
|
||||
['surfaceVersion', 'surfaceIdentity'],
|
||||
['setSurfaceShading', 'surfaceShading'],
|
||||
['setClouds', 'clouds'],
|
||||
['setWater', 'water'],
|
||||
|
||||
Reference in new issue
Block a user