diff --git a/index.js b/index.js index f6430241..031f6707 100644 --- a/index.js +++ b/index.js @@ -196,6 +196,17 @@ AFRAME.registerComponent('environment', { this.el.appendChild(this.sky); }, + remove: function(){ + this.el.removeChild(this.hemilight); + this.el.removeChild(this.sunlight); + this.el.removeChild(this.ground); + this.el.removeChild(this.dressing); + this.el.removeChild(this.sky); + if(this.stars){ + this.el.removeChild(this.stars); + } + }, + // returns a fog color from a specific sky type and sun height getFogColor: function (skyType, sunHeight) {