Hi, your solution is correct.
I wrote some backround information about this topic:
https://github.com/aardvark-platform/aardvark.docs/wiki/client-values
TL;DR:
- These values are hidden because they need to be system-intrinsic for fast performance
- You can use those values freely within the scene graph using
renderControlWithClientValues
(or the according CameraController) - In case you have only one client with only one renderControl, you can evacuate view and proj trafo into your model (and subsequently into javascript) using
renderControl'
, which exposes the calculation of those trafos to the outside. Just do the same calculations in your model (in some "hacky" way) .This changes the performance of the system. - Recommendation: Can you solve the problem differently? You should rarely ever need the trafos outside of 3d rendering, and if you do, it will probably have massive performance implications.
Please ask here if there are any more questions.
Using screen space scaling or pixel perfect navigation, e.g. 2D panning, clients need to know their window size. Martins solution works quite well actually.
— Report