clockmaker.jpさんを参考にしています。
コメントアウトしているマテリアルに変更すれば
ワイヤーフレーム表示などもできます。ぐーるぐる♪
import org.papervision3d.objects.primitives.* import org.papervision3d.materials.* //シェーダ import org.papervision3d.materials.shadematerials.* import org.papervision3d.lights.* //ライト var light:PointLight3D = new PointLight3D() //マテリアル //var material:WireframeMaterial = new WireframeMaterial(0xFF0000) //var material:FlatShadeMaterial=new FlatShadeMaterial(light, 0x3399FF) var material:BitmapAssetMaterial = new BitmapAssetMaterial('EarthMap') //モデルにマテリアルを設定 var sphere:Sphere = new Sphere(material, 400, 30, 30) //描画登録 world.scene.addChild(sphere); addEventListener(Event.ENTER_FRAME, loop) world.startRendering() //メイン関数 function loop(e){ sphere.rotationY += 2 }
'EarthMap'は、ライブラリにテクスチャ画像を追加後、
画面にドロップしてシンボル化したものの名前です。