⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lightobject3d.as

📁 一个2D基于verlet的Flash物理引擎。它用AS3编写而成。Fisix的目标是应用到游戏等计算量很大的实时应用中。尽管flash比c/c++要慢,很棒的物理引擎
💻 AS
字号:
package org.papervision3d.core.proto{	import org.papervision3d.core.math.Matrix3D;	import org.papervision3d.materials.WireframeMaterial;	import org.papervision3d.objects.DisplayObject3D;	import org.papervision3d.objects.primitives.Sphere;	public class LightObject3D extends DisplayObject3D	{		public var lightMatrix:Matrix3D;				/** 		 * A boolean value indicating whether to flip the light direction. Hack needed by DAE. 		 * NOTE:  		 */		public var flipped:Boolean;				private var _showLight:Boolean;				private var displaySphere:Sphere;				public function LightObject3D(showLight:Boolean = false, flipped:Boolean = false)		{			super();			this.lightMatrix = Matrix3D.IDENTITY;			this.showLight = showLight;			this.flipped = flipped;		}				public function set showLight(show:Boolean):void		{			if(_showLight){				removeChild(displaySphere);			}			if(show){				displaySphere = new Sphere(new WireframeMaterial(0xffff00), 10, 3, 2);				addChild(displaySphere);			}			_showLight = show;		}				public function get showLight():Boolean		{			return _showLight;		}	}}

⌨️ 快捷键说明

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