Unsubscribe removed Navara effects and models from warm view frames

This commit is contained in:
German Khokhlov committed 2026-11-03 05:16:20 +04:00
1 parent 14f7b32537
commit 05b646daa3
16 files changed
+90 -19

No files matched your search

+3 -2
View File
@@ -9,6 +9,7 @@
// asks for one frame (view.forceUpdate); per-frame work runs only on frames
// the view draws anyway (S5), so an idle view stays idle.
import { withFrameUpdates } from '../frameDescriptor.js';
import {
MeshDesc,
PickableInstancedMeshWrapper,
@@ -25,7 +26,7 @@ import { createNavaraOverlay } from '../overlay.js';
const DESC_NAME = 'gevMoverSet';
const registered = new WeakSet();
class GevMoverSetDesc extends MeshDesc {
class GevMoverSetDesc extends withFrameUpdates(MeshDesc) {
constructor(view, ctx, config) {
super(view, ctx, config);
this.gev = config[DESC_NAME];
@@ -59,7 +60,7 @@ class GevMoverSetDesc extends MeshDesc {
return group;
}
update(time) {
updateFrame(time) {
updateMover(this.gev.readFrameCamera, this.ctx, this.gev.mover, time);
}
+7 -3
View File
@@ -27,15 +27,19 @@ test('disposing a sprite atlas drops decoded images and detaches pending load ca
const previous = globalThis.Image;
let image;
globalThis.Image = class {
constructor() { image = this; }
constructor() {
image = this;
}
};
t.after(() => {
if (previous) globalThis.Image = previous;
else delete globalThis.Image;
});
const options = normalizeMoverSetOptions({
...spriteOptions, sprite: {
sizePx: 24, atlas: { url: '/bracket.svg', cells: { a: [0, 0, 1, 1] } },
...spriteOptions,
sprite: {
sizePx: 24,
atlas: { url: '/bracket.svg', cells: { a: [0, 0, 1, 1] } },
},
});
for (const loaded of [false, true]) {