Package com.jme3.math

Examples of com.jme3.math.ColorRGBA


            }
        }

        DirectionalLight dl = new DirectionalLight();
        dl.setDirection(new Vector3f(-0.8f, -0.6f, -0.08f).normalizeLocal());
        dl.setColor(new ColorRGBA(1, 1, 1, 1));
        rootNode.addLight(dl);


        AmbientLight al = new AmbientLight();
        al.setColor(new ColorRGBA(2f, 1.5f, 1.5f, 1f));
        rootNode.addLight(al);

        flyCam.setMoveSpeed(100);
        viewPort.setBackgroundColor(ColorRGBA.Gray);
View Full Code Here


  }
 
  private ParticleEmitter getEmitter(String name) {
    ParticleEmitter flame = new ParticleEmitter(name, Type.Triangle, 32);
        flame.setSelectRandomImage(false);
        flame.setStartColor(new ColorRGBA(1f, 0.4f, 0.05f, 1f));
        flame.setEndColor(new ColorRGBA(.4f, .22f, .12f, 0f));
        flame.setStartSize(size);
        flame.setEndSize(size);
        //flame.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
        flame.setShape(new EmitterPointShape(Vector3f.ZERO));
        flame.setParticlesPerSec(20);
View Full Code Here

//        light.setDirection((new Vector3f(-0.f, -1f, -0.5f)).normalize());
//        light.setColor(new ColorRGBA(0.6f,0.6f,0.6f,1f));
//        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.3f, 0.3f, 0.3f, 1f));
        rootNode.addLight(ambLight);
     
//        grass_mat = assetManager.loadMaterial("/vegetation/grass/grass/grass.j3m");
     
      rootNode.attachChild(scene);
View Full Code Here

        matWireframe.setColor("Color", ColorRGBA.Green);
        matWireframe.getAdditionalRenderState().setWireframe(true);

        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        light.setColor(new ColorRGBA(0.8f,0.8f,0.8f,1f));
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.1f, 0.1f, 0.1f, 1f));
        rootNode.addLight(ambLight);
     
     
        inputManager.addListener(this, "print_scenegraph", "print_cam_location", "print_bboxes", "toggle_navmesh", "toggle_navbodermesh", "nextMesh");
        inputManager.addMapping("print_scenegraph", new KeyTrigger(KeyInput.KEY_F6));
View Full Code Here

        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(1f, 1f, 0.8f, 0.2f));
        rootNode.addLight(ambLight);

        cam.setLocation(new Vector3f(0, 10, -10));
        cam.lookAtDirection(new Vector3f(0, -1.5f, -1).normalizeLocal(), Vector3f.UNIT_Y);
        cam.setFrustumFar(10000f);
View Full Code Here

        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.2f, 0.2f, 0.2f, 1f));
        rootNode.addLight(ambLight);
     

     
      rootNode.attachChild(scene);
View Full Code Here

        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.2f, 0.2f, 0.2f, 1f));
        rootNode.addLight(ambLight);
     

        Asset a = new Asset("/tile/121_177/121_177.jnv", "/tile/121_177/121_177.jnv");
        sin.getAssetManager().loadAsset(a, true);
View Full Code Here

        lightMdl.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m"));
        rootNode.attachChild(lightMdl);

        // flourescent main light
        pl = new PointLight();
        pl.setColor(new ColorRGBA(0.88f, 0.92f, 0.95f, 1.0f));
        rootNode.addLight(pl);

        // sunset light
        DirectionalLight dl = new DirectionalLight();
        dl.setDirection(new Vector3f(-0.1f,-0.7f,1).normalizeLocal());
        dl.setColor(new ColorRGBA(0.44f, 0.30f, 0.20f, 1.0f));
        rootNode.addLight(dl);

        // skylight
        dl = new DirectionalLight();
        dl.setDirection(new Vector3f(-0.6f,-1,-0.6f).normalizeLocal());
        dl.setColor(new ColorRGBA(0.10f, 0.22f, 0.44f, 1.0f));
        rootNode.addLight(dl);

        // white ambient light
        dl = new DirectionalLight();
        dl.setDirection(new Vector3f(1, -0.5f,-0.1f).normalizeLocal());
        dl.setColor(new ColorRGBA(0.50f, 0.40f, 0.50f, 1.0f));
        rootNode.addLight(dl);
       
        rootNode.attachChild(GrassLayerUtil.createPatchField(bumpy, assetManager, "/vegetation/grass/grass/g3.tga",
            1.2f, 1.5f, 1f, 0.1f, 0f,0f,0.0f,0,1));
    }
View Full Code Here

        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.2f, 0.2f, 0.2f, 1f));
        rootNode.addLight(ambLight);
     
      cam.setLocation(cam.getLocation().add(0, 120, 50));
      cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);
      cam.setFrustumFar(1000f);
View Full Code Here

        DirectionalLight light = new DirectionalLight();
        light.setDirection((new Vector3f(-0.5f, -1f, -0.5f)).normalize());
        rootNode.addLight(light);

        AmbientLight ambLight = new AmbientLight();
        ambLight.setColor(new ColorRGBA(0.2f, 0.2f, 0.2f, 1f));
        rootNode.addLight(ambLight);
     
      cam.setLocation(cam.getLocation().add(0, 120, 50));
      cam.setFrustumFar(5000f);
      cam.setFrustumNear(1f);
View Full Code Here

TOP

Related Classes of com.jme3.math.ColorRGBA

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.