Starling - stage3DProxy.viewPort or stage3DProxy.viewPort.clone()?

Software: Away3D 4.x

Hector, Sr. Member
Posted: 02 February 2016 10:50 AM   Total Posts: 137

Hi all,
This is a question about Away-Starling.
In the interoperation tutorial and some others, they initialize the starling layer using the same instance of stage3DProxy.viewPort:

starlingLayer = new Starling(StarlingMainstagestage3DProxy.viewPortstage3DProxy.stage3D); 

See: http://away3d.com/tutorials/Away3D_and_Starling_Interoperation
And also: https://github.com/away3d/integration-examples-fp11/blob/master/src/Away3D_Starling_Layering_Demo.as

However, in other tutorials that involves resizing, they use a clone of the viewPort:

starlingLayer = new Starling(StarlingMainstagestage3DProxy.viewPort.clone(), stage3DProxy.stage3D); 

See: https://github.com/away3d/integration-examples-fp11/blob/master/src/Dynamic_Layer_Position_And_Size.as

What’s the difference in terms of performance or issues? Is there a recommended method?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X