03 2012 档案

摘要:package{ import flash.display.GraphicsTrianglePath; import flash.display.Sprite; import flash.display.TriangleCulling; import flash.events.Event; import flash.geom.Vector3D; /** * @author:Gaara * 2012-3-14 * **/ [SWF(width="800", height="600" ,frameRate="30", background 阅读全文
posted @ 2012-03-17 10:52 luozhifu 阅读(351) 评论(0) 推荐(0)
摘要:代码写出来了,只是理解得不够深。先计算镜头的显示坐标,再计算各点与镜头的距离,就是在镜头中的坐标。package{ import flash.display.GraphicsTrianglePath; import flash.display.Sprite; import flash.display.TriangleCulling; import flash.events.Event; import flash.geom.Vector3D; /** * @author:Gaara * 2012-3-14 * **/ [SWF(width="800", height=&quo 阅读全文
posted @ 2012-03-16 20:13 luozhifu 阅读(311) 评论(4) 推荐(0)
摘要:游戏中的镜头。锁定对象,根据计算坐标,修改父容器坐标,让物品处于最中点。package{ import flash.display.Sprite; import flash.display.Stage; import flash.events.Event; import flash.filters.GlowFilter; import flash.geom.Point; /** * @author:Gaara * 2012-3-16 * **/ public class Camer extends Sprite { private var myStage:Stage; priv... 阅读全文
posted @ 2012-03-16 16:05 luozhifu 阅读(192) 评论(0) 推荐(1)
摘要:package{ import flash.display.GraphicsTrianglePath; import flash.display.Sprite; import flash.display.TriangleCulling; import flash.events.Event; import flash.geom.Vector3D; /** * @author:Gaara * 2012-3-14 * **/ [SWF(width="800", height="600" ,frameRate="30", background 阅读全文
posted @ 2012-03-15 15:26 luozhifu 阅读(277) 评论(0) 推荐(0)
摘要:package{ import flash.display.GraphicsTrianglePath; import flash.display.Sprite; import flash.display.TriangleCulling; import flash.events.Event; import flash.geom.Vector3D; /** * @author:Gaara * 2012-3-14 * **/ [SWF(width="800", height="600" ,frameRate="30", background 阅读全文
posted @ 2012-03-15 11:22 luozhifu 阅读(307) 评论(1) 推荐(0)
摘要:看pan大神的博客,研究源码。package{ import flash.display.Bitmap; import flash.display.GraphicsTrianglePath; import flash.display.Sprite; /** * @author:Gaara * 2012-3-13 * **/ [SWF(width="800", height="600" ,frameRate="30", backgroundColor="#000000")] public class TestDraw 阅读全文
posted @ 2012-03-13 16:04 luozhifu 阅读(985) 评论(0) 推荐(0)
摘要:随机创建多个对象上一篇做了一绕z轴坐标旋转的正方体,这一篇随机创建1000个点,并进行尝试排序以及向屏幕移动。当z坐标小于0时移除对象。package{ import flash.display.Sprite; import flash.events.Event; /** * @author:Gaara * 2012-3-5 * **/ [SWF(width="800", height="600" ,frameRate="12", backgroundColor="#000000")] public class T 阅读全文
posted @ 2012-03-06 17:46 luozhifu 阅读(180) 评论(0) 推荐(0)
摘要:3d图形在原有的平面x,y的基础上加入深度z轴,使用几何透视法重新计算物体x,y坐标。坐标系统flash 3d中默认使用右手坐标系统,x坐标从左到右,y坐标从上到下,z从外到里指向屏幕.如图:透视法远小近大的原理,物体越远越靠近消失点,缩放比例更小。透视公式scale = fl/(fl+z),z坐标越大,公式分母越大,缩放比例越小。例子,首先创建一个ball类。package{ import flash.display.ColorCorrection; import flash.display.Sprite; /** * @author:Gaara * 2012-3-5 * *... 阅读全文
posted @ 2012-03-06 16:31 luozhifu 阅读(453) 评论(0) 推荐(0)