forked from: Away3Dのサンプルを試してみた
【参考サイト】
Away3D Basics 4 - Manipulating 3D objects > Tutorials > Flash Magazine
http://www.flashmagazine.com/Tutorials/detail/away3d_basics_4_-_manipulating_3d_objects/
♥0 |
Line 17 |
Modified 2011-10-06 16:20:00 |
MIT License
archived:2017-03-20 09:48:43
ActionScript3 source code
/**
* Copyright alex_evane ( http://wonderfl.net/user/alex_evane )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/u2DD
*/
// forked from nakamura001's Away3Dのサンプルを試してみた
// 【参考サイト】
// Away3D Basics 4 - Manipulating 3D objects > Tutorials > Flash Magazine
// http://www.flashmagazine.com/Tutorials/detail/away3d_basics_4_-_manipulating_3d_objects/
package {
import away3d.containers.View3D;
import away3d.primitives.Cube;
import flash.display.Sprite;
[SWF(width="500", height="400", frameRate="60", backgroundColor="#FFFFFF")]
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
// create a viewport
var view:View3D = new View3D({x:250,y:200});
addChild(view);
// create a sphere and put it on the 3D stage
var cube:Cube = new Cube();
cube.rotationX += 30;
cube.rotationY += 45;
view.scene.addChild(cube);
// render the view
view.render();
}
}
}