/** * R3.D3.API.Light.RectArea * @param apiComponent * * @property position * @property width * @property height * @property lookAt * * @constructor */ R3.D3.API.Light.RectArea = function( apiComponent ) { R3.D3.API.Light.call( this, apiComponent ); if (R3.Utils.UndefinedOrNull(apiComponent.position)) { apiComponent.position = new R3.API.Vector3( { parent : this, register : true, x : 0, y : 1, z : 0 } ); } this.position = apiComponent.position; if (R3.Utils.UndefinedOrNull(apiComponent.decay)) { apiComponent.decay = 1; } this.decay = apiComponent.decay; if (R3.Utils.UndefinedOrNull(apiComponent.distance)) { apiComponent.distance = 0; } this.distance = apiComponent.distance; if (R3.Utils.UndefinedOrNull(apiComponent.width)) { apiComponent.width = 10; } this.width = apiComponent.width; if (R3.Utils.UndefinedOrNull(apiComponent.height)) { apiComponent.height = 10; } this.height = apiComponent.height; if (R3.Utils.UndefinedOrNull(apiComponent.lookAt)) { apiComponent.lookAt = new R3.API.Vector3( { parent : this, register : true, x : 0, y : 0, z : 0 } ); } this.lookAt = apiComponent.lookAt; }; R3.D3.API.Light.RectArea.prototype = Object.create(R3.D3.API.Light.prototype); R3.D3.API.Light.RectArea.prototype.constructor = R3.D3.API.Light.RectArea;