if you get no errors:

try set extrude.x = extrude.z = 0
extrude.y = extrude.minZ; // --> to align base mesh to 0 y, since its rotated, use the minZ of the mesh to offset.

then ask camera to look at it
view.camera.lokAt(extrude.position);

set bothsides:true; just to be sure you would not miss it if faces are flipped.

then when you see it, set flip to true or false, depending on Away's version you use.
2.2 if I recall, do not need the flip to be set and is by default false.

Fabrice
On Nov 21, 2008, at 12:36 PM, kirjuta wrote:


Hi I have this simple 1 file Flex AS project -


package {
        import away3d.containers.View3D;
        import away3d.extrusions.Elevation;
        import away3d.extrusions.SkinExtrude;
        import away3d.materials.IMaterial
        import away3d.materials.BitmapMaterial
        import away3d.primitives.Sphere;

        import flash.utils.getDefinitionByName
        import flash.display.Sprite;
        import flash.display.BitmapData

        public class Away3dTest extends Sprite
        {

                [Embed(source='assets/KL-8-043_eesti_reljeef.png')]
                private static var Reljeef: Class;

                [Embed(source='assets/KL-8-043_eesti_reljeef_rbump.png')]
                private static var ReljeefBump: Class;


                public function Away3dTest()
                {
                        var view:View3D = new View3D({x:200,y:200});
           addChild(view);

                        var source_elevation:BitmapData = new 
ReljeefBump().bitmapData

                        var mat:IMaterial = new BitmapMaterial(new 
Reljeef().bitmapData ,
{smooth:true});

                        var elevate:Elevation = new Elevation();

                        var points:Array = elevate.generate(source_elevation, 
"r", 5, 5,
50, 50, 4)
                        var extrude:SkinExtrude = new SkinExtrude(points, 
{material:mat,
recenter:true, closepath:false, coverall:true, subdivision:1,
bothsides:true, flip:true});
                        extrude.rotationX = 90;

                        view.scene.addChild(extrude);

           view.render();
                }
        }
}


but the SkinExtrude doesnt show up. If I try with sphere it shows?

What am I doing wrong here?

Reply via email to