creating a skybox with alternativa 7

David Jones
@david3jones
avatar-davidejones

With the release of alternativa 7 there is a nice and easy way to setup a skybox around your model using the SkyBox class. So in order to set this up you are going to need 6 images left, right, back, front, bottom, top these are simply going to be images that are used on the inside walls of a cube. I actually used some free skybox images i found over at turbosquid http://www.turbosquid.com/FullPreview/Index.cfm/ID/348109 Once you have all the images all you really need to do is create the class assign the size and textures and then add it to the container.

//create our skybox
var left:TextureMaterial = new TextureMaterial(new skyleft(0,0));
var right:TextureMaterial = new TextureMaterial(new skyright(0,0));
var back:TextureMaterial = new TextureMaterial(new skyback(0,0));
var front:TextureMaterial = new TextureMaterial(new skyfront(0,0));
var bottom:TextureMaterial = new TextureMaterial(new skybtm(0,0));
var top:TextureMaterial = new TextureMaterial(new skytop(0,0));
sbox = new SkyBox(3000,left,right,back,front,bottom,top,0);
container.addChild(sbox);

Comments

    Comments are currently closed