Hello,
I'm managing Starling and Away3D via a stage3DProxy, everything works fine, but I can't seem to get the two layers to resize correctly.
I want Starling to show all elements and Away3D to fill the screen. But I seem to be doing something wrong... the Starling layer texture get's stretched to fill the stage3DProxy while the touch events trigger correctly ..like they should when the view port is resized with ScaleMode.SHOW_ALL.
Here's what I'm doing:
/// resize event listener
var screenSize:Rectangle = new Rectangle(0, 0, stage.fullScreenWidth, stage.fullScreenHeight);
var showAllRect:Rectangle = RectangleUtil.fit(new Rectangle(0, 0, 800, 480), screenSize, ScaleMode.SHOW_ALL);
var noborderRect:Rectangle = RectangleUtil.fit(new Rectangle(0, 0, 800, 480), screenSize, ScaleMode.NO_BORDER);
if (stage3DProxy){ // my stage3d proxy
stage3DProxy.width = noborderRect.width;
stage3DProxy.height = noborderRect.height;
stage3DProxy.x = noborderRect.x;
stage3DProxy.y = noborderRect.y;
}
if (view) { //my Away3d view
view.width = noborderRect.width;
view.height = noborderRect.height;
view.x=noborderRect.x;
view.y=noborderRect.y;
}
if (starlingLayer)//my Starling instance
{
starlingLayer.viewPort = showAllRect;
}
What am I doing wrong?
Thanks.