@needle-tools/three 0.169.3 → 0.169.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/three",
3
- "version": "0.169.3",
3
+ "version": "0.169.4",
4
4
  "description": "JavaScript 3D library",
5
5
  "type": "module",
6
6
  "main": "./build/three.cjs",
@@ -281,7 +281,11 @@ class WebXRManager extends EventDispatcher {
281
281
  currentPixelRatio = renderer.getPixelRatio();
282
282
  renderer.getSize( currentSize );
283
283
 
284
- if ( session.renderState.layers === undefined ) {
284
+ // Check that the browser implements the necessary APIs to use an
285
+ // XRProjectionLayer rather than an XRWebGLLayer
286
+ const useLayers = typeof XRWebGLBinding !== 'undefined' && 'createProjectionLayer' in XRWebGLBinding.prototype;
287
+
288
+ if ( ! useLayers ) {
285
289
 
286
290
  const layerInit = {
287
291
  antialias: attributes.antialias,