Skip to content

Commit bb1e7a4

Browse files
committed
Initialize layer also in AR mode
1 parent 2c1f69a commit bb1e7a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/layer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ module.exports.Component = registerComponent('layer', {
212212

213213
tick: function () {
214214
if (!this.el.sceneEl.xrSession) { return; }
215-
if (!this.layer && this.el.sceneEl.is('vr-mode')) { this.initLayer(); }
215+
if (!this.layer && (this.el.sceneEl.is('vr-mode') || this.el.sceneEl.is('ar-mode'))) { this.initLayer(); }
216216
this.updateTransform();
217217
if (this.data.src.complete && (this.pendingCubeMapUpdate || this.loadingScreen || this.visibilityChanged)) { this.loadCubeMapImages(); }
218218
if (!this.needsRedraw && !this.layer.needsRedraw && !this.textureIsVideo) { return; }

0 commit comments

Comments
 (0)