Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
How to obtain the aspect ratio / frustum of a render control?

What's the easiest way to obtain the actual frustum of my camera (i.e. considering the current aspect ratio of the render control)? A possible solution is to use the resize event to obtain the render control size:

let onResize (cb : V2i -> 'msg) =
    onEvent "onresize" ["{ X: $(document).width(), Y: $(document).height()  }"] (List.head >> Pickler.json.UnPickleOfString >> cb)

onBoot "$(window).trigger('resize')" (
    body [onResize RenderControlResized] [

Can this be simplified?

Posted 4 years ago
Votes Newest


Hi, your solution is correct.

I wrote some backround information about this topic:



  • 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.

DrShirota   2 years ago Report
1 Answer
4 years ago
2 years ago