fix(ik): cache camera exposure decisions and reject hidden picks (#68) - #92
Merged
Conversation
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
force-pushed
the
fix/issue-68
branch
from
September 3, 2026 14:25
e095722 to
6c44993
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).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.jsxuses it in the existing hot path so a future change cannot silently reintroduce per-frame proxy scans during camera motion.userData.ikExposed === false: an occluded handle could still capture focus (verify-ik-browsercase "hidden shoulder cannot take its own focus" now passes).test/verify-ik-camera-performance.mjs(node, innpm test) and the perf harness + recorded JSON artifacts under.omo/qa/.Remaining
verify-ik-browserfailures (hand manipulator setup) are pre-existing on main and unrelated.