Skip to content

Commit

Permalink
force lighting param update
Browse files Browse the repository at this point in the history
  • Loading branch information
feiss committed Mar 22, 2018
1 parent 38f1970 commit 0844681
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,9 @@ AFRAME.registerComponent('environment', {
}

// scene lights
if (this.data.lighting !== oldData.lighting) {
this.sunlight.setAttribute('light', {type: this.data.lighting == 'point' ? 'point' : 'directional'});
this.sunlight.setAttribute('visible', this.data.lighting !== 'none');
this.hemilight.setAttribute('visible', this.data.lighting !== 'none');
}

this.sunlight.setAttribute('light', {type: this.data.lighting == 'point' ? 'point' : 'directional'});
this.sunlight.setAttribute('visible', this.data.lighting !== 'none');
this.hemilight.setAttribute('visible', this.data.lighting !== 'none');

// check if ground geometry needs to be calculated
var updateGroundGeometry =
Expand Down
4 changes: 2 additions & 2 deletions tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<meta name="description" content="A-Frame Environment Component">
<meta name="author" content="Diego F. Goberna">
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
<script src="../dist/aframe-environment-component.min.js"></script>
<!--<script src="../index.js"></script>-->
<!--<script src="../dist/aframe-environment-component.min.js"></script>-->
<script src="../index.js"></script>
<link href="https://fonts.googleapis.com/css?family=Voces" rel="stylesheet">

<style>
Expand Down

0 comments on commit 0844681

Please sign in to comment.