Papervision3Dの基本
1.ライブラリのインポート
2.BasicViewクラスを継承
♥0 |
Line 13 |
Modified 2010-04-25 08:14:54 |
MIT License
archived:2017-03-20 00:41:15
ActionScript3 source code
/**
* Copyright 084 ( http://wonderfl.net/user/084 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/dQkH
*/
package {
//1.ライブラリのインポート
import org.papervision3d.view.*;
import org.papervision3d.objects.primitives.*;
import org.papervision3d.materials.*
//2.BasicViewクラスを継承
public class Main extends BasicView {
public function Main() {
//3.マテリアルを設定
var material:WireframeMaterial = new WireframeMaterial(0x0000FF);
//4.プリミティブオブジェクトの作成(引数にマテリアルを指定)
var sphere:Sphere = new Sphere(material, 500);
//5.画面に表示
scene.addChild(sphere);
//6.レンダリング
startRendering();
}
}
}