Newer
Older
/**
* For use in environment gltf bundles to set scene shadow properties.
* @component scene-shadow
*/
Robert Long
committed
AFRAME.registerComponent("scene-shadow", {
schema: {
type: {
type: "string",
default: "pcf"
}
},
init() {
this.originalShadowProperties = this.el.sceneEl.getAttribute("shadow");
},
Robert Long
committed
this.el.sceneEl.setAttribute("shadow", this.data);
},
remove() {
this.el.sceneEl.setAttribute("shadow", this.originalShadowProperties);
}
});