feat(render): an icon's offset may scale with it, and an axis-turned icon turns by its rotation too

The contract gains offsetScalesByDistance: the pixel offset grows and
shrinks with scaleByDistance, as Cesium's pixelOffsetScaleByDistance does
with the same curve. rotationMode 'axis' now also turns by rotation, as a
Cesium billboard with an aligned axis and a rotation does. Cesium draws
both on its billboards; its GPU icons take the rotation and refuse a
scaled offset; the stub picks both. New conformance check
draw.icons.offsetTurn.
This commit is contained in:
Sameh Khamis committed 2026-11-14 02:03:26 -08:00
1 parent c99c577b3e
commit 7ba15deb5e
6 files changed
+113 -12

No files matched your search

+9 -2
View File
@@ -192,14 +192,21 @@ export interface IconItem extends Placed {
/**
* `screen`: upright on screen, rotated by `rotation`;
* `course`: rotated on screen along `course` (or the motion's course);
* `axis`: rotated about `alignedAxis`.
* `axis`: its up along `alignedAxis` as projected on screen, then
* rotated by `rotation`.
*/
rotationMode?: 'screen' | 'course' | 'axis';
/** Radians counter-clockwise on screen, for `rotationMode: 'screen'`. */
/**
* Radians counter-clockwise on screen, for `rotationMode: 'screen'` and
* `'axis'`.
*/
rotation?: number;
/** ECEF axis for `rotationMode: 'axis'`. */
alignedAxis?: Vec3;
/** CSS pixels, y down. */
pixelOffset?: ScreenXY;
/** `pixelOffset` grows and shrinks with `scaleByDistance`, as the icon does. */
offsetScalesByDistance?: boolean;
anchor?: 'center' | 'bottom' | 'top';
/** Swap to `near` when drawn larger than `switchPx`. */
imageLod?: { near: ImageRef; switchPx: number };