/** * Light Superset * @param id * @param lightType * @param name * @param color * @param intensity * @param position * @param targetPosition * @param quaternion * @param rotation * @param scale * @param distance * @param decay * @param power * @param angle * @param penumbra * @constructor */ GameLib.D3.Light = function( id, lightType, name, color, intensity, position, targetPosition, quaternion, rotation, scale, distance, decay, power, angle, penumbra ) { this.id = id; this.lightType = lightType; this.name = name; this.color = color; this.intensity = intensity; if (typeof position == 'undefined') { position = new GameLib.D3.Vector3(0,0,0); } this.position = position; if (typeof targetPosition == 'undefined') { targetPosition = new GameLib.D3.Vector3(0,0,0); } this.targetPosition = targetPosition; if (typeof quaternion == 'undefined'){ quaternion = new GameLib.D3.Vector4(); } this.quaternion = quaternion; if (typeof rotation == 'undefined'){ rotation = new GameLib.D3.Vector3(0,0,0); } this.rotation = rotation; if (typeof scale == 'undefined'){ scale = new GameLib.D3.Vector3(1,1,1); } this.scale = scale; if (typeof distance == 'undefined'){ distance = 0; } this.distance = distance; if (typeof decay == 'undefined'){ decay = 1; } this.decay = decay; if (typeof power == 'undefined'){ power = 4 * Math.PI; } this.power = power; if (typeof angle == 'undefined'){ angle = Math.PI / 3; } this.angle = angle; if (typeof penumbra == 'undefined'){ penumbra = 0; } this.penumbra = penumbra; };