Package com.jme3.font

Examples of com.jme3.font.Rectangle


        tuioFireNode.attachChild(flame1);
        tuioFireNode.attachChild(flame2);
  }
 
  private ParticleEmitter getEmitter(String name) {
    ParticleEmitter flame = new ParticleEmitter(name, Type.Triangle, 32);
        flame.setSelectRandomImage(true);
        flame.setStartColor(new ColorRGBA(1f, 0.4f, 0.05f, 1f));
        flame.setEndColor(new ColorRGBA(.4f, .22f, .12f, 0f));
        flame.setStartSize(1.3f);
        flame.setEndSize(2f);
        flame.setShape(new EmitterSphereShape(Vector3f.ZERO, 1f));
        flame.setParticlesPerSec(0);
        flame.setGravity(-5f);
        flame.setLowLife(1f);
        flame.setHighLife(1f);
        flame.setInitialVelocity(new Vector3f(0, 7, 0));
        flame.setVelocityVariation(1f);
        flame.setImagesX(2);
        flame.setImagesY(2);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Particle.j3md");
        mat.setTexture("Texture", assetManager.loadTexture("Effects/Explosion/flame.png"));
        mat.setBoolean("PointSprite", true);
        flame.setMaterial(mat);
        return flame;
  }
View Full Code Here


  public void initialize(AppStateManager stateManager, Application app) {
    super.initialize(stateManager, app);
    tuioInput = TuioInput.get();
    tuioInput.addListener(this);
    BitmapFont guiFont = app.getAssetManager().loadFont("Interface/Fonts/Default.fnt");
   
    BitmapText tuioStatsLabel = new BitmapText(guiFont, false);
        tuioStatsLabel.setLocalTranslation(0, tuioStatsLabel.getLineHeight()*3, 0);
        tuioStatsLabel.setText("Tuio Input:");
        tuioStatsNode.attachChild(tuioStatsLabel);
View Full Code Here

    super.initialize(stateManager, app);
    tuioInput = TuioInput.get();
    tuioInput.addListener(this);
    BitmapFont guiFont = app.getAssetManager().loadFont("Interface/Fonts/Default.fnt");
   
    BitmapText tuioStatsLabel = new BitmapText(guiFont, false);
        tuioStatsLabel.setLocalTranslation(0, tuioStatsLabel.getLineHeight()*3, 0);
        tuioStatsLabel.setText("Tuio Input:");
        tuioStatsNode.attachChild(tuioStatsLabel);
   
        tuioStatsText = new BitmapText(guiFont, false);
        tuioStatsText.setLocalTranslation(80, tuioStatsText.getLineHeight()*3, 0);
        tuioStatsText.setText("");
        tuioStatsNode.attachChild(tuioStatsText);
       
        tuioStatsText2 = new BitmapText(guiFont, false);
        tuioStatsText2.setLocalTranslation(80, tuioStatsText2.getLineHeight()*2, 0);
        tuioStatsText2.setText("");
        tuioStatsNode.attachChild(tuioStatsText2);
  }
View Full Code Here

  public void initialize(AppStateManager stateManager, Application app) {
    super.initialize(stateManager, app);
    //cam = app.getCamera();
    assetManager = app.getAssetManager();
        guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt");
        fpsText = new BitmapText(guiFont, false);
        fpsText.setLocalTranslation(0, fpsText.getLineHeight(), 0);
        fpsText.setText("Frames per second");
        //camText = new BitmapText(guiFont, false);
        //camText.setLocalTranslation(0, camText.getLineHeight()*5, 0);
        //camText.setText("Cam: ");
View Full Code Here

     * Attaches FPS statistics to guiNode and displays it on the screen.
     *
     */
    public void loadFPSText() {
        guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt");
        fpsText = new BitmapText(guiFont, false);
        fpsText.setLocalTranslation(0, fpsText.getLineHeight(), 0);
        fpsText.setText("Frames per second");
        guiNode.attachChild(fpsText);
    }
View Full Code Here

        sceneNode.attachChild(logo);
       
       
        BitmapFont fnt = assetManager.loadFont("Interface/Fonts/Default.fnt");
        BitmapText txt = new BitmapText(fnt, false);
        txt.setBox(new Rectangle(-2, -2.5f, 6, 3));
        txt.setQueueBucket(Bucket.Transparent);
        txt.setSize( 0.5f );
        txt.setText(txtB);
        sceneNode.attachChild(txt);
       
View Full Code Here

  }
 
    public static Spatial getText(AssetManager assetMan, String t, float x, float y, float z, float size){
        BitmapFont fnt = assetMan.loadFont("Interface/Fonts/Default.fnt");
        BitmapText label = new BitmapText(fnt, false);
        label.setBox(new Rectangle(0, 0, 12, 8));
        label.setQueueBucket(Bucket.Transparent);
        label.setSize( size );
        label.setText(t);
        label.setColor(ColorRGBA.White);
        label.addControl(new BillboardControl());
View Full Code Here

          BitmapText txt = new BitmapText(fnt, false);
          txt.setSize( 0.4f );
          txt.setText(charSelection.name);
          float w = txt.getLineWidth()+20f;
          float off = w*0.5f;
          txt.setBox(new Rectangle(-off, 0f, w, txt.getHeight()));
          txt.setAlignment(Align.Center);
          txt.setQueueBucket(Bucket.Transparent);
          txt.addControl(new BillboardControl());
     
      label = new Node("label");
View Full Code Here

        txt.setSize( 0.4f );
        txt.setText(msg);
        txt.setColor(color);
        float w = txt.getLineWidth()+20f;
        float off = w*0.5f;
        txt.setBox(new Rectangle(-off, 0f, w, txt.getHeight()));
        txt.setAlignment(Align.Center);
        txt.setQueueBucket(Bucket.Transparent);
        txt.addControl(new MessagesBillboardControl(ttl,speed));
   
        Node node = new Node("Message");
View Full Code Here

    bottom = createLine(br, bl, true);

    BitmapFont myFont = GlobalObjectStore.<AssetManager>getObject(AssetManager.class).loadFont("Interface/Fonts/Console.fnt");
    t = new BitmapText(myFont, false);
    t.setColor(ColorRGBA.Pink);
    t.setBox(new Rectangle(0, 0, 100, 100));
    t.setAlignment(Align.Left);
    t.setVerticalAlignment(VAlign.Top);
    t.setLocalTranslation(0, 0, 2);

    this.attachChild(createLineGeometry(top));
View Full Code Here

TOP

Related Classes of com.jme3.font.Rectangle

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.