From acd3a3a35220f3d0ec1e6719e9a8a19049262e7a Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Tue, 20 Jun 2017 13:45:20 -0700 Subject: [PATCH] hide shadows for mobile on laser controls example --- examples/test/laser-controls/index.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/examples/test/laser-controls/index.html b/examples/test/laser-controls/index.html index a873c54d52..cbfe7b6d13 100644 --- a/examples/test/laser-controls/index.html +++ b/examples/test/laser-controls/index.html @@ -34,6 +34,18 @@ } } }); + + AFRAME.registerComponent('shadow-if-mobile', { + init: function () { + if (!this.el.sceneEl.isMobile) { + this.el.setAttribute('light', { + castShadow: true, + shadowMapWidth: 2048, + shadowMapHeight: 1024 + }); + } + } + }); @@ -48,7 +60,7 @@ - +