Skip to content

fix(ik): cache camera exposure decisions and reject hidden picks (#68) - #92

Merged
HaD0Yun merged 1 commit into
mainfrom
fix/issue-68
Sep 3, 2026
Merged

fix(ik): cache camera exposure decisions and reject hidden picks (#68)#92
HaD0Yun merged 1 commit into
mainfrom
fix/issue-68

Conversation

@HaD0Yun

@HaD0Yun HaD0Yun commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #68.

What was measured

Real Chrome (ANGLE Metal, Apple M4 Pro) over CDP with the new harness tools/perf/ik-camera-drag.mjs: character with motion loaded, IK ON, a 2 s synthetic right-button drag, frame times sampled via rAF. Three runs each on the unfixed tree and on this branch, at DPR 1 and at DPR 2 (1920x1200 viewport).

tree median p95 fps
main 8f0c5c7 (DPR 2) 16.7 ms 16.8 ms 56.7-57.2
this branch (DPR 2) 16.7 ms 16.8 ms 56.2-56.7

The camera-drag path is already vsync-bound on current main: the substantive optimisations for this issue landed after it was filed (6daea2d, 1401e0e, 4be7cd7, 56baded — exposure skipped during camera gestures, deferred outline passes, reduced DPR while navigating, frozen shadow maps). A CPU profile during the drag shows only (idle)/(program)/React JSX construction. So the honest relative improvement is 0%; the absolute result is above 55 fps.

What this branch changes

  • shouldRefreshIkExposure() (src/use-render-activity.js) makes the exposure refresh policy explicit and unit-testable; posestudio.jsx uses it in the existing hot path so a future change cannot silently reintroduce per-frame proxy scans during camera motion.
  • Pointer picking now excludes handles whose userData.ikExposed === false: an occluded handle could still capture focus (verify-ik-browser case "hidden shoulder cannot take its own focus" now passes).
  • test/verify-ik-camera-performance.mjs (node, in npm test) and the perf harness + recorded JSON artifacts under .omo/qa/.

Remaining verify-ik-browser failures (hand manipulator setup) are pre-existing on main and unrelated.

Keep the expensive IK exposure result cached while the camera is moving, make the refresh policy regression-testable, and prevent occluded handles from capturing focus. Include the CDP drag profiler and recorded GPU QA artifacts.
@HaD0Yun
HaD0Yun merged commit 43487c5 into main Sep 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: IK mode right-click camera navigation lags

1 participant