away3d/away3d-core-fp11 — Issue #199: set width and height of View3D
Author: yesbaba
Created: 2011-12-21 09:13:44+00:00
State: open

backgroundImageRenderer's height is not set in height setter,

override public function set width(value : Number) : void
{
if (_width == value)
return;

_hitField.width = value;
_width = value;
_aspectRatio = _width/_height;
_depthTextureInvalid = true;

if (_filter3DRenderer)
_filter3DRenderer.viewWidth = value;

if (_renderer.backgroundImageRenderer != null) {
_renderer.backgroundImageRenderer.viewWidth = _width;
_renderer.backgroundImageRenderer.viewHeight = _height;
}

invalidateBackBuffer();
}

override public function set height(value : Number) : void
{
if (_height == value)
return;

_hitField.height = value;
_height = value;
_aspectRatio = _width/_height;
_depthTextureInvalid = true;

if (_filter3DRenderer)
_filter3DRenderer.viewHeight = value;

invalidateBackBuffer();
}