Hi Everyone, I have just ported an existing away3d project to broomstick, the speed for me are at least 10 x quicker so great job. I have tested it on its own in Flash Builder and renders as expected. I have to now moved that into a separate class and when compiled there seems to be no viewport visible but all the traces and loaded objected are working fine.
The _view.backgroundColor is not visible either? I thought it may be a view size issue but it traced at the size of the stage. Has anyone had this issue before or am i over looking something basic? The stats added to stage shows fine, which makes me think it must be a viewport / scene thing.
I import mainView2 which uses away3d.
mainView2 basic set up looks like
private function setupAway3D4():void{
// Setup scene
_scene = new Scene3D();
// Setup camera
_camera = new Camera3D();
_camera.lens.far = cameraViewDistance;
_view = new View3D();
_view.backgroundColor = 0x666666;
_view.antiAlias = 4;
_view.scene = _scene;
_view.camera = _camera;
_view.mouseEnabled = true;
_view.mouseChildren = true;
trace("VIEW", _view.x, _view.y, _view.width, _view.height, _view.visible, _view.alpha);
container = new ObjectContainer3D();
_scene.addChild(container);
_camera.lookAt(container.position);
var tr:Trident = new Trident(500,true);
_scene.addChild(tr);
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
// Setup a HoverController (aka HoverCamera3D in older versions of Away3D)
cameraController = new HoverController(_camera, null, 150, 10, 2000);
addChild(_view);
// Show Away3D stats
stats = new AwayStats(_view,true);
stats.x = 5;
stats.y = 5;
this.addChild(stats);
Parsers.enableAllBundled();
assetLoaderContext = new AssetLoaderContext();
_loader = new Loader3D();
_loader.addEventListener(AssetEvent.ASSET_COMPLETE, onResourceComplete);
_loader.load( new URLRequest('daeModel/myModel.obj'),assetLoaderContext);
}
i then clone the loaded obj file and add it to a container.
Its not stacking issue as view is on top. It only happens when I put it into an external class.
Any help appreciated.
w