Hi,
I’m attempting to switch an Away3d from the normal mode I have, to a Stage 3d proxy mode for Virtual Reality.
I’m not sure of the best way to do this..
My code for the Stage 3D Proxy is
// Define a new Stage3DManager for the Stage3D objects
stage3DManager = Stage3DManager.getInstance(stage);
// Create a new Stage3D proxy to contain the separate views
stage3DProxy = stage3DManager.getFreeStage3DProxy();
stage3DProxy.addEventListener(Stage3DEvent.CONTEXT3D_CREATED, onContextCreated);
stage3DProxy.addEventListener(Event.ENTER_FRAME, onEnterFrame);
leftEye = new View3D();
leftEye.width = stage.stageWidth/2;
leftEye.height = stage.stageHeight;
leftEye.backgroundColor = 0xFF6600;
leftEye.stage3DProxy = stage3DProxy;
leftEye.shareContext = true;
addChild( leftEye );
rightEye = new View3D();
rightEye.width = stage.stageWidth/2;
rightEye.height = stage.stageHeight;
rightEye.x = stage.stageWidth/2;
rightEye.backgroundColor = 0xFF9900;
rightEye.stage3DProxy = stage3DProxy;
rightEye.shareContext = true;
addChild( rightEye );
leftEye.render();
rightEye.render();