people walk by pv3d

 http://www.sandy1219.com/3d/test5/TestPeopleMotion.html

 

<textarea cols="78" rows="17" name="code" class="c-sharp">package { import com.kvc.extend.papervision3d.PlaneGrid3D; import flash.events.Event; import org.papervision3d.events.FileLoadEvent; import org.papervision3d.lights.PointLight3D; import org.papervision3d.materials.BitmapFileMaterial; import org.papervision3d.materials.utils.MaterialsList; import org.papervision3d.objects.parsers.DAE; import org.papervision3d.view.BasicView; public class TestPeopleMotion extends BasicView { public function TestPeopleMotion() { super(800,800,true,true); init3D(); } private var light:PointLight3D private var daeFile:DAE; private function init3D():void { light = new PointLight3D(true); light.z = -10000; light.y = 40000; light.x = 30000; scene.addChild(light); camera.focus = 60 ; camera.x = 1000; camera.y = 700; camera.z = -1000; loadAdeFile(); startRendering() } private function loadAdeFile():void { daeFile = new DAE(true,'song',true); var _mat:MaterialsList = new MaterialsList({all:new BitmapFileMaterial('dae/casual04_m_25.png')}); daeFile.load("dae/male_motion.DAE" , _mat ); daeFile.addEventListener(FileLoadEvent.LOAD_COMPLETE, onLoadComplete); } private function onLoadComplete(e:FileLoadEvent):void { scene.addChild(daeFile); //daeFile.y = -50 ; scene.addChild(new PlaneGrid3D()); } override protected function onRenderTick(event:Event=null):void { daeFile.rotationY = viewport.mouseX / 2; super.onRenderTick(event); } } }</textarea>

你可能感兴趣的:(people walk by pv3d)