Some 3D WebView's APIs such as Scroll() and MovePointer() accept an argument that is a normalized point. A normalized point is a Vector2 with x and y coordinates in the range [0, 1] because they are normalized to the webview's width and height, respectively. Like in the browser, the origin is in the upper-left corner, the positive direction of the y-axis is down, and the positive direction of the x-axis is right.
Some examples:
- The normalized point in the center of a webview is
Vector2(0.5f, 0.5f)
. Vector2(0.75f, 0.25f)
is a normalized point in the top right quadrant.
If you have a point in pixels, you can easily convert it to a normalized point with IWebView.PointToNormalized(). Conversely, you can convert a normalized point to a point in pixels with IWebView.NormalizedToPoint().