/** Reads the colors of first column of an image and creates a gradient texture.*/ public static void testMain(SimpleApplication scene) { String shape = "shapes/public domain/tribal_star.png"; float height = 0.05f; //Apply image effects. BufferedImage shapeImage = ImageUtilities.loadImage(shape, scene.getAssetManager()); shapeImage = ImageUtilities.symmetrifyX(shapeImage, true, false); //Get shape. com.jme3.scene.Geometry g = createShape(shapeImage, height); g.setMaterial(Utilities.getUnshadedMaterial(scene.getAssetManager().loadTexture("Textures/CobbleStone.png"), null, BlendMode.Off, scene.getAssetManager())); g.scale(10f); g.rotate(FastMath.HALF_PI*3, 0, 0); scene.getRootNode().attachChild(g); scene.getViewPort().setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f)); }
/** Reads the colors of first column of an image and creates a gradient texture.*/ public static void testMain(SimpleApplication scene) { String shape = "shapes/public domain/tribal_star.png"; float height = 0.05f; //Apply image effects. BufferedImage shapeImage = ImageUtilities.loadImage(shape, scene.getAssetManager()); shapeImage = ImageUtilities.symmetrifyX(shapeImage, true, false); //Get shape. com.jme3.scene.Geometry g = createShape(shapeImage, height); g.setMaterial(Utilities.getUnshadedMaterial(scene.getAssetManager().loadTexture("Textures/CobbleStone.png"), null, BlendMode.Off, scene.getAssetManager())); g.scale(10f); g.rotate(FastMath.HALF_PI*3, 0, 0); scene.getRootNode().attachChild(g); scene.getViewPort().setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f)); }