In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

forked from: pixas.math.Coord3D()

Get Adobe Flash player
by 0954321982 07 Jun 2013
/**
 * Copyright 0954321982 ( http://wonderfl.net/user/0954321982 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/69O8
 */

// forked from bradsedito's pixas.math.Coord3D()





package
{
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    import flash.ui.*;
    import com.risonhuang.pixas.math.Coord3D;
    import com.risonhuang.pixas.math.ColorPattern;
    import com.risonhuang.pixas.colors.CubeColor;
    import com.risonhuang.pixas.dimensions.CubeDms;
    import com.risonhuang.pixas.objects.primitives.Cube;
    import com.risonhuang.pixas.objects.PixelObject;
    
    public class PixasTest3D extends Sprite
    {
        private var po_out:PixelObject = new PixelObject();
        
        
        public function PixasTest3D()
        {
            stage.frameRate = 90;
            //ENTRY POINT: 

            po_out.x = 240;
            po_out.y = 180;
            addChild(po_out);
            
            for (var i:uint = 0; i <= 4; i++ )
            {                
                for (var j:uint= 0; j <= 4; j++ )
                {
                    for (var k:uint = 0; k <= 4; k++ )
                    {
                        var c3d:Coord3D = new Coord3D( 
                            ( 35*i ),    // propX 
                            ( 35*j ),    // propY 
                            ( 35   )*k); // propZ                        
                        var cubeDms:CubeDms = new CubeDms( 30,30,32 );  //  32 );
                        var cubeColor:CubeColor = CubeColor.getByHorizontalColor( 0xffffff );      // var cubeColor:CubeColor = CubeColor.getByHorizontalColor( ColorPattern.getRandomComfortableColor() );
                        var cube:Cube = new Cube( cubeDms,cubeColor,false );        
                        var po_tmp:PixelObject = new PixelObject( cube,c3d );
                        po_out.addChild( po_tmp );
                    }
                }                
            }    
        }


    }
}