flash on 2010-11-18

by s.maeda0094
♥0 | Line 23 | Modified 2010-11-18 14:23:42 | MIT License
play

ActionScript3 source code

/**
 * Copyright s.maeda0094 ( http://wonderfl.net/user/s.maeda0094 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/5Cia
 */

package {
    import org.papervision3d.objects.primitives.*;
    import org.papervision3d.view.*;
    public class PV3D_basic02_1CameraA extends BasicView {
        public function PV3D_basic02_1CameraA() {
            //オブジェクト配置
            var obj1:Sphere = new Sphere();
            obj1.x = 100;
            obj1.z = 800;
            scene.addChild(obj1);
            
            var obj2:Sphere = new Sphere();
            obj2.x = 0;
            obj2.z = 0;
            scene.addChild(obj2);
            
            var earth:Plane = new Plane(null, 3000, 3000, 20, 20);
            earth.rotationX = 90;
            scene.addChild(earth);
            
            //カメラ座標
            camera.x = 1000;
            camera.y = 500;
            camera.z = -500;
            
            startRendering();
            
        }
    }
}