Skip to content

Commit 0844681

Browse files
committed
force lighting param update
1 parent 38f1970 commit 0844681

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

index.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,9 @@ AFRAME.registerComponent('environment', {
324324
}
325325

326326
// scene lights
327-
if (this.data.lighting !== oldData.lighting) {
328-
this.sunlight.setAttribute('light', {type: this.data.lighting == 'point' ? 'point' : 'directional'});
329-
this.sunlight.setAttribute('visible', this.data.lighting !== 'none');
330-
this.hemilight.setAttribute('visible', this.data.lighting !== 'none');
331-
}
332-
327+
this.sunlight.setAttribute('light', {type: this.data.lighting == 'point' ? 'point' : 'directional'});
328+
this.sunlight.setAttribute('visible', this.data.lighting !== 'none');
329+
this.hemilight.setAttribute('visible', this.data.lighting !== 'none');
333330

334331
// check if ground geometry needs to be calculated
335332
var updateGroundGeometry =

tests/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<meta name="description" content="A-Frame Environment Component">
77
<meta name="author" content="Diego F. Goberna">
88
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
9-
<script src="../dist/aframe-environment-component.min.js"></script>
10-
<!--<script src="../index.js"></script>-->
9+
<!--<script src="../dist/aframe-environment-component.min.js"></script>-->
10+
<script src="../index.js"></script>
1111
<link href="https://fonts.googleapis.com/css?family=Voces" rel="stylesheet">
1212

1313
<style>

0 commit comments

Comments
 (0)