diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index 677b1edf4..811e2a1fd 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -8129,7 +8129,7 @@ renderer's own objects: the record of files that still did, - The renderer follows its container's size (`Renderer.resize`, from a `ResizeObserver`). - The credits: the Cesium renderer's plugin says it shows them in a display - its own (`ownCreditDisplay`; Cesium's `#cesium-credits`) keeps it. On the + of its own (`ownCreditDisplay`; `#cesium-credits`), which it keeps. On the stub, the application shows what the credits port lists in its own line at the bottom left (`#gev-credits`, `src/ui/creditsView.js`): the inline credits on the line, the rest (the layers' data credits among them) in diff --git a/docs/RENDERER-CONTRACT.md b/docs/RENDERER-CONTRACT.md index 0cdb16efc..9b055c226 100644 --- a/docs/RENDERER-CONTRACT.md +++ b/docs/RENDERER-CONTRACT.md @@ -15,8 +15,8 @@ The package exports these modules: | `gods-eye-view/render/camera/events` | The camera port's events: `changed` per listener, `moveStart`/`moveEnd`, command hooks | | `gods-eye-view/render/conformance` | The conformance suite, reference scenes and visual comparison | -The pieces that do not depend on Cesium are exported -too, each with its own `.d.ts`: +The pieces that do not depend on Cesium are exported too, each with its +own `.d.ts`: - `gods-eye-view/render/input/router`: the input port's leases and routing; - `gods-eye-view/render/stub/camera`, `.../stub/viewRectangle` and @@ -92,8 +92,8 @@ optional: `detail: {image, rectangle}`, a sharper image drawn in place of the base one, and says how shells stack, blend and update. `FieldHandle.on('drawn')` says once per spec or `update` that it is drawn, never while hidden. These - change `fields` itself rather than add to it, so a renderer that lists - `fields` follows them. The Cesium adapter lists `fields` and + change `fields` itself rather than add to it, so the renderer follows + them where it lists `fields`. The Cesium adapter lists `fields` and draws `rasterShell` and `windStreamlines`. It reads the grid's samples as points, the first column at `rectangle.west` and the first row at `rectangle.north`, rows running south. Over the whole globe its paths @@ -411,7 +411,7 @@ fails when `PORTS` and the types disagree on a single member. `vectorBase` (`BaseSpec.vector = { styleUrl }`) draws a MapLibre style document's vector tiles as the globe's base. They are painted in shared, Cesium-free code, `src/render/vectorBase/`, which the renderer draws as -draws imagery draws the same pixels: +imagery: - `loadVectorStyle(styleUrl, fetch)` fetches the style and the TileJSON its vector sources name (a source's `url`; inline `tiles` are used as given, diff --git a/src/layers/traffic/rendering.js b/src/layers/traffic/rendering.js index ea2f073d9..ab429e038 100644 --- a/src/layers/traffic/rendering.js +++ b/src/layers/traffic/rendering.js @@ -67,7 +67,7 @@ export function createRendering({ * Kept roads are jam first, then slow, then free, longest first; overflow * is logged. The set swaps its whole contents at once, so a rebuild never * blinks. No-op in sim mode or when both looks are off. Where the renderer - * cannot drape draws them over the surface instead (the draw port's + * cannot drape, it draws them over the surface instead (the draw port's * `overlay`). * * One build runs at a time. A city loads in progressive paints, each asking diff --git a/src/maps/engine.js b/src/maps/engine.js index 9a42f7c86..d28b030f0 100644 --- a/src/maps/engine.js +++ b/src/maps/engine.js @@ -6,7 +6,7 @@ * * The renderer's plugin may hand the application a map engine of its own * (`mapEngine` in `src/render/applicationHooks.js`); when it hands none, the - * hands none switches through its globe port (`globeEngine.js`). A viewer + * renderer switches through its globe port (`globeEngine.js`). A viewer * with no renderer bound uses the engine its adapter * provided as it loaded (the Cesium one through the package's * `./render/cesium/unbound` export). diff --git a/src/maps/globeEngine.js b/src/maps/globeEngine.js index 0727bc660..0f0ec8652 100644 --- a/src/maps/globeEngine.js +++ b/src/maps/globeEngine.js @@ -1,7 +1,7 @@ /** * @module maps/globeEngine * @description The map engine (`engine.js`) over the renderer contract's - * globe port, for a renderer whose plugin hands the application no map + * globe port, for when the renderer's plugin hands the application no map * engine of its own (`src/render/applicationHooks.js`). The map stacks' * sources become the port's specs: Esri and OSM as `xyz` imagery, Cesium * ion's world imagery as `world` imagery, the photoreal stack as the port's diff --git a/src/render/conformance/checks/ports.js b/src/render/conformance/checks/ports.js index 491002cdf..b14f5a07e 100644 --- a/src/render/conformance/checks/ports.js +++ b/src/render/conformance/checks/ports.js @@ -48,7 +48,7 @@ async function overAustin(h, r, height = 2000) { /** * Waits until what is drawn has loaded (icon images, tiles, models), as a * query answers from what is loaded. Where the renderer draws synchronously it - * settled at once. + * is settled at once. */ async function settled(r) { const result = await r.whenSettled({ timeoutMs: 20000 }); diff --git a/src/render/contract/camera.d.ts b/src/render/contract/camera.d.ts index 23048a07d..a9b1f7d5a 100644 --- a/src/render/contract/camera.d.ts +++ b/src/render/contract/camera.d.ts @@ -55,7 +55,7 @@ export interface CameraPose { /** * Vertical field of view, radians. `fovy` and `aspectRatio` describe a * centred perspective frustum. Where the renderer's frustum is off-centre or - * orthographic reports the nearest centred one here and its exact + * orthographic, it reports the nearest centred one here and its exact * projection only in `matrices()`; code that culls or projects exactly * reads `matrices()`. */ @@ -147,7 +147,7 @@ export interface FollowTarget { visualPosition?(t: number): Ecef | null; /** * The drawn item this target is, when it is one. Where the renderer moves - * items itself (`motionSegments`) follows where it draws the item, so the + * items itself (`motionSegments`), it follows where it draws the item, so the * eye and the icon never part; `position` stays the answer elsewhere. */ item?: { set: string; id: string }; diff --git a/src/render/contract/effects.d.ts b/src/render/contract/effects.d.ts index 93d2756f7..744c62dd7 100644 --- a/src/render/contract/effects.d.ts +++ b/src/render/contract/effects.d.ts @@ -1,8 +1,8 @@ /** * Full-screen effects: visual styles, bloom, sharpen and screen modulation. - * Each style is a plain full-screen pass over the frame's colour. The application owns + * Each style is a plain full-screen pass over the frame's colour. The * application owns the styles and defines them on the renderer - * renderer runs the same set; a renderer's own styles are extra ones. + * (`defineStyle`); the renderer's own styles are extra ones. */ import type { Off } from './common'; diff --git a/src/render/contract/globe.d.ts b/src/render/contract/globe.d.ts index ac97143fd..abf63537e 100644 --- a/src/render/contract/globe.d.ts +++ b/src/render/contract/globe.d.ts @@ -208,12 +208,11 @@ export interface BaseStatus { /** * The sky. These switch parts of it on and off; they do not say how it * looks. How the sky, the atmosphere over the ground, distance haze, the - * lighting and the tone mapping and exposure of the frame look is each - * renderer's own, and no check compares colours with - * another's. With `atmosphere`, `fog` and `lighting` off and clear weather, - * a renderer applies none of its look: what is drawn shows its own colours. - * A renderer whose sun, moon or fog are not separate from its - * atmosphere follows `atmosphere` for them and reports them as it draws them. + * lighting and the tone mapping and exposure of the frame look is the + * renderer's own, and no check compares colours. With `atmosphere`, `fog` + * and `lighting` off and clear weather, the renderer applies none of its + * look: what is drawn shows its own colours. Where the renderer's sun, moon + * or fog are not separate from its atmosphere, it follows `atmosphere` for them and reports them as it draws them. */ export interface SkySettings { atmosphere: boolean; diff --git a/src/render/contract/input.d.ts b/src/render/contract/input.d.ts index bd26dab20..aaa65826a 100644 --- a/src/render/contract/input.d.ts +++ b/src/render/contract/input.d.ts @@ -26,7 +26,7 @@ * * A click is delivered with its pick already made, once, and shared by * every subscriber (`PointerEv.pick`). Where the renderer's picks answer a - * or two late delivers the click that much later rather than answering + * frame or two late, it delivers the click that much later rather than answering * without them; `query.pick` stays synchronous for everything else. * * The engine's stock behaviours (select on click, follow on double-click) diff --git a/src/render/contract/renderer.d.ts b/src/render/contract/renderer.d.ts index f219a1e6c..a8ce9f499 100644 --- a/src/render/contract/renderer.d.ts +++ b/src/render/contract/renderer.d.ts @@ -34,9 +34,9 @@ export interface RendererPlugin { } /** - * What only some renderers have and the application uses where given, does + * What the renderer's plugin hands the application beside the contract; the * application uses each where given and does without where not. None is a - * do is in the ports. + * contract member: what the renderer should do is in the ports. */ export interface ApplicationHooks { /** @@ -173,9 +173,9 @@ export interface Renderer { releaseUnused(): void; on(event: 'error', cb: (error: Error) => void): Off; /** - * The drawing context was lost, or came back. A renderer that cannot restore its context - * never sends `contextRestored`; the application then makes - * a new renderer. + * The drawing context was lost, or came back. Where the renderer cannot + * restore its context it never sends `contextRestored`; the application + * then makes a new renderer. */ on(event: 'contextLost' | 'contextRestored', cb: () => void): Off; /** diff --git a/src/render/input/router.d.ts b/src/render/input/router.d.ts index fc0646d03..6300b8328 100644 --- a/src/render/input/router.d.ts +++ b/src/render/input/router.d.ts @@ -1,5 +1,6 @@ /** - * Who hears each pointer event: the contract's input rules + * Who hears each pointer event: the contract's input rules, shared by the + * Cesium port and the stub * (`router.js`). */ import type { InputPort, Lease, PointerEv } from '../contract/index'; diff --git a/src/render/input/router.js b/src/render/input/router.js index dd425119c..9ed02e220 100644 --- a/src/render/input/router.js +++ b/src/render/input/router.js @@ -1,7 +1,8 @@ /** * @module render/input/router * @description Who hears each pointer event: the contract's input rules - * (`src/render/contract/input.d.ts`). The renderer feeds it + * (`src/render/contract/input.d.ts`), shared by the Cesium port and the stub. + * The renderer feeds it * the events its engine sees, already shaped as `PointerEv` (its clicks with * their pick); the router decides, from the leases and the presses under * way, which listeners get each one, and keeps the input port's leases and diff --git a/src/render/motion/iconMotion.js b/src/render/motion/iconMotion.js index e59403080..b76abc8e0 100644 --- a/src/render/motion/iconMotion.js +++ b/src/render/motion/iconMotion.js @@ -5,7 +5,7 @@ * `MotionSegment` and `CourseGlide` in `render/contract/draw.d.ts`). The app * reads a moving icon back with it (to follow it, label it, judge a pick or * its horizon) instead of asking the renderer; the renderer evaluates its - * segments with it on the CPU, and the default renderer's GPU icons draw the + * segments with it on the CPU, and the Cesium port's GPU icons draw the * same path (`data/iconSegment.js` packs it, the shader evaluates it). * * Times are epoch ms on the set's motion clock. Plain numbers and `{x, y, z}` diff --git a/src/render/recession.d.ts b/src/render/recession.d.ts index 91585d1d6..7e081ccac 100644 --- a/src/render/recession.d.ts +++ b/src/render/recession.d.ts @@ -1,7 +1,7 @@ /** * How a set that recedes (`SetSpec.recede`) shrinks and fades its items * toward the globe's limb (`recession.js`), so the renderer draws exactly - * same factors. + * those factors. */ import type { RecedeSpec } from './contract/index'; diff --git a/src/render/recession.js b/src/render/recession.js index f77c2b76c..aee3d01a9 100644 --- a/src/render/recession.js +++ b/src/render/recession.js @@ -2,7 +2,7 @@ * @module render/recession * @description How a set that recedes (`SetSpec.recede`) shrinks and fades * its items toward the globe's limb, free of Cesium, so the renderer - * draws the same factors. The factors are 1 while an item is nearer than + * draws exactly those factors. The factors are 1 while an item is nearer than * `startLimbRatio` of the distance from the eye to the limb, and ease * (smoothstep) to `scaleFloor` and `alphaFloor` at the limb. The whole of it * eases back to nothing as the eye climbs through the blend band diff --git a/src/render/stub/index.js b/src/render/stub/index.js index 9f019fc00..b5db25511 100644 --- a/src/render/stub/index.js +++ b/src/render/stub/index.js @@ -2133,7 +2133,7 @@ export function createStubRenderer(options = {}) { /** * The stub as a renderer plugin (`RendererPlugin`), for running the whole * application on it: each renderer it makes fills the container it is given - * with a canvas, as any plugin's does. Nothing runs on its own: the caller + * with a canvas, as the Cesium plugin's does. Nothing runs on its own: the caller * drives the loop (`testing.tick()`), each frame or as a test needs. * @param {Parameters[0]} [options] For each * renderer it makes (`capabilities`, `viewport`, `time`...).