URL eastURL = AssetUtils.getAssetURL("wla://defaultenvironment/skybox1/2.jpg", cell);
URL westURL = AssetUtils.getAssetURL("wla://defaultenvironment/skybox1/4.jpg", cell);
URL downURL = AssetUtils.getAssetURL("wla://defaultenvironment/skybox1/5.jpg", cell);
URL upURL = AssetUtils.getAssetURL("wla://defaultenvironment/skybox1/6.jpg", cell);
WorldManager wm = ClientContextJME.getWorldManager();
skybox = new Skybox("skybox", 1000, 1000, 1000);
Texture north = TextureManager.loadTexture(northURL, Texture.MinificationFilter.BilinearNearestMipMap, Texture.MagnificationFilter.Bilinear);
Texture south = TextureManager.loadTexture(southURL, Texture.MinificationFilter.BilinearNearestMipMap, Texture.MagnificationFilter.Bilinear);
Texture east = TextureManager.loadTexture(eastURL, Texture.MinificationFilter.BilinearNearestMipMap, Texture.MagnificationFilter.Bilinear);
Texture west = TextureManager.loadTexture(westURL, Texture.MinificationFilter.BilinearNearestMipMap, Texture.MagnificationFilter.Bilinear);
Texture up = TextureManager.loadTexture(upURL, Texture.MinificationFilter.BilinearNearestMipMap, Texture.MagnificationFilter.Bilinear);
Texture down = TextureManager.loadTexture(downURL, Texture.MinificationFilter.BilinearNearestMipMap, Texture.MagnificationFilter.Bilinear);
skybox.setTexture(Skybox.Face.North, north);
skybox.setTexture(Skybox.Face.West, west);
skybox.setTexture(Skybox.Face.South, south);
skybox.setTexture(Skybox.Face.East, east);
skybox.setTexture(Skybox.Face.Up, up);
skybox.setTexture(Skybox.Face.Down, down);
//skybox.preloadTextures();
CullState cullState = (CullState) wm.getRenderManager().createRendererState(RenderState.RS_CULL);
cullState.setEnabled(true);
skybox.setRenderState(cullState);
ZBufferState zState = (ZBufferState) wm.getRenderManager().createRendererState(RenderState.RS_ZBUFFER);
//zState.setEnabled(false);
skybox.setRenderState(zState);
FogState fs = (FogState) wm.getRenderManager().createRendererState(RenderState.RS_FOG);
fs.setEnabled(false);
skybox.setRenderState(fs);
skybox.setLightCombineMode(Spatial.LightCombineMode.Off);
skybox.setCullHint(Spatial.CullHint.Never);
skybox.setTextureCombineMode(TextureCombineMode.Replace);
skybox.updateRenderState();
skybox.lockBounds();
//skybox.lockMeshes();
Entity e = new Entity("Skybox");
// e.addComponent(ProcessorComponent.class, new TextureAnimationProcessor(up));
SkyboxComponent sbc = wm.getRenderManager().createSkyboxComponent(skybox, true);
e.addComponent(SkyboxComponent.class, sbc);
skyboxProcessor = new SkyboxProcessor(wm, skybox);
e.addComponent(SkyboxProcessor.class, skyboxProcessor);