A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/XRView/recommendedViewportScale below:

XRView: recommendedViewportScale property - Web APIs

XRView: recommendedViewportScale property

Limited availability

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The read-only recommendedViewportScale property of the XRView interface is the recommended viewport scale value that you can use for XRView.requestViewportScale() if the user agent has such a recommendation; null otherwise.

Value

A number greater than 0.0 and less than or equal to 1.0; or null if the user agent does not provide a recommended scale.

Examples Dynamic viewport scaling

Dynamic viewport scaling allows applications to only use a subset of the available framebuffer. The feature may not be available on all systems since it depends on driver support, so you might want to ensure that XRView.requestViewportScale exists before calling it.

for (const view of pose.views) {
  if (view.requestViewportScale) {
    view.requestViewportScale(view.recommendedViewportScale);
  }
  const viewport = glLayer.getViewport(view);
}
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4