elation-engine
Version:
WebGL/WebVR engine written in Javascript
19 lines (18 loc) • 597 B
JavaScript
elation.require(['engine.things.light'], function() {
elation.component.add('engine.things.light_ambient', function() {
this.postinit = function() {
this.defineProperties({
'color': { type: 'color', default: 0x444444, set: this.updateLight },
});
}
this.createObject3D = function() {
this.lightobj = new THREE.AmbientLight(this.properties.color);
return this.lightobj;
}
this.updateLight = function() {
if (this.lightobj) {
//this.lightobj.color.copy(this.color);
}
}
}, elation.engine.things.light);
});