Files
gods-eye-view/src/render/cesium/drawHit.js
T
Sameh Khamis 46cdeba7fa Remove renderer contract members nothing in the application uses
Drops from the contract, the stub, the Cesium renderer and the
conformance suite: agent paths, renderer-propagated orbits and celestial
draws (orbits stay drawn as icons and inertial lines), scalar raster
fields, lodGroup, volume classification, icon eye offsets, the dash gap
colour, box shapes, courseBlendMs (courseGlide covers easing), relief
surface shading, globe clouds and water, sky atmosphere tuning, heightmap
and quantized-mesh terrain, WMTS and ArcGIS imagery, the batched cached
height read, the quality benchmark and the animated-style and overlay
pixel-ratio knobs. Capabilities clouds, water, celestial, agents, orbits
and benchmark go with them.

The lodGroup check becomes a displayRange check across two sets, the
height-query check uses an extruded polygon in place of a box, the shape
scenes draw extruded blocks where they drew boxes, and the fields scene
draws a raster shell. The shape references are recorded again.
2026-11-10 03:27:10 -08:00

27 lines
1003 B
JavaScript

/**
* @module render/cesium/drawHit
* @description A Cesium pick of a draw-set item, as the contract's `Hit`.
* No imports, so the click dispatcher can use it without the draw port.
*/
/**
* A Cesium pick as the contract's `Hit` (`query.d.ts`), when what it picked
* is a draw-set item (its pick id is `{set, id, meta}`); else
* null. For code that reads a pick Cesium already made (the click
* dispatcher's); `query.pick` makes its own, and also leaves out items of
* hidden or unpickable sets. It does not check that the set or item is
* still drawn (a ground swap can pick a retiring primitive), so a caller
* matches the hit against its own current sets and item ids.
* @param {object|null|undefined} picked
*/
export function drawHitOf(picked) {
const id = picked?.id;
if (!id || typeof id.set !== 'string' || typeof id.id !== 'string')
return null;
return {
set: id.set,
id: id.id,
...(id.meta === undefined ? {} : { meta: id.meta }),
surface: false,
};
}