PV3Dれんしゅー nbhd forked:1favorite:0lines:27license : MIT License modified : 2009-03-03 18:43:25 Embed Tweet package { import flash.display.Sprite; import flash.events.Event; import org.papervision3d.view.*; import org.papervision3d.objects.primitives.*; [SWF(width="465", height="465", backgroundColor="#ffffff", frameRate="60")] public class SphereRot extends Sprite { private var world:BasicView = new BasicView(); private var sphere:Sphere; public function SphereRot() { addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event):void{ removeEventListener(Event.ADDED_TO_STAGE, init); addChild(world); sphere = new Sphere(null, 200, 30, 30); world.camera.z = -300; world.camera.focus = 5; world.scene.addChild(sphere); world.startRendering(); addEventListener(Event.ENTER_FRAME, entFnc); } private function entFnc(e:Event):void { sphere.rotationY += 0.2; } } } Code Fullscreen Preview Fullscreen world rotationY Event.ADDED_TO_STAGE addEventListener removeEventListener addChild Event.ENTER_FRAME Event Sprite sort new page view favorite forked pv434 ぎゅーん! nbhd forked:1 favorite:0lines:49 (diff:29)