From 06334dc1bfeeb1a8020703d916eb533705d74e65 Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Wed, 21 Jun 2017 06:17:24 -0700 Subject: [PATCH] hide shadows for mobile on laser controls example (#2801) --- 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 a873c54d521..cbfe7b6d13e 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 @@ - +