Settle leases, styles, credits and controls in the renderer contract

- claimPointer takes a grab filter, asked on each down: a lease takes
  only the presses it grabs, and wheel, pinch and every other press stay
  with the camera and everyone else. Each event of a press goes where its
  down went, per button, so a claim never takes a press under way.
- The app owns the styles: effects.defineStyle passes a GLSL (and optionally
  WGSL) full-screen pass, with the shader interface written out.
- Credits are plain data ({ text, href, logoUrl, inline }) that the app
  renders; CreateOptions.creditContainer goes.
- controls.coast { drag, zoom } in seconds replaces the inertia trio; the
  stub's defaults are the default renderer's, converted.
- The frame order is the default renderer's own: a move made by follow or
  in preUpdate reaches changed on the next frame.
This commit is contained in:
Sameh Khamis committed 2026-11-05 13:11:59 -08:00
1 parent b7c26351f7
commit a7aeeb558a
12 files changed
+591 -34

No files matched your search

+20
View File
@@ -242,6 +242,26 @@ export function cameraChecks() {
[-1.2, -0.1],
'pitchRange is settable',
);
const { coast } = r.camera.controls;
for (const key of ['drag', 'zoom'])
ok(
Number.isFinite(coast[key]) && coast[key] >= 0,
`coast.${key} is seconds`,
);
r.camera.controls.coast = { drag: 0.25, zoom: 0 };
// Within rounding: an engine may keep it as a decay coefficient.
near(
r.camera.controls.coast.drag,
0.25,
1e-9,
'coast.drag is settable',
);
near(
r.camera.controls.coast.zoom,
0,
1e-9,
'a coast of 0 stops at once',
);
r.destroy();
},
},