Показать сообщение отдельно
Старый 22.01.2011, 03:41
cr0w312 вне форума Посмотреть профиль Отправить личное сообщение для cr0w312 Найти все сообщения от cr0w312
  № 3  
Ответить с цитированием
cr0w312
 
Аватар для cr0w312

Регистрация: Mar 2009
Адрес: this.x=0;this.y=0;this.z=0
Сообщений: 89
Код AS3:
package 
{
	import flash.events.Event;
	import org.papervision3d.events.InteractiveScene3DEvent;
	import org.papervision3d.materials.ColorMaterial;
	import org.papervision3d.materials.WireframeMaterial;
	import org.papervision3d.objects.primitives.Sphere;
	import org.papervision3d.view.BasicView;
	/**
	 * ...
	 * @author cr0w312
	 */
	public class main extends BasicView
	{   
		private var sphera:Sphere;
 
		public function main() 
		{   
			init();
			startRendering()
		}   
		private function init():void
		{
			viewport.interactive = true;
			var mater:ColorMaterial = new ColorMaterial(0xccffcc, 1, true);
			sphera = new Sphere(mater, 300, 16, 16);
			sphera.addEventListener(InteractiveScene3DEvent.OBJECT_OVER, mouseover_handler);
			scene.addChild(sphera);
		}
		private function mouseover_handler(e:InteractiveScene3DEvent):void
		{
			e.face3d.material = new WireframeMaterial();
		}
 
		override protected function onRenderTick(e:Event=null):void
		{
			super.onRenderTick();
		}
	} 
}