Yes that's one of the probleme. When i publish my swf directly from flash cs4 i see this :
http://www.fabriceb.fr/divers/3d_00.html so what ????????? On 20 jan, 10:44, Michael Iv <[email protected]> wrote: > I can see only a huge mesh chunk covering my whole view port now... > > > > > > On Thu, Jan 20, 2011 at 11:41 AM, fabriceb <[email protected]> wrote: > > Thanks for your answer. > > > So i change the code to : > > > import away3d.containers.View3D; > > import away3d.materials.ColorMaterial; > > import away3d.primitives.Cube; > > import away3d.primitives.Sphere; > > import away3d.core.render.Renderer; > > import away3d.lights.*; > > import away3d.materials.ShadingColorMaterial; > > import away3d.materials.WhiteShadingBitmapMaterial; > > import away3d.cameras.Camera3D; > > import away3d.cameras.TargetCamera3D; > > import away3d.materials.PhongBitmapMaterial; > > import away3d.events.MouseEvent3D; > > import away3d.containers.ObjectContainer3D; > > import away3d.primitives.Trident; > > import away3d.containers.Scene3D; > > > stop(); > > stage.scaleMode = StageScaleMode.NO_SCALE;// > > change************************************************ > > > //3d variables : > > //viewport > > var view:View3D; > > //objets > > var cube_00:Cube; > > var cube_01:Sphere; > > var cube_02:Cube; > > var cube_03:Cube; > > var group:ObjectContainer3D; > > //camera > > var cam:Camera3D; > > > //materiaux > > var essai3dTexture:Essai3d=new Essai3d(0,0); > > var colorMaterial_00:ShadingColorMaterial=new > > ShadingColorMaterial(0xB52A22); > > var colorMaterial_01:WhiteShadingBitmapMaterial=new > > WhiteShadingBitmapMaterial(essai3dTexture);//,{specular:0.2,shininess: > > 10} > > var colorMaterial_02:PhongBitmapMaterial=new > > PhongBitmapMaterial(essai3dTexture); > > > // create a viewport > > view=new View3D({x:550/2,y: > > 400/2});//,renderer:Renderer.INTERSECTING_OBJECTS > > addChild(view); > > > //create a trident > > view.scene.addChild(new Trident(300, true)); > > > // create a basic camera > > cam=new Camera3D({x:200,y:300,z:-300,zoom:50});// > > change***************************************************************** > > cam.lookAt(new Vector3D(0,0,0)); > > view.camera=cam; > > > // create a new Ambient light source with specific ambient parameters > > var lightAmbientLight3D:AmbientLight3D=new AmbientLight3D({ambient: > > 1,color:0xfff23f}); > > view.scene.addLight(lightAmbientLight3D); > > > // Create a group and add to scene > > group = new ObjectContainer3D(); > > view.scene.addChild(group); > > > // create a cube and put it on stage (view.scene) or on group (group) > > cube_00=new Cube({x:-400,y:0,z:0,width:100,height:100,depth: > > 100,material:colorMaterial_02});//,material:colorMaterial_00 > > cube_01=new Sphere({x:0,y:0,z:0,radius:100,segmentsW:20,segmentsH: > > 20,material:colorMaterial_02}); > > cube_02=new Cube({x:400,y:0,z:0,width:100,height:100,depth: > > 100,material:colorMaterial_02}); > > cube_03=new Cube({x:0,y:0,z:0,width:800,height:10,depth: > > 10,material:colorMaterial_02}); > > group.addChild(cube_03); > > group.addChild(cube_00); > > group.addChild(cube_01); > > group.addChild(cube_02); > > > // Initialise frame-enter loop > > addEventListener(Event.ENTER_FRAME, loop); > > function loop(event:Event):void { > > // Render the 3D scene > > view.render(); > > } > > > And problems are the same.(see it onligne here : > >http://www.fabriceb.fr/divers/essai3d.html) > > > On 20 jan, 10:14, Michael Iv <[email protected]> wrote: > > > Because I can see you rotate the cubes ... Where do you rotate the > > camera? > > > Try to comment out > > > > cube_00.yaw(-4); > > > cube_01.yaw(-4); > > > cube_02.yaw(-4); > > > > And check what you get.Also my advice , don't tweak focus property if you > > > don't have a special need. You can get all kinds of perspective > > > distortions.Work with zoom or position values of you cam. > > > > On Thu, Jan 20, 2011 at 11:08 AM, Michael Iv <[email protected]> > > wrote: > > > > Now we have two Fabrice... > > > > > Are you sure you move the camera and not the Objects? > > > > also try to make stage.scaleMode to NOSCALE .I suppose the movie gets > > > > scaled in the browser that is why you see nothing. :) > > > > > On Thu, Jan 20, 2011 at 11:01 AM, fabriceb <[email protected] > > >wrote: > > > > >> Hello to all, > > > > >> Sorry for my english (i'm a frenchman), i'm not very good but i try... > > > > >> I began investigating Away3D (3.6) with flash cs4 on Mac Os 10.5. > > > > >> 1) I created a scene where there are 3 objects connected by a tube. If > > > >> I place the cam above : no problem > > > > >> 2) If I deplace the cam, the pers is false and object do not contact > > > >> any more > > > > >> 3) And when i put the swf on web, it's not like the swf on my machine > > > >> (safari and Shockwave Flash 10.1 r102 ). > > > > >> You can see the image of this 3 things here : > > > > >>http://www.fabriceb.fr/divers/3dVisu.html > > > > >> And the code : > > > > >> import away3d.containers.View3D; > > > >> import away3d.materials.ColorMaterial; > > > >> import away3d.primitives.Cube; > > > >> import away3d.primitives.Sphere; > > > >> import away3d.core.render.Renderer; > > > >> import away3d.lights.*; > > > >> import away3d.materials.ShadingColorMaterial; > > > >> import away3d.materials.WhiteShadingBitmapMaterial; > > > >> import away3d.cameras.Camera3D; > > > >> import away3d.cameras.TargetCamera3D; > > > >> import away3d.materials.PhongBitmapMaterial; > > > >> import away3d.events.MouseEvent3D; > > > >> import away3d.containers.ObjectContainer3D; > > > >> import away3d.primitives.Trident; > > > >> import away3d.containers.Scene3D; > > > >> import away3d.core.base.Object3D; > > > > >> stop(); > > > > >> //3d variables : > > > >> //viewport > > > >> var view:View3D; > > > >> //objets > > > >> var cube_00:Cube; > > > >> var cube_01:Sphere; > > > >> var cube_02:Cube; > > > >> var cube_03:Cube; > > > >> var group:ObjectContainer3D; > > > >> //camera > > > >> var cam:Camera3D; > > > > >> //materiaux > > > >> var essai3dTexture:Essai3d=new Essai3d(0,0); > > > >> var colorMaterial_00:ShadingColorMaterial=new > > > >> ShadingColorMaterial(0xB52A22); > > > >> var colorMaterial_02:PhongBitmapMaterial=new > > > >> PhongBitmapMaterial(essai3dTexture); > > > > >> // create a viewport > > > >> view=new View3D({x:550/2,y: > > > >> 400/2});//,renderer:Renderer.INTERSECTING_OBJECTS > > > >> addChild(view); > > > > >> //create a trident > > > >> view.scene.addChild(new Trident(300, true)); > > > > >> // create a basic camera > > > >> cam=new Camera3D({x:1,y:300,z:0,zoom:50,focus:50}); > > > >> cam.lookAt(new Vector3D(0,0,0)); > > > >> view.camera=cam; > > > > >> // create a new Ambient light source with specific ambient parameters > > > >> var lightAmbientLight3D:AmbientLight3D=new AmbientLight3D({ambient: > > > >> 1,color:0xfff23f}); > > > >> view.scene.addLight(lightAmbientLight3D); > > > > >> // Create a group and add to scene > > > >> group = new ObjectContainer3D(); > > > >> view.scene.addChild(group); > > > > >> // create a cube and put it on stage (view.scene) or on group (group) > > > >> cube_00=new Cube({x:-400,y:0,z:0,width:100,height:100,depth: > > > >> 100,material:colorMaterial_02});//,material:colorMaterial_00 > > > >> cube_01=new Sphere({x:0,y:0,z:0,radius:100,segmentsW:20,segmentsH: > > > >> 20,material:colorMaterial_02}); > > > >> cube_02=new Cube({x:400,y:0,z:0,width:100,height:100,depth: > > > >> 100,material:colorMaterial_02}); > > > >> cube_03=new Cube({x:0,y:0,z:0,width:800,height:10,depth: > > > >> 10,material:colorMaterial_02}); > > > >> group.addChild(cube_03); > > > >> group.addChild(cube_00); > > > >> group.addChild(cube_01); > > > >> group.addChild(cube_02); > > > > >> // Initialise frame-enter loop > > > >> addEventListener(Event.ENTER_FRAME, loop); > > > >> function loop(event:Event):void { > > > >> //group.yaw(2) > > > > >> // rotate the objects > > > >> cube_00.yaw(-4); > > > >> cube_01.yaw(-4); > > > >> cube_02.yaw(-4); > > > > >> // Render the 3D scene > > > >> view.render(); > > > >> } > > > > >> Can you tell me where is the problem ? > > > > >> Thanks > > > > > -- > > > > Michael Ivanov ,Programmer > > > > Neurotech Solutions Ltd. > > > > Flex|Air |3D|Unity| > > > >www.neurotechresearch.com > > > >http://blog.alladvanced.net > > > > Tel:054-4962254 > > > > [email protected] > > > > [email protected] > > > > -- > > > Michael Ivanov ,Programmer > > > Neurotech Solutions Ltd. > > > Flex|Air |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.net > > > Tel:054-4962254 > > > [email protected] > > > [email protected] > > -- > Michael Ivanov ,Programmer > Neurotech Solutions Ltd. > Flex|Air |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.net > Tel:054-4962254 > [email protected] > [email protected]
