I have a Starling instance and an Away3d instance operating together through a Stage3DProxy. Everything is positioned fine during the initial window setup. I’m having a tough time getting the Stage3D stuff to resize correctly when the user resizes the app window. The Away3D instance becomes all distorted - if the user makes the window bigger, the Away3D stuff is squeezed horizontally. If they make it smaller, it is stretched horizontally.
Can anyone explain what properties I need to target in my resize handler to get this stuff to scale correctly? I get the weird distortion any time I try to set these properties:
//With this code in the resize handler, the away3d instance becomes badly distorted (stretched/squeezed horizontally) when resized
stage3DProxy.width = stage.stageWidth;
stage3DProxy.height = stage.stageHeight;
When I only set the following properties, I get correct scaling, but the viewPort clips to the original window size:
_view.width = stage.stageWidth; //set the View3D width
_view.height = stage.stageHeight; //set the View3D height
_background.root.width = stage.stageWidth; //set the Starling instance width
_background.root.height = stage.stageHeight; //set the Starling instance height
Any help would be hugely appreciated. Thanks!