In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

[PV3D] サンプル1 (3Dの初期表示)

Get Adobe Flash player
by clockmaker 30 Nov 2009
/**
 * Copyright clockmaker ( http://wonderfl.net/user/clockmaker )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/i28s
 */

package {
    import org.papervision3d.materials.*;
    import org.papervision3d.objects.primitives.*;
    import org.papervision3d.view.*;
    
    public class Sample1 extends BasicView {
        public function Sample1():void {
            // マテリアルを作成
            var material:WireframeMaterial = new WireframeMaterial(0xFF0000);
            
            // 3Dオブジェクトを作成
            var sphere:Sphere = new Sphere(material, 300, 10, 10);
            
            // 3Dシーンに追加して、表示させる
            scene.addChild(sphere);
            
            // レンダリングを開始
            startRendering();
        }
    }
}