mirror of
https://github.com/tiennm99/rubik.git
synced 2026-06-05 08:14:31 +00:00
c615138853
Drag-to-rotate sent edge and corner cubies the opposite direction at tilted camera angles. Root cause: motionWorld = R̂ × hitWorldPos picks up an in-plane component of P (β·F̂) for non-center cubies; under projection this can dominate motionScreen and flip signMul. Anchor the cross product to the face-normal axis only — drops the leakage so signMul is identical for every cubie on a face. Adds tests/gesture-math.test.js with face-invariance assertions across centers, edges, and corners on all 6 faces × 4 cardinal drags.