1 /** 2 * Copyright (C) 2009-2012 Klaus Reimer <k@ailis.de> 3 * See LICENSE.txt for licensing information 4 * 5 * @require threedee.js 6 * @require threedee/Color.js 7 * @require threedee/light/Light.js 8 */ 9 10 /** 11 * Constructs a new point light 12 * 13 * @param {threedee.Color=} color 14 * Optional light color. Defaults to white. 15 * 16 * @constructor 17 * @extends {threedee.Light} 18 * @class A Point light 19 */ 20 threedee.PointLight = function(color) 21 { 22 if (color) this.color = color; 23 }; 24 threedee.inherit(threedee.PointLight, threedee.Light); 25 26 /** 27 * The light color. 28 * @private 29 * @type {!threedee.Color} 30 */ 31 threedee.PointLight.prototype.color = threedee.Color.WHITE; 32 33 /** 34 * Sets the light color 35 * 36 * @param {!threedee.Color} color 37 * The light color to set. 38 */ 39 threedee.PointLight.prototype.setColor = function(color) 40 { 41 this.color = color; 42 }; 43 44 /** 45 * Returns the light color 46 * 47 * @return {!threedee.Color} 48 * The light color 49 */ 50 threedee.PointLight.prototype.getColor = function() 51 { 52 return this.color; 53 }; 54