Skip to content

Commit

Permalink
Initialize layer also in AR mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarcos committed Mar 19, 2024
1 parent 2c1f69a commit bb1e7a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ module.exports.Component = registerComponent('layer', {

tick: function () {
if (!this.el.sceneEl.xrSession) { return; }
if (!this.layer && this.el.sceneEl.is('vr-mode')) { this.initLayer(); }
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(); }
if (!this.needsRedraw && !this.layer.needsRedraw && !this.textureIsVideo) { return; }
Expand Down

0 comments on commit bb1e7a4

Please sign in to comment.