var mc1:MovieClip=new Mc1();var map1:BitmapData=new BitmapData(60,60,true,0x00000000);map1.draw(mc1);var mc2:MovieClip=new Mc2();var map2:BitmapData=new BitmapData(60,60,true,0x00000000);map2.draw(mc2);var sp0:Sprite=new Sprite();addChild(sp0);var sp1:Sprite=new Sprite();addChild(sp1);sp0.x=sp1.x=275;sp0.y=sp1.y=200;var arr:Array=[];var f=500;for (var i:int=0; i<4; i++) {var mc:MovieClip=new MovieClip();sp1.addChild(mc);mc.x=i%2*60-30;mc.y=int(i/2)*60-30;mc.z=0;arr.push(mc);}addEventListener(Event.ENTER_FRAME,ff);function ff(e) {sp1.rotationY+=3;for (var i:int=0; i<arr.length; i++) {arr[i].rz=arr[i].transform.getRelativeMatrix3D(sp0).position.z;arr[i].rx=arr[i].transform.getRelativeMatrix3D(sp0).position.x*f/(f+arr[i].rz);arr[i].ry=arr[i].transform.getRelativeMatrix3D(sp0).position.y*f/(f+arr[i].rz);}var varr:Vector.<Number>=Vector.<Number>([arr[0].rx,arr[0].ry,arr[1].rx,arr[1].ry,arr[3].rx,arr[3].ry,arr[2].rx,arr[2].ry]);var indexs:Vector.<int>=Vector.<int>([0,1,3,1,2,3]);var uvt1:Vector.<Number>=Vector.<Number>([0,0,1,0,1,1,0,1]);var uvt2:Vector.<Number>=Vector.<Number>([1,0,0,0,0,1,1,1]);sp0.graphics.clear();sp0.graphics.beginBitmapFill(map1);sp0.graphics.drawTriangles(varr,indexs,uvt1,"negative");sp0.graphics.beginBitmapFill(map2);sp0.graphics.drawTriangles(varr,indexs,uvt2,"posltlve");******************************************************************************下面是测试中的错误提示ArgumentError: Error #2008: 参数 culling 必须是某个可接受的值。at flash.display::Graphics/drawTriangles()at _fla::MainTimeline/ff()哪位高手帮帮忙,我在此谢谢了!
添加回答
举报
0/150
提交
取消