dehash »  AS3 Papervision3D GreatWhite example code «

Some AS3 code examples that use Papervision3D GreatWhite from SVN. Made with FlashDevelop and Flex3 SDK but as they are pure AS3 examples they should work mostly the same in Flash 9 too. Some examples are clean and basic but others are less so and some are just ideas for things to explore later when more examples are added. Will try to put build/revision number in each post but note when using SVN it is inevitable that if some time has passed parts of these they may not work without tweaking in later builds. The source code text is released as open source under the BSD License which is a very open license with few restrictions. Any external media used however (bitmaps, flv, sound etc) is not covered by this license. If you notice mistakes please email dehash_at_gmail_dot_com.

 

Title: Plane wireframe

Simple wireframe plane using BasicView – revision 652

ActionScript
< view plain text >
  1. /**
  2. * v0.1 code by dehash.com 2008
  3. * Released as open source under the BSD License
  4. * http://www.opensource.org/licenses/bsd-license.php
  5. */
  6. package com.dehash.pv3d.examples.basic
  7. {
  8.  
  9. import org.papervision3d.objects.primitives.Plane;
  10. import org.papervision3d.view.BasicView;
  11.  
  12. [SWF(width="800", height="600", backgroundColor="0xffffff")]
  13.  
  14. public class PlaneDemo extends BasicView
  15. {
  16.  
  17. public function PlaneDemo(viewportWidth:Number = 800, viewportHeight:Number = 600,
  18. scaleToStage:Boolean=true, interactive:Boolean=false, cameraType:String="CAMERA3D")
  19. {
  20.  
  21. super(viewportWidth, viewportHeight, scaleToStage, interactive, cameraType);
  22.  
  23. scene.addChild(new Plane());
  24. renderer.renderScene(scene, camera, viewport);
  25.  
  26. }
  27.  
  28. }
  29. }