※現在、「wonderfl build flash online」求人コンテンツ制作に関してのアンケートを実施中です!みなさまのお力添えを頂いて、続々とアンケート結果が集まっていますが、まだまだ募集しております。ご協力のほど、どうぞよろしくお願いいたします!

wonderfl運営事務局
→アンケートページ(※ログインしてからお答えいただけるようになっています。)

 notice: Flash editor updated! Join the development! Thanks to MiniBuilder


FORKED
  1. // forked from mash's Hello Papervision3D!
  2. // Hello Papervision3D!
  3. // http://code.google.com/p/papervision3d/downloads/list
  4. // http://papervision3d.googlecode.com/files/Examples_Basics_1_HelloWorld.zip
  5. package {
  6.     import flash.display.MovieClip;
  7.     public class Main extends MovieClip
  8.     {
  9.         protected var helloWorld:HelloWorld;
  10.         public function Main()
  11.         {
  12.             stage.frameRate = 25;
  13.             helloWorld = new HelloWorld();
  14.             addChild(helloWorld);
  15.         }
  16.     }
  17. }
  18. import flash.display.BitmapData;
  19. import flash.events.Event;
  20. import org.papervision3d.materials.BitmapMaterial;
  21. import org.papervision3d.objects.primitives.Sphere;
  22. import org.papervision3d.view.BasicView;
  23. /**
  24.  * @author Ralph Hauwert
  25.  */
  26. class HelloWorld extends BasicView
  27. {
  28.     
  29.     protected var world:Sphere;
  30.     protected var worldBitmapData:BitmapData;
  31.     protected var worldMaterial:BitmapMaterial;
  32.     
  33.     /**
  34.      * HelloWorld
  35.      * 
  36.      * HelloWorld extends BasicView, which is an utility class for Papervision3D, which automatically sets up
  37.      * Scene, Camera, Renderer and Viewport for you.
  38.      * 
  39.      * This allows for easy Papervision3D initialization.
  40.      * 
  41.      * This HelloWorld example utilizes BasicView to set up the the basics, and then extends upon it and setup a basic primitive and material.
  42.      */    
  43.     public function HelloWorld()
  44.     {
  45.         /**
  46.          * Call the BasicView constructor.
  47.          * Width and Height are set to 1, since scaleToStage is set to true, these will be overriden.
  48.          * We will not use interactivity and keep the default cameraType.
  49.          */
  50.         super(11truefalse);
  51.         
  52.         //Color the background of this basicview / helloworld instance black.
  53.         opaqueBackground = 0;
  54.         
  55.         //Create the materials and primitives.
  56.         initScene();
  57.         
  58.         //Call the native startRendering function, to render every frame.
  59.         startRendering();
  60.     }
  61.     
  62.     /**
  63.      * initScene will create the needed primitives, and materials.
  64.      */
  65.     protected function initScene():void
  66.     {
  67.         //Create a new bitmapdata to be used as a texture for our world.
  68.         worldBitmapData = new BitmapData(512,256,false,0);
  69.         //Use perlin noise to colorize the texture....for examples sake.
  70.         worldBitmapData.perlinNoise(512,256,4123456true,false);
  71.         
  72.         //Create a material to be used by the sphere primitive.
  73.         //The Material will utilize the bitmapData we just created as a texture.
  74.         worldMaterial = new BitmapMaterial(worldBitmapData);
  75.     
  76.         //Create the world primitive, using the native Sphere primitive.
  77.         world = new Sphere(worldMaterial,30010,10);
  78.         
  79.         //Add the world to the scene, which is already instanciated by the super BasicView.
  80.         scene.addChild(world);
  81.     }
  82.     
  83.     /**
  84.      * onRenderTick();
  85.      * 
  86.      * onRenderTick can be overriden so you can execute code on a per render basis, using basicview.
  87.      * in this case we use it to
  88.      */
  89.     override protected function onRenderTick(event:Event=null):void
  90.     {
  91.         //Rotate the world Sphere primitive.
  92.         world.yaw(1);
  93.         
  94.         //Call the super.onRenderTick function, which renders the scene to the viewport using the renderer and camera classes.
  95.         super.onRenderTick(event);
  96.     }
  97.     
  98. }
noswf
  1. // forked from mash's Hello Papervision3D!
  2. // Hello Papervision3D!
  3. // http://code.google.com/p/papervision3d/downloads/list
  4. // http://papervision3d.googlecode.com/files/Examples_Basics_1_HelloWorld.zip
  5. package {
  6.     import flash.display.MovieClip;
  7.     public class Main extends MovieClip
  8.     {
  9.         protected var helloWorld:HelloWorld;
  10.         public function Main()
  11.         {
  12.             stage.frameRate = 25;
  13.             helloWorld = new HelloWorld();
  14.             addChild(helloWorld);
  15.         }
  16.     }
  17. }
  18. import flash.display.BitmapData;
  19. import flash.events.Event;
  20. import org.papervision3d.materials.BitmapMaterial;
  21. import org.papervision3d.objects.primitives.Sphere;
  22. import org.papervision3d.view.BasicView;
  23. /**
  24.  * @author Ralph Hauwert
  25.  */
  26. class HelloWorld extends BasicView
  27. {
  28.     
  29.     protected var world:Sphere;
  30.     protected var worldBitmapData:BitmapData;
  31.     protected var worldMaterial:BitmapMaterial;
  32.     
  33.     /**
  34.      * HelloWorld
  35.      * 
  36.      * HelloWorld extends BasicView, which is an utility class for Papervision3D, which automatically sets up
  37.      * Scene, Camera, Renderer and Viewport for you.
  38.      * 
  39.      * This allows for easy Papervision3D initialization.
  40.      * 
  41.      * This HelloWorld example utilizes BasicView to set up the the basics, and then extends upon it and setup a basic primitive and material.
  42.      */    
  43.     public function HelloWorld()
  44.     {
  45.         /**
  46.          * Call the BasicView constructor.
  47.          * Width and Height are set to 1, since scaleToStage is set to true, these will be overriden.
  48.          * We will not use interactivity and keep the default cameraType.
  49.          */
  50.         super(11truefalse);
  51.         
  52.         //Color the background of this basicview / helloworld instance black.
  53.         opaqueBackground = 0;
  54.         
  55.         //Create the materials and primitives.
  56.         initScene();
  57.         
  58.         //Call the native startRendering function, to render every frame.
  59.         startRendering();
  60.     }
  61.     
  62.     /**
  63.      * initScene will create the needed primitives, and materials.
  64.      */
  65.     protected function initScene():void
  66.     {
  67.         //Create a new bitmapdata to be used as a texture for our world.
  68.         worldBitmapData = new BitmapData(512,256,false,0);
  69.         //Use perlin noise to colorize the texture....for examples sake.
  70.         worldBitmapData.perlinNoise(512,256,4123456true,false);
  71.         
  72.         //Create a material to be used by the sphere primitive.
  73.         //The Material will utilize the bitmapData we just created as a texture.
  74.         worldMaterial = new BitmapMaterial(worldBitmapData);
  75.     
  76.         //Create the world primitive, using the native Sphere primitive.
  77.         world = new Sphere(worldMaterial,30010,10);
  78.         
  79.         //Add the world to the scene, which is already instanciated by the super BasicView.
  80.         scene.addChild(world);
  81.     }
  82.     
  83.     /**
  84.      * onRenderTick();
  85.      * 
  86.      * onRenderTick can be overriden so you can execute code on a per render basis, using basicview.
  87.      * in this case we use it to
  88.      */
  89.     override protected function onRenderTick(event:Event=null):void
  90.     {
  91.         //Rotate the world Sphere primitive.
  92.         world.yaw(1);
  93.         
  94.         //Call the super.onRenderTick function, which renders the scene to the viewport using the renderer and camera classes.
  95.         super.onRenderTick(event);
  96.     }
  97.     
  98. }
noswf
  1. // forked from mash's Hello Papervision3D!
  2. // Hello Papervision3D!
  3. // http://code.google.com/p/papervision3d/downloads/list
  4. // http://papervision3d.googlecode.com/files/Examples_Basics_1_HelloWorld.zip
  5. package {
  6.     import flash.display.MovieClip;
  7.     public class Main extends MovieClip
  8.     {
  9.         protected var helloWorld:HelloWorld;
  10.         public function Main()
  11.         {
  12.             stage.frameRate = 55;
  13.             helloWorld = new HelloWorld();
  14.             addChild(helloWorld);
  15.         }
  16.     }
  17. }
  18. import flash.display.BitmapData;
  19. import flash.events.Event;
  20. import org.papervision3d.materials.BitmapMaterial;
  21. import org.papervision3d.objects.primitives.Sphere;
  22. import org.papervision3d.view.BasicView;
  23. /**
  24.  * @author Ralph Hauwert
  25.  */
  26. class HelloWorld extends BasicView
  27. {
  28.     
  29.     protected var world:Sphere;
  30.     protected var worldBitmapData:BitmapData;
  31.     protected var worldMaterial:BitmapMaterial;
  32.     
  33.     /**
  34.      * HelloWorld
  35.      * 
  36.      * HelloWorld extends BasicView, which is an utility class for Papervision3D, which automatically sets up
  37.      * Scene, Camera, Renderer and Viewport for you.
  38.      * 
  39.      * This allows for easy Papervision3D initialization.
  40.      * 
  41.      * This HelloWorld example utilizes BasicView to set up the the basics, and then extends upon it and setup a basic primitive and material.
  42.      */    
  43.     public function HelloWorld()
  44.     {
  45.         /**
  46.          * Call the BasicView constructor.
  47.          * Width and Height are set to 1, since scaleToStage is set to true, these will be overriden.
  48.          * We will not use interactivity and keep the default cameraType.
  49.          */
  50.         super(11truefalse);
  51.         
  52.         //Color the background of this basicview / helloworld instance black.
  53.         opaqueBackground = 1;
  54.         
  55.         //Create the materials and primitives.
  56.         initScene();
  57.         
  58.         //Call the native startRendering function, to render every frame.
  59.         startRendering();
  60.     }
  61.     
  62.     /**
  63.      * initScene will create the needed primitives, and materials.
  64.      */
  65.     protected function initScene():void
  66.     {
  67.         //Create a new bitmapdata to be used as a texture for our world.
  68.         worldBitmapData = new BitmapData(512,256,false,0);
  69.         //Use perlin noise to colorize the texture....for examples sake.
  70.         worldBitmapData.perlinNoise(512,256,4123456true,false);
  71.         
  72.         //Create a material to be used by the sphere primitive.
  73.         //The Material will utilize the bitmapData we just created as a texture.
  74.         worldMaterial = new BitmapMaterial(worldBitmapData);
  75.     
  76.         //Create the world primitive, using the native Sphere primitive.
  77.         world = new Sphere(worldMaterial,30010,10);
  78.         
  79.         //Add the world to the scene, which is already instanciated by the super BasicView.
  80.         scene.addChild(world);
  81.     }
  82.     
  83.     /**
  84.      * onRenderTick();
  85.      * 
  86.      * onRenderTick can be overriden so you can execute code on a per render basis, using basicview.
  87.      * in this case we use it to
  88.      */
  89.     override protected function onRenderTick(event:Event=null):void
  90.     {
  91.         //Rotate the world Sphere primitive.
  92.         world.yaw(1);
  93.         
  94.         //Call the super.onRenderTick function, which renders the scene to the viewport using the renderer and camera classes.
  95.         super.onRenderTick(event);
  96.     }
  97.     
  98. }
noswf
  1. // forked from mash's Hello Papervision3D!
  2. // Hello Papervision3D!
  3. // http://code.google.com/p/papervision3d/downloads/list
  4. // http://papervision3d.googlecode.com/files/Examples_Basics_1_HelloWorld.zip
  5. package {
  6.     import flash.display.MovieClip;
  7.     public class Main extends MovieClip
  8.     {
  9.         protected var helloWorld:HelloWorld;
  10.         public function Main()
  11.         {
  12.             stage.frameRate = 25;
  13.             helloWorld = new HelloWorld();
  14.             addChild(helloWorld);
  15.         }
  16.     }
  17. }
  18. import flash.display.BitmapData;
  19. import flash.events.Event;
  20. import org.papervision3d.materials.BitmapMaterial;
  21. import org.papervision3d.objects.primitives.Sphere;
  22. import org.papervision3d.view.BasicView;
  23. /**
  24.  * @author Ralph Hauwert
  25.  */
  26. class HelloWorld extends BasicView
  27. {
  28.     
  29.     protected var world:Sphere;
  30.     protected var worldBitmapData:BitmapData;
  31.     protected var worldMaterial:BitmapMaterial;
  32.     
  33.     /**
  34.      * HelloWorld
  35.      * 
  36.      * HelloWorld extends BasicView, which is an utility class for Papervision3D, which automatically sets up
  37.      * Scene, Camera, Renderer and Viewport for you.
  38.      * 
  39.      * This allows for easy Papervision3D initialization.
  40.      * 
  41.      * This HelloWorld example utilizes BasicView to set up the the basics, and then extends upon it and setup a basic primitive and material.
  42.      */    
  43.     public function HelloWorld()
  44.     {
  45.         /**
  46.          * Call the BasicView constructor.
  47.          * Width and Height are set to 1, since scaleToStage is set to true, these will be overriden.
  48.          * We will not use interactivity and keep the default cameraType.
  49.          */
  50.         super(11truefalse);
  51.         
  52.         //Color the background of this basicview / helloworld instance black.
  53.         opaqueBackground = 0;
  54.         
  55.         //Create the materials and primitives.
  56.         initScene();
  57.         
  58.         //Call the native startRendering function, to render every frame.
  59.         startRendering();
  60.     }
  61.     
  62.     /**
  63.      * initScene will create the needed primitives, and materials.
  64.      */
  65.     protected function initScene():void
  66.     {
  67.         //Create a new bitmapdata to be used as a texture for our world.
  68.         worldBitmapData = new BitmapData(512,256,false,0);
  69.         //Use perlin noise to colorize the texture....for examples sake.
  70.         worldBitmapData.perlinNoise(512,256,4123456true,false);
  71.         
  72.         //Create a material to be used by the sphere primitive.
  73.         //The Material will utilize the bitmapData we just created as a texture.
  74.         worldMaterial = new BitmapMaterial(worldBitmapData);
  75.     
  76.         //Create the world primitive, using the native Sphere primitive.
  77.         world = new Sphere(worldMaterial,30010,10);
  78.         
  79.         //Add the world to the scene, which is already instanciated by the super BasicView.
  80.         scene.addChild(world);
  81.     }
  82.     
  83.     /**
  84.      * onRenderTick();
  85.      * 
  86.      * onRenderTick can be overriden so you can execute code on a per render basis, using basicview.
  87.      * in this case we use it to
  88.      */
  89.     override protected function onRenderTick(event:Event=null):void
  90.     {
  91.         //Rotate the world Sphere primitive.
  92.         world.yaw(1);
  93.         
  94.         //Call the super.onRenderTick function, which renders the scene to the viewport using the renderer and camera classes.
  95.         super.onRenderTick(event);
  96.     }
  97.     
  98. }
noswf
  1. // forked from mash's Hello Papervision3D!
  2. // Hello Papervision3D!
  3. // http://code.google.com/p/papervision3d/downloads/list
  4. // http://papervision3d.googlecode.com/files/Examples_Basics_1_HelloWorld.zip
  5. package {
  6.     import flash.display.MovieClip;
  7.     public class Main extends MovieClip
  8.     {
  9.         protected var helloWorld:HelloWorld;
  10.         public function Main()
  11.         {
  12.             stage.frameRate = 25;
  13.             helloWorld = new HelloWorld();
  14.             addChild(helloWorld);
  15.         }
  16.     }
  17. }
  18. import flash.display.BitmapData;
  19. import flash.events.Event;
  20. import org.papervision3d.materials.BitmapMaterial;
  21. import org.papervision3d.objects.primitives.Sphere;
  22. import org.papervision3d.view.BasicView;
  23. /**
  24.  * @author Ralph Hauwert
  25.  */
  26. class HelloWorld extends BasicView
  27. {
  28.     
  29.     protected var world:Sphere;
  30.     protected var worldBitmapData:BitmapData;
  31.     protected var worldMaterial:BitmapMaterial;
  32.     
  33.     /**
  34.      * HelloWorld
  35.      * 
  36.      * HelloWorld extends BasicView, which is an utility class for Papervision3D, which automatically sets up
  37.      * Scene, Camera, Renderer and Viewport for you.
  38.      * 
  39.      * This allows for easy Papervision3D initialization.
  40.      * 
  41.      * This HelloWorld example utilizes BasicView to set up the the basics, and then extends upon it and setup a basic primitive and material.
  42.      */    
  43.     public function HelloWorld()
  44.     {
  45.         /**
  46.          * Call the BasicView constructor.
  47.          * Width and Height are set to 1, since scaleToStage is set to true, these will be overriden.
  48.          * We will not use interactivity and keep the default cameraType.
  49.          */
  50.         super(11truefalse);
  51.         
  52.         //Color the background of this basicview / helloworld instance black.
  53.         opaqueBackground = 0;
  54.         
  55.         //Create the materials and primitives.
  56.         initScene();
  57.         
  58.         //Call the native startRendering function, to render every frame.
  59.         startRendering();
  60.     }
  61.     
  62.     /**
  63.      * initScene will create the needed primitives, and materials.
  64.      */
  65.     protected function initScene():void
  66.     {
  67.         //Create a new bitmapdata to be used as a texture for our world.
  68.         worldBitmapData = new BitmapData(512,256,false,0);
  69.         //Use perlin noise to colorize the texture....for examples sake.
  70.         worldBitmapData.perlinNoise(512,256,4123456true,false);
  71.         
  72.         //Create a material to be used by the sphere primitive.
  73.         //The Material will utilize the bitmapData we just created as a texture.
  74.         worldMaterial = new BitmapMaterial(worldBitmapData);
  75.     
  76.         //Create the world primitive, using the native Sphere primitive.
  77.         world = new Sphere(worldMaterial,40010,10);
  78.         
  79.         //Add the world to the scene, which is already instanciated by the super BasicView.
  80.         scene.addChild(world);
  81.     }
  82.     
  83.     /**
  84.      * onRenderTick();
  85.      * 
  86.      * onRenderTick can be overriden so you can execute code on a per render basis, using basicview.
  87.      * in this case we use it to
  88.      */
  89.     override protected function onRenderTick(event:Event=null):void
  90.     {
  91.         //Rotate the world Sphere primitive.
  92.         world.yaw(1);
  93.         
  94.         //Call the super.onRenderTick function, which renders the scene to the viewport using the renderer and camera classes.
  95.         super.onRenderTick(event);
  96.     }
  97.     
  98. }
noswf
Get Adobe Flash Player