A RetroSearch Logo

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

Search Query:

Showing content from https://github.com/immersive-web/webxr-layers-polyfill below:

immersive-web/webxr-layers-polyfill: WebXR Layers Polyfill library. Lead: Rik Cabanier.

A Javascript implementation of the WebXR Layers API, which renders layers in WebGL.

This polyfill only polyfills the Layers API; use the WebXR Polyfill to polyfill other WebXR features.

Download the polyfill from build/webxr-layers-polyfill.js and include it as a script tag.

<script src="webxr-layers-polyfill.js"></script>

Then, you will need to instantiate the polyfill in code before calling any XR code:

let layersPolyfill = new WebXRLayersPolyfill()

The polyfill is written in Typescript and bundled with Rollup. Build with

To run the examples, create a build, then run:

and point your web browser to http://localhost:8080/examples/layers-samples/.

The polyfill provides polyfilled classes for the new layer types defined in the WebXR Layers API, and modifies XRSession to use those polyfilled classes. The layers provide the WebGLTextures that the application renders into, then the polyfilled XRSession renders those layers onto an internal baseLayer. This baseLayer is then displayed in headset, in the same way that an XRSession without layers support would render it.

This program is free software for both commercial and non-commercial use, distributed under the Apache 2.0 license, which can be found in the LICENSE file.


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