Away 3D - Constructing a Cube
No commentspackage
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import away3d.containers.*;
import away3d.core.base.*;
import away3d.primitives.*;
import away3d.core.math.*;
public class CubeDemo extends Sprite
{
private var cube:Object3D;
private var view:View3D;
public function CubeDemo()
{
// create a 3D-viewport
// our movie is 700 x 700
view = new View3D({x:350, y:350});
// add viewport to the stage
addChild(view);
// create a cube
cube = new Cube({material:”grey#”, name:”cube”, x: 300, y:160, z: -80, width:400, height:400, depth:400});
// [...]
Away 3D - Constructing A Torus
No commentspackage
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import away3d.containers.*;
import away3d.core.base.*;
import away3d.primitives.*;
import away3d.core.math.*;
public class TorusDemo extends Sprite
{
private var torus:Object3D;
private var view:View3D;
public function TorusDemo()
{
// create a 3D-viewport
// our movie is 700 x 700
view = new View3D({x:350, y:350});
// add viewport to the stage
addChild(view);
// create a plane
torus = new Torus({material:”yellow#”, name:”torus”, x:-250, y:160, z:-250, radius:350, tube:80, segmentsR:8, segmentsT:6});
// add [...]
Away 3D - Constructing A Plane
1 comment so farThe construction of a plane. Roll your mouse over the movie below
Here is the document class used:
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;
import away3d.containers.*;
import away3d.core.base.*;
import away3d.primitives.*;
import away3d.core.math.*;
public class PlaneDemo extends Sprite
{
private var plane:Object3D;
private var view:View3D;
public function PlaneDemo()
{
// create a 3D-viewport
// our movie is 700 x 700
view = new View3D({x:350, y:350});
// add viewport to the [...]
Away 3D - Constructing A Sphere
No commentsSo I decided to play around with Away 3D and after a brief review it seems very cool. Looking through the Lessons that they provide I decided to take the lesson’s code out of the timeline and place them in a class file. Here is the first demo of the sphere.
Here [...]