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

📄 flash_3d教程——闪吧 flash8.htm

📁 3D教程,简明地介绍了如何在flash中实现3维坐标转化成屏幕坐标,也讲述了如何旋转3D物体.内附了几个3D源文件.
💻 HTM
📖 第 1 页 / 共 5 页
字号:
            <DIV><FONT face=宋体>/*function create_planes(){</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=0;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane1.clear();</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane1.beginFill(0xAB548B,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane1.lineStyle(3,0xFF0000,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane1.moveTo(p_node[5].x,p_node[5].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane1.lineTo(p_node[8].x,p_node[8].y); 
            </FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane1.lineTo(p_node[7].x,p_node[7].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane1.lineTo(p_node[6].x,p_node[6].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane1.lineTo(p_node[5].x,p_node[5].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>depth=node[8].z+node[7].z+node[6].z+node[5].z;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=depth/(-4);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane1.swapDepths(depth);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>amount=depth/50*100+15;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>//new 
            Color(plane1).setTransform({ra:amount,ga:amount,ba:amount,aa:amount});</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>new 
            Color(plane1).setTransform({ra:amount,ga:amount,ba:amount});</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=0;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane2.clear();</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane2.beginFill(0x808080,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane2.lineStyle(3,0xFF0000,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane2.moveTo(p_node[1].x,p_node[1].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane2.lineTo(p_node[2].x,p_node[2].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane2.lineTo(p_node[3].x,p_node[3].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane2.lineTo(p_node[4].x,p_node[4].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane2.lineTo(p_node[1].x,p_node[1].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>depth=depth+node[4].z+node[3].z+node[2].z+node[1].z;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=depth/(-4);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane2.swapDepths(depth);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>amount=depth/50*100+15;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>new 
            Color(plane2).setTransform({ra:amount,ga:amount,ba:amount});</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=0;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane3.clear();</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane3.beginFill(0x8A0FF0,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane3.lineStyle(3,0xFF0000,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane3.moveTo(p_node[1].x,p_node[1].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane3.lineTo(p_node[2].x,p_node[2].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane3.lineTo(p_node[6].x,p_node[6].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane3.lineTo(p_node[5].x,p_node[5].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane3.lineTo(p_node[1].x,p_node[1].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>depth=depth+node[1].z+node[2].z+node[6].z+node[5].z;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=depth/(-4);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane3.swapDepths(depth);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>amount=depth/50*100+15;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>new 
            Color(plane3).setTransform({ra:amount,ga:amount,ba:amount});</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=0;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane4.clear();</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane4.beginFill(0xE61A48,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane4.lineStyle(3,0xFF0000,100); </FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane4.moveTo(p_node[2].x,p_node[2].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane4.lineTo(p_node[3].x,p_node[3].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane4.lineTo(p_node[7].x,p_node[7].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane4.lineTo(p_node[6].x,p_node[6].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane4.lineTo(p_node[2].x,p_node[2].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>depth=depth+node[2].z+node[3].z+node[7].z+node[6].z;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=depth/(-4);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane4.swapDepths(depth);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>amount=depth/50*100+15;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>new 
            Color(plane4).setTransform({ra:amount,ga:amount,ba:amount});</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=0;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane5.clear();</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane5.beginFill(0x49B667,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>plane5.lineStyle(3,0xFF0000,100);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane5.moveTo(p_node[4].x,p_node[4].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane5.lineTo(p_node[3].x,p_node[3].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane5.lineTo(p_node[7].x,p_node[7].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane5.lineTo(p_node[8].x,p_node[8].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>plane5.lineTo(p_node[4].x,p_node[4].y);</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT 
            face=宋体>depth=depth+node[4].z+node[3].z+node[7].z+node[8].z;</FONT></DIV>
            <DIV></DIV>
            <P>
            <DIV><FONT face=宋体>depth=depth/(-4);</FONT></DIV>
            <DIV></DIV>

⌨️ 快捷键说明

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