Hey Guys

ok, i've had a look at this now and discovered the problem - an over-zealous
clipping check that was removing the scene session once its x/y position
moved out of the clipping window. problem is now fixed in the trunk, please
update your code and let me know if it fixes your problems

cheers!

Rob

On Fri, Jun 18, 2010 at 8:32 AM, SparkDSD <[email protected]> wrote:

> i have the same problem with view !
>
> Next code demonstrate this.
>
> (to swf http://away3d-dev.googlegroups.com/web/viewBug.swf);
>
> package {
>
>        import away3d.cameras.Camera3D;
>        import away3d.containers.View3D;
>        import away3d.core.math.Number3D;
>        import away3d.core.render.Renderer;
>        import away3d.primitives.Sphere;
>
>        import flash.display.Graphics;
>        import flash.display.Sprite;
>        import flash.display.StageAlign;
>        import flash.display.StageScaleMode;
>        import flash.events.Event;
>        import flash.events.MouseEvent;
>
>        public class testAway3D extends Sprite {
>                private var view:View3D;
>                private var cam:Camera3D;
>                private var sensor:Sprite=new Sprite();
>
>
>                public function testAway3D() {
>                        super();
>                        super.stage.scaleMode=StageScaleMode.NO_SCALE;
>                        super.stage.align=StageAlign.TOP_LEFT;
>
>                        cam = new Camera3D({focus:500, x:0, y:0, z:0,
> lookat:new
> Number3D(0, 0, -200)});
>                        view = new View3D({camera:cam});
>                        view.renderer = Renderer.BASIC;
>                        super.addChild(view);
>
>                        addEventListener(Event.ENTER_FRAME, onEnterFrame);
>                        addEventListener(Event.ADDED_TO_STAGE,
> creationComplete);
>                        addEventListener(MouseEvent.MOUSE_MOVE, _mm);
>                }
>
>                private function _mm(e:MouseEvent):void {
>                        view.x=super.stage.stageWidth/2+
> (super.stage.stageWidth/2-
> e.stageX)*2;
>                }
>
>                private function creationComplete(e:Event):void {
>                        var sphere:Sphere=new Sphere({radius:10,
> segmentsH:10, segmentsV:
> 10});
>
>                        view.scene.addChild(sphere);
>                        view.x=Math.round(super.stage.stageWidth/2);
>                        view.y=Math.round(super.stage.stageHeight/2);
>
>                        var g:Graphics=sensor.graphics;
>                                g.beginFill(0,0.5);
>
>  g.drawRect(0,0,super.stage.stageWidth,super.stage.stageHeight);
>                                g.endFill();
>
>                        super.addChild(sensor);
>                }
>
>                protected function onEnterFrame(event:Event):void       {
>                                view.render();
>                }
>        }
> }
>



-- 
Rob Bateman
Flash Development & Consultancy

[email protected]
www.infiniteturtles.co.uk
www.away3d.com

Reply via email to