Scaling issue only when scaling browser vertically.

Software: Away3D 4.x

sentoplene, Newbie
Posted: 14 August 2013 03:48 PM   Total Posts: 25

Hi,

I am rescaling my away world, and when I scale my browser horizontally everything updates as expected, but when I scale the browser vertically, my 3D content scales.

Browser becomes smaller and the 3D content scales down, and the other way around when the browser becomes bigger in vertical direction.

My code is simple when resizing:

_world.view.width stage.stageWidth;
_world.view.height stage.stageHeight

I also have 2 Starling layers, and the resizing happens in the following code:

_stage3DProxy.width stage.stageWidth;
_stage3DProxy.height stage.stageHeight;
    
var 
viewPort:Rectangle RectangleUtil.fit( new Rectangle(00stage.stageWidthstage.stageHeight), 
                  new 
Rectangle(00stage.stageWidthstage.stageHeight), 
                  
ScaleMode.SHOW_ALL);
//layout the starling layer:
_starlingBack.viewPort viewPort;
_starlingBack.stage.stageWidth stage.stageWidth;
_starlingBack.stage.stageHeight stage.stageHeight;
    
_starlingWall.viewPort viewPort;
_starlingWall.stage.stageWidth stage.stageWidth;
_starlingWall.stage.stageHeight stage.stageHeight

But the Starling resizing doesn’t affect the Away3D resizing right?

Anyone knows why the vertical scaling of the browser affects the scale of the 3D content?

Ps. I am using 4.1.4 GOLD (and have tried it with 4.1.1 BETA as well)

   

Avatar
SharpEdge, Member
Posted: 29 August 2013 11:26 AM   Total Posts: 94   [ # 1 ]

have you setted:

stage.alignMode = StageAlignMode.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;

   

Avatar
theMightyAtom, Sr. Member
Posted: 29 August 2013 11:48 AM   Total Posts: 669   [ # 2 ]

Can you upload your example?

If you are changing the aspect ratio of the window, the content will have to change “size” to fit. For example to maintain the horizontal field of view when you stretch in the y axis, then the content would *appear* smaller compared to the overall window. In actual fact everything is the same size, all measured as proportions of the window. If you think it’s something else you are experiencing, please upload an example smile

Good Luck!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X