Package com.jme3.math

Examples of com.jme3.math.ColorRGBA.interpolate()


   * @param amount  The amount of c2 to blend into c1
   * @return r  The resulting ColorRGBA
     */
  private ColorRGBA mix(ColorRGBA c1, ColorRGBA c2, float amount) {
    ColorRGBA r = new ColorRGBA();
    r.interpolate(c1, c2, amount);
    return  r;
  }
 
  // Day to night/night to day cycles
  /**
 
View Full Code Here


      time -= 1f;
      prevColor = nextColor;
      nextColor = ColorRGBA.randomColor();
    }
    ColorRGBA currentColor = new ColorRGBA();
    currentColor.interpolate(prevColor, nextColor, time);

    mat.setColor("Color", currentColor);
  }

}
View Full Code Here

    return assetManager;
  }

  public ColorRGBA getDiffuse(ColorRGBA base) {
    ColorRGBA color = base.clone();
    color.interpolate(ColorRGBA.Black, 0.1f);
    return base;
  }

  public ColorRGBA getAmbient(ColorRGBA base) {
    ColorRGBA color = base.clone();
View Full Code Here

    return base;
  }

  public ColorRGBA getAmbient(ColorRGBA base) {
    ColorRGBA color = base.clone();
    color.interpolate(ColorRGBA.Black, 0.5f);
    return color;
  }

  public Material materialForColor(ColorRGBA color) {
    Material mat;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.