Examples of BMText


Examples of com.ardor3d.ui.text.BMText

        final BMFont font = BMFontLoader.defaultFont();
        final String initialString = font.getStyleName() + "\nThe Quick Brown Fox...";
        final double fontScale = 1.0;
        if (true) {
            final BMText text = new BMText("textSpatial1", initialString, font, BMText.Align.SouthWest,
                    BMText.Justify.Right);
            text.setFontScale(fontScale);
            text.setAutoFade(AutoFade.CapScreenSize);
            text.setAutoFadeFalloff(1.0f);
            text.setAutoScale(AutoScale.CapScreenSize);
            text.setAutoRotate(true);
            textExampleNode.attachChild(text);
            text.addController(fontChanger);
        }

        if (true) {
            final BMText text = new BMText("textSpatial2", initialString, font, BMText.Align.SouthEast,
                    BMText.Justify.Left);
            text.setFontScale(fontScale);
            text.setAutoFade(AutoFade.FixedPixelSize);
            text.setAutoFadeFalloff(0.5f);
            text.setAutoFadeFixedPixelSize(15);
            text.setAutoScale(AutoScale.CapScreenSize);
            text.setAutoRotate(true);
            textExampleNode.attachChild(text);
            text.addController(fontChanger);
        }

        if (true) {
            final BMText text = new BMText("textSpatial3", initialString, font, BMText.Align.NorthEast,
                    BMText.Justify.Left);
            text.setFontScale(fontScale);
            text.setAutoFade(AutoFade.Off);
            text.setAutoScale(AutoScale.FixedScreenSize);
            text.setAutoRotate(true);
            textExampleNode.attachChild(text);
            text.addController(fontChanger);
        }

        if (true) {
            final BMText text = new BMText("textSpatial4", initialString, font, BMText.Align.NorthWest,
                    BMText.Justify.Center);
            text.setFontScale(fontScale);
            text.setAutoFade(AutoFade.DistanceRange);
            text.setAutoFadeDistanceRange(10, 100); // start fading distance to camera > 10
            text.setAutoScale(AutoScale.Off);
            text.setAutoRotate(true);
            textExampleNode.attachChild(text);
            text.addController(fontChanger);
        }
    }
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.