VectorVision Hello World

Monday, December 8th, 2008 | examples

Since VectorVision was integrated with Papervision3D, it seemed only appropriate to make a Hello World demo for today. Simple, eh?


source

package
{
	import flash.events.Event;
 
	import org.papervision3d.materials.special.Letter3DMaterial;
	import org.papervision3d.typography.Font3D;
	import org.papervision3d.typography.Text3D;
	import org.papervision3d.typography.fonts.HelveticaBold;
	import org.papervision3d.view.BasicView;
 
	[SWF(width="640", height="480", backgroundColor="#000000", frameRate="60")]
	public class VectorVisionHelloWorld extends BasicView
	{
		private var text3D:Text3D;
 
		public function VectorVisionHelloWorld()
		{
			var material:Letter3DMaterial = new Letter3DMaterial(0xcc0000);
			var font3D:Font3D = new HelveticaBold();
			text3D = new Text3D("Hello World", font3D, material);
 
			scene.addChild(text3D);
 
			startRendering(); 	
		}
 
		override protected function onRenderTick(event:Event=null):void
		{
			text3D.yaw(1);
			renderer.renderScene(scene, camera, viewport);
		}
	}
}

Tags: ,

  • Michael

    When I copy the code above and run it in Flash, the text rotates fine but the disappears once it hits 90 degrees, so the backside is not visible. When i run the example above, it works perfectly. Do you know what could be causing this?

  • It's so cool you guys added VectorVision - I'm already using it and it works awesome...

  • I try this Example an get some Errors:

    TypeError: Error #1009: Der Zugriff auf eine Eigenschaft oder eine Methode eines null-Objektverweises ist nicht möglich.
    at org.papervision3d.view.layer::ViewportLayer/processRenderItem()
    at org.papervision3d.render::BasicRenderEngine/org.papervision3d.render:BasicRenderEngine::doRender()
    at org.papervision3d.render::BasicRenderEngine/renderScene()
    at VectorVisionHelloWorld/VectorVisionHelloWorld::onRenderTick()

    it's repeating all the time...

    No Permission or a method error.

    The Flash is working but there is only the first letter ( the "H" ) displayed.
    After one turn the letter switch to a mirrow d then again after a turn H and so on...

    I'm using Papervision3D Public Beta 2.0 - Great White (December 3rd, 2008)

blog comments powered by Disqus

Search

Recommended Books

Speaking at FITC Toronto

 

December 2008
M T W T F S S
« Nov   Jan »
1234567
891011121314
15161718192021
22232425262728
293031  

Preferred Video Tutorial Resolution

  • 1024x768 (53%, 85 Votes)
  • 1280x1024 (15%, 24 Votes)
  • 1920x1080 (15%, 24 Votes)
  • 800x600 (13%, 20 Votes)
  • 480x320 (4%, 6 Votes)
  • 640x480 (0%, 2 Votes)

Total Voters: 160

Loading ... Loading ...