import graphics3d.Graphics3DFramework ; import Graphics3D ; // プログラムの最初に呼び出される関数 void onStart ( int rendererID ) { // 画面サイズや背景色の設定(省略可能) setWindowSize(800, 600) ; setBackgroundColor(0, 0, 0, 255) ; // 標準の光源の明るさを 0 にする setDirectionalLightBrightness( 0.0 ); setAmbientLightBrightness( 0.0 ); // (1.2, 1.5, 1.0)の位置に、輝度0.5の光源を配置 int light = newLight( 1.2, 1.5, 1.0, 0.5 ) ; mountLight( light, rendererID ) ; // 原点に、輝度0.5のアンビエント光源を配置 int ambientLight = newAmbientLight( 0.0, 0.0, 0.0, 0.5 ) ; mountLight( ambientLight, rendererID ) ; // 球モデルを生成して配置 int sphere = newSphereModel( 2.0, 2.0, 2.0, 12, 8 ) ; mountModel( sphere, rendererID ) ; }