MinieExamples/src/main/java/jme3utilities/minie/test/DropTest.java
/**
     * Initialize the library of named materials during startup.
     */
Initialize the library of named materials during startup.
Initialize the library of named materials during startup .
@Override
    public void generateMaterials() {
        super.generateMaterials();
        /*
         * shiny, lit material for the selected drop
         */
        ColorRGBA lightGray = new ColorRGBA(0.6f, 0.6f, 0.6f, 1f);
        Material selected
                = MyAsset.createShinyMaterial(assetManager, lightGray);
        selected.setFloat("Shininess", 15f);
        registerMaterial("selected", selected);
        /*
         * shiny, lit materials for dynamic bodies in drops
         */
        ColorRGBA[] dropColors = new ColorRGBA[numDropColors];
        dropColors[0] = new ColorRGBA(0.2f, 0f, 0f, 1f); 
        dropColors[1] = new ColorRGBA(0f, 0.07f, 0f, 1f); 
        dropColors[2] = new ColorRGBA(0f, 0f, 0.3f, 1f); 
        dropColors[3] = new ColorRGBA(0.2f, 0.1f, 0f, 1f); 
        for (int index = 0; index < dropColors.length; ++index) {
            ColorRGBA color = dropColors[index];
            Material material
                    = MyAsset.createShinyMaterial(assetManager, color);
            material.setFloat("Shininess", 15f);
            RenderState additional = material.getAdditionalRenderState();
            additional.setFaceCullMode(RenderState.FaceCullMode.Off);
            registerMaterial("drop" + index, material);
        }
    }
@ Override public void generateMaterials ( ) { super . generateMaterials ( ) ; /*
         * shiny, lit material for the selected drop
         */ ColorRGBA lightGray = new ColorRGBA ( 0.6f , 0.6f , 0.6f , 1f ) ; Material selected = MyAsset . createShinyMaterial ( assetManager , lightGray ) ; selected . setFloat ( "Shininess" , 15f ) ; registerMaterial ( "selected" , selected ) ; /*
         * shiny, lit materials for dynamic bodies in drops
         */ ColorRGBA [ ] dropColors = new ColorRGBA [ numDropColors ] ; dropColors [ 0 ] = new ColorRGBA ( 0.2f , 0f , 0f , 1f ) ; dropColors [ 1 ] = new ColorRGBA ( 0f , 0.07f , 0f , 1f ) ; dropColors [ 2 ] = new ColorRGBA ( 0f , 0f , 0.3f , 1f ) ; dropColors [ 3 ] = new ColorRGBA ( 0.2f , 0.1f , 0f , 1f ) ; for ( int index = 0 ; index < dropColors . length ; ++ index ) { ColorRGBA color = dropColors [ index ] ; Material material = MyAsset . createShinyMaterial ( assetManager , color ) ; material . setFloat ( "Shininess" , 15f ) ; RenderState additional = material . getAdditionalRenderState ( ) ; additional . setFaceCullMode ( RenderState . FaceCullMode . Off ) ; registerMaterial ( "drop" + index , material ) ; } }
Initialize the library of named materials during startup.
Initialize the library of named materials during startup .
// ruby
 // emerald
 // sapphire
 // topaz
