pmndrs / drei

🥉 useful helpers for react-three-fiber
https://drei.pmnd.rs/
MIT License
7.83k stars 642 forks source link

View.tsx does not respect "manual" attribute of Orthographic camera. #1966

Open talkingtab opened 1 month ago

talkingtab commented 1 month ago

Line 88.

see also #515 see also #1562

What a hydra!

talkingtab commented 1 month ago

Setting a custom frustum in an OrthographicCamera is fragile. Setting {manual: true} is required. You also have to ensure that left right, top bottom are passed the right way - not args[]. Then there are issues of updating cameras and ensuring new code does not just assume that the right thing is just update on size.

I can think of strategies: if {rltb} is passed in, automatically mark it as 'manual' invert the sense, assume "manual" but pass in "dynamic" :-) or maybe best, require some flag to be set like {policy='manual'} I'm not sure these are really good idea or suggestions, but it would be nice to avoid users running into this and coders updating based on size.