Complete phase 3 W1 acceptance and close T16 findings

Fix Navara model display tint, overlay ordering, follow gestures and resource cleanup.
Reduce repeated aircraft work and correct fixture enrichment responses.
Strengthen dev/preview QA, preserve failure history and document verified W1 results.

Validation: 7171 ordinary tests pass, one Windows-only skip; 15 allocation probes;
37 W1 acceptance steps; contracts, shell, four performance gates; 18 identical
Cesium baseline PNGs. Known pre-existing CCTV and live-source limits are recorded.
This commit is contained in:
German Khokhlov committed 2026-10-26 23:23:25 +04:00
1 parent 766c786093
commit 0600964249
59 files changed
+2334 -701

No files matched your search

+33 -7
View File
@@ -57,6 +57,13 @@ const fieldsNoPick = {
show: undefined,
};
const scratchColor = new Float64Array(4);
// Sprite setters write synchronously into the mover store; reuse their
// field records rather than allocating one per contact and assignment.
const spritePositionField = { position: null };
const spriteShowField = { show: true };
const spriteRotationField = { rotation: 0 };
const spriteScaleField = { scale: 1 };
const spriteColorField = { color: scratchColor };
function writeFields(set, index, fields) {
const scratch = fieldsNoPick;
for (const key in fields) scratch[key] = fields[key];
@@ -371,7 +378,8 @@ export function createAircraftNavaraRenderer({
set position(value) {
geo.cartesian3.clone(value, this._position);
this.write({ position: this._position });
spritePositionField.position = this._position;
this.write(spritePositionField);
}
get show() {
@@ -379,8 +387,11 @@ export function createAircraftNavaraRenderer({
}
set show(value) {
this._show = value !== false;
this.write({ show: this._show });
const next = value !== false;
if (next === this._show) return;
this._show = next;
spriteShowField.show = next;
this.write(spriteShowField);
}
get rotation() {
@@ -388,8 +399,10 @@ export function createAircraftNavaraRenderer({
}
set rotation(value) {
if (value === this._rotation) return;
this._rotation = value;
this.write({ rotation: value });
spriteRotationField.rotation = value;
this.write(spriteRotationField);
}
get scale() {
@@ -397,8 +410,10 @@ export function createAircraftNavaraRenderer({
}
set scale(value) {
if (value === this._scale) return;
this._scale = value;
this.write({ scale: this.drawnScale() });
spriteScaleField.scale = this.drawnScale();
this.write(spriteScaleField);
}
get width() {
@@ -406,8 +421,10 @@ export function createAircraftNavaraRenderer({
}
set width(value) {
if (value === this._width) return;
this._width = value;
this.write({ scale: this.drawnScale() });
spriteScaleField.scale = this.drawnScale();
this.write(spriteScaleField);
}
get height() {
@@ -423,8 +440,17 @@ export function createAircraftNavaraRenderer({
}
set color(value) {
if (
value !== this._color &&
(value?.red ?? 1) === this._color.red &&
(value?.green ?? 1) === this._color.green &&
(value?.blue ?? 1) === this._color.blue &&
(value?.alpha ?? 1) === this._color.alpha
)
return;
this._color = new StoredColor(value);
this.write({ color: rgbaOf(this._color) });
rgbaOf(this._color);
this.write(spriteColorField);
}
get image() {
@@ -293,3 +293,59 @@ test('trails are engine lines in the trail pick namespace; the head follows each
renderer.destroy();
engine.destroy();
});
test('unchanged sprite style does not upload or request another frame', async () => {
const { engine, renderer } = await setup();
const sprite = renderer.fleet.add({
id: 'same',
position: geo.cartesian3.fromDegrees(0, 0, 1000),
image: aircraftIcon('light'),
});
await Promise.resolve();
const [listed] = setsOf(engine, 'flights-sprites');
const part = engine.fake.moverSet(listed.id);
const before = part.commits;
const color = sprite.color;
for (let n = 0; n < 1000; n++) {
sprite.show = true;
sprite.rotation = 0;
sprite.scale = 1;
sprite.width = 20;
sprite.color = WHITE;
}
await Promise.resolve();
assert.equal(part.commits, before);
assert.equal(sprite.color, color);
renderer.destroy();
engine.destroy();
});
test('reused sprite field records are copied, including a mutated color getter', async () => {
const { engine, renderer } = await setup();
const a = renderer.fleet.add({
id: 'a',
position: geo.cartesian3.fromDegrees(0, 0, 1000),
image: aircraftIcon('light'),
});
const b = renderer.fleet.add({
id: 'b',
position: a.position,
image: aircraftIcon('light'),
});
await Promise.resolve();
const [listed] = setsOf(engine, 'flights-sprites');
const { store } = engine.fake.moverSet(listed.id);
const position = geo.cartesian3.create(7, 8, 9);
a.position = position;
position.x = 20;
b.position = position;
a.color.alpha = 0.25;
a.color = a.color;
b.color = WHITE.withAlpha(0.75);
await Promise.resolve();
assert.deepEqual([...store.positions.subarray(0, 6)], [7, 8, 9, 20, 8, 9]);
assert.equal(store.colors[3], 0.25);
assert.equal(store.colors[7], 0.75);
renderer.destroy();
engine.destroy();
});