fix: return [0, 0] from calculatePosition if camera projection fails#47
fix: return [0, 0] from calculatePosition if camera projection fails#47milesflavel wants to merge 1 commit intopmndrs:mainfrom
Conversation
|
I'm not sure I understand this one. |
The problem arises when we check the value here https://github.com/pmndrs/react-three-a11y/pull/47/files#diff-32dc2dac919df01db7d6bf3121c0154e2f292742bf796529b3b19632da0dc7d7R143-R144 When the value is NaN, we never enter this condition, which means that we never update the value on this line https://github.com/pmndrs/react-three-a11y/pull/47/files#diff-32dc2dac919df01db7d6bf3121c0154e2f292742bf796529b3b19632da0dc7d7R155 Downstream this affects the rendered x,y positions, causing all elements to be rendered at a default position in the top-left corner perpetually. |
Partially resolves #45 (comment) (bug from last bullet point)