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/SceneNode.js 7 */ 8 9 /** 10 * Constructs a new light node. 11 * 12 * @param {!threedee.Light} light 13 * The light 14 * 15 * @constructor 16 * @extends {threedee.SceneNode} 17 * @class 18 * A node which positions a light in the scene. 19 */ 20 21 threedee.LightNode = function(light) 22 { 23 threedee.SceneNode.call(this); 24 this.light = light; 25 }; 26 threedee.inherit(threedee.LightNode, threedee.SceneNode); 27 28 /** 29 * The light. 30 * @private 31 * @type {!threedee.Light} 32 */ 33 threedee.LightNode.prototype.light; 34 35 /** 36 * @inheritDoc 37 * 38 * @param {!threedee.PolygonBuffer} buffer 39 * @param {!threedee.Matrix} transform 40 */ 41 threedee.LightNode.prototype.render = function(buffer, transform) 42 { 43 buffer.addLight(this.light, transform); 44 }; 45