papervision3d#1
できるかなー。とか考えずにとりあえず触ってみることに。
とりあえずコチラから”Papervision3D_2.0.883.zip”をダウンロード。
ってもう次なにしていいかわからない。
なのですごくわかりやすい”ClockMakerBlog“さんを参考にしてみる。
まずはライブラリをimport。
———————————————
import org.papervision3d.objects.primitives.*
———————————————
つぎにSphereオブジェクトを作成。
Sphereとは球体オブジェクトの事。
———————————————
var sphere = new Sphere()
———————————————
それを表示リストに追加。
———————————————
world.scene.addChild(sphere)
———————————————
で”startRendering”でレンダリング。
———————————————
world.startRendering();
———————————————
あとはそれを”ENTER_FRAME”で動かす。
———————————————
import org.papervision3d.objects.primitives.*;
var sphere = new Sphere();
sphere.scale = 4;
world.scene.addChild(sphere);
world.startRendering();
addEventListener(Event.ENTER_FRAME, xEnterFrame);
function xEnterFrame(evt:Event):void {
sphere.rotationY += 2;
sphere.rotationX += 2;
}
———————————————
とりあえず今日はここまで。
