Java Code Examples for com.jme3.font.BitmapText#setQueueBucket()
The following examples show how to use
com.jme3.font.BitmapText#setQueueBucket() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestBitmapText3D.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 6 votes |
@Override public void simpleInitApp() { Quad q = new Quad(6, 3); Geometry g = new Geometry("quad", q); g.setLocalTranslation(0, -3, -0.0001f); g.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m")); rootNode.attachChild(g); BitmapFont fnt = assetManager.loadFont("Interface/Fonts/Default.fnt"); BitmapText txt = new BitmapText(fnt, false); txt.setBox(new Rectangle(0, 0, 6, 3)); txt.setQueueBucket(Bucket.Transparent); txt.setSize( 0.5f ); txt.setText(txtB); rootNode.attachChild(txt); }
Example 2
Source File: TestImageRaster.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 6 votes |
private void convertAndPutImage(Image image, float posX, float posY) { Texture tex = new Texture2D(image); tex.setMagFilter(MagFilter.Nearest); tex.setMinFilter(MinFilter.NearestNoMipMaps); tex.setAnisotropicFilter(16); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mat.setTexture("ColorMap", tex); Quad q = new Quad(5, 5); Geometry g = new Geometry("quad", q); g.setLocalTranslation(posX, posY - 5, -0.0001f); g.setMaterial(mat); rootNode.attachChild(g); BitmapFont fnt = assetManager.loadFont("Interface/Fonts/Default.fnt"); BitmapText txt = new BitmapText(fnt); txt.setBox(new Rectangle(0, 0, 5, 5)); txt.setQueueBucket(RenderQueue.Bucket.Transparent); txt.setSize(0.5f); txt.setText(image.getFormat().name()); txt.setLocalTranslation(posX, posY, 0); rootNode.attachChild(txt); }
Example 3
Source File: TestBitmapText3D.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 6 votes |
@Override public void simpleInitApp() { Quad q = new Quad(6, 3); Geometry g = new Geometry("quad", q); g.setLocalTranslation(0, -3, -0.0001f); g.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m")); rootNode.attachChild(g); BitmapFont fnt = assetManager.loadFont("Interface/Fonts/Default.fnt"); BitmapText txt = new BitmapText(fnt, false); txt.setBox(new Rectangle(0, 0, 6, 3)); txt.setQueueBucket(Bucket.Transparent); txt.setSize( 0.5f ); txt.setText(txtB); rootNode.attachChild(txt); }