aframe-environment-component
aframe-environment-component copied to clipboard
`lighting: none` does not remove lighting
Setting lighting: none
doesn't appear to remove lighting from the scene.
Using latest version: 1.0.0
For those having the same issue, I wrote a simple component to remove the lighting from the environment. Just add it to the entity that uses the environment
component.
Entity:
<a-entity environment="..." remove-lighting></a-entity>
Component:
/**
* Remove stubborn lighting from environment
*/
AFRAME.registerComponent('remove-lighting', {
dependencies: ['environment'],
update: function() {
var lights = this.el.querySelectorAll('[light]');
for (var i = 0; i < lights.length; i++) {
lights[i].removeAttribute('light');
}
}
});
I do confirm the issue, as well as the workaround being effective, thanks @dsinni !
No problem, @florentpeyrard. Glad it worked out for you.