Fixed lights

This commit is contained in:
Ziver Koc 2009-03-11 14:55:21 +00:00
parent 14f395d273
commit 0935259b6c
2 changed files with 26 additions and 19 deletions

View file

@ -3,10 +3,7 @@ package sg.env;
import sg.util.SGUtil;
import com.jme.image.Texture;
import com.jme.light.DirectionalLight;
import com.jme.light.LightNode;
import com.jme.math.Vector3f;
import com.jme.renderer.ColorRGBA;
import com.jme.scene.Node;
import com.jme.scene.Skybox;
import com.jme.scene.state.TextureState;
@ -22,7 +19,7 @@ public class Environment extends Node {
* */
private Node localNode;
public Environment(Node rootNode){
public Environment(Node parentNode){
buildLocalNode();
}
@ -44,15 +41,8 @@ public class Environment extends Node {
space.updateRenderState();
localNode.attachChild(space);
// Lights
DirectionalLight dr = new DirectionalLight();
dr.setEnabled(true);
dr.setDiffuse(ColorRGBA.white);
dr.setAmbient(ColorRGBA.gray);
dr.setDirection(new Vector3f(0.0f, 0.0f, 0.0f));
// Lights
LightNode lightNode = new LightNode("space_light_node");
lightNode.setLight(dr);
// Setup the lens flare textures.
TextureState[] tex = new TextureState[4];