Skip to content

Commit

Permalink
Wait this.referenceSpace to be set before calling this.initLayer (#5626)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin authored Jan 12, 2025
1 parent c0ba898 commit fed4845
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ module.exports.Component = registerComponent('layer', {

tick: function () {
if (!this.el.sceneEl.xrSession) { return; }
if (!this.referenceSpace) { return; }
if (!this.layer && (this.el.sceneEl.is('vr-mode') || this.el.sceneEl.is('ar-mode'))) { this.initLayer(); }
this.updateTransform();
if (this.data.src.complete && (this.pendingCubeMapUpdate || this.loadingScreen || this.visibilityChanged)) { this.loadCubeMapImages(); }
Expand Down

0 comments on commit fed4845

Please sign in to comment.