lightarray.as

来自「著名的flash 3d引擎 away 3d的源代码」· AS 代码 · 共 69 行

AS
69
字号
package away3d.core.light{    /**    * Array for storing light primitives.    */    public class LightArray implements ILightConsumer    {    	/**    	 * The ambient light primitives stored in the consumer.    	 */        public var ambients:Array;            	/**    	 * The directional light primitives stored in the consumer.    	 */        public var directionals:Array;            	/**    	 * The point light primitives stored in the consumer.    	 */        public var points:Array;            	/**    	 * The total number of light primitives stored in the consumer.    	 */		public var numLights:int;        		/**		 * @inheritDoc		 */        public function ambientLight(ambient:AmbientLight):void        {            ambients.push(ambient);            numLights++;        }        		/**		 * @inheritDoc		 */        public function directionalLight(directional:DirectionalLight):void        {            directionals.push(directional);            numLights++;        }        		/**		 * @inheritDoc		 */        public function pointLight(point:PointLight):void        {            points.push(point);            numLights++;        }                /**        * Clears all light primitives from the consumer.        */        public function clear():void        {        	ambients = [];	        directionals = [];	        points = [];	        numLights = 0;        }    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?