mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
The renderer seam: clicks go to the newest tool, recession and display groups through the contract, drawing at parity with Cesium
- Clicks: when two tools want the globe's clicks, the newest takes them and the older is told and turns itself off; a click is decided when it arrives, and ambient selection fires only when no tool holds the pointer. The "map is busy" paths and their strings are removed. - Recession: the limb fade is shared (src/render/recession.js) and reaches icon and model sets through SetSpec.recede; tuning applies on the next frame. - Display panel groups are published through src/ui/displayGroups.js; the Weather group and src/viewWeather.js are removed. - Draw port: a set whose icons only move is moved in place, and models that did not change are not restyled each frame, so moving fleets cost what they did when drawn directly; an untinted, fully opaque model is drawn without a colour. - Conformance: input.lease.lost checks the new lease inside onLost and reports a throwing onLost; draw.sets.recede covers model sets. - QA scripts read the renderer host instead of internals the seam replaced.
This commit is contained in:
1 parent
a0d299523d
commit
0ab31d4fb8
130 files changed
+5438
-1674
No files matched your search
Vendored
+14
-6
@@ -104,16 +104,16 @@ export interface CreateOptions {
|
||||
worldDataToken?: string;
|
||||
/** Initial multisampling; quality can change it later. */
|
||||
msaa?: 0 | 2 | 4 | 8;
|
||||
/** Keep the drawing buffer after presenting, for capture. */
|
||||
preserveDrawingBuffer?: boolean;
|
||||
/** Sky applied before the first frame, so nothing draws in the wrong sky. */
|
||||
sky?: Partial<SkySettings>;
|
||||
/** Scene time in epoch ms. The application passes its boot time. */
|
||||
time?: number;
|
||||
/**
|
||||
* The clocks the renderer reads, for flights, inertia, tweens and
|
||||
* `FrameTime.now`: `now` on the `performance.now()` timeline, `date` in
|
||||
* epoch ms. Omitted: the browser's. Tests pass virtual ones.
|
||||
* The clocks the renderer reads, for `FrameTime.now`, the camera's
|
||||
* `moveEnd` wait, input, flights and tweens, and for inertia where it
|
||||
* times that itself (Cesium's keeps Cesium's own timing): `now` on the
|
||||
* `performance.now()` timeline, `date` in epoch ms. Omitted: the
|
||||
* browser's. Tests pass virtual ones.
|
||||
*/
|
||||
clock?: { now(): number; date(): number };
|
||||
/** Aborts creation; the renderer cleans up whatever it had built. */
|
||||
@@ -149,7 +149,10 @@ export interface Renderer {
|
||||
readonly effects: EffectsPort;
|
||||
readonly credits: CreditsPort;
|
||||
readonly quality: QualityPort;
|
||||
/** The last presented frame as an encoded image. */
|
||||
/**
|
||||
* The last presented frame as an encoded image. Once the renderer is
|
||||
* destroyed it rejects with a "renderer destroyed" error.
|
||||
*/
|
||||
capture(options?: CaptureOptions): Promise<Blob>;
|
||||
/**
|
||||
* The last presented frame's pixels, synchronously, for loops that render
|
||||
@@ -175,5 +178,10 @@ export interface Renderer {
|
||||
* a new renderer.
|
||||
*/
|
||||
on(event: 'contextLost' | 'contextRestored', cb: () => void): Off;
|
||||
/**
|
||||
* Lets go of everything. Afterwards handles do nothing (`Handle`), and
|
||||
* `frame.renderOnce` and `capture` reject with a "renderer destroyed"
|
||||
* error, as does a `renderOnce` still waiting.
|
||||
*/
|
||||
destroy(): void;
|
||||
}
|
||||
Reference in new issue
Block a user