GithubHelp home page GithubHelp logo

gwtish's Introduction

Gwtish

A 3D UI, style and interaction library for libgdx Makes it easy to add streetsigns, readable newspapers or even interactive computer terminals to your game.

gwtish2

Try the DemoScene:

JAR: GwtishDemoScene.jar HTML: index.html Android: GwtishDemoScene.apk (Android not tested...)

Whos it for?

  • LibGDX users working on 3D games or apps
  • GWT users looking to make 3D games using a familiar syntax to what they are used too
  • Or people who want to make use of GWTishs text shader, or AnimatedModelInstance systems separately.

Whoes it not for?

  • LibGDX users working on 2D games, or games where all the text is over the 3D, would be better of using Scene2D built into gdx (ie, if Occlusions aren't a concern)

Pros/Cons of alternatives;

  • GWTish is likely slower then other options, and likely still has bugs.

  • Using Scene2D and converting to a texture via a frame buffer:

    Pros: use more mature built in system, very flexible if you put the work in.

    Cons: More processing needed at runtime. Harder to setup. Resolution issues.

  • Using static prebuilt textures:

    Pros: Most simple. No libs needed. Any style you can draw.

    Cons: Time taking to update. More space used. Pain to do multiple languages. Looks bad up close unless very high res.

GWTish strengths:

  • Quickly add text to your game:

Label examplelab = new Label("Hello World");

  • These objects are model instances ready to use:

examplelab.setToPosition(new Vector3(550,-50,0));

examplelab.setText("New text!...");

  • Make the object interactive easily:

  • CSS like styleing...

    examplelab.getStyle().setFontSize(42, Unit.PX); examplelab.getStyle().setColor(Color.MAGENTA); examplelab.getStyle().setFont(FontHandling.RuslanDisplayFont); examplelab.getStyle().setShadowColor(Color.BLACK);

  • Even css like animations..

      // if you want to make a glitchy glow:
      computerscreentext.getStyle().addTransitionState(StyleParam.glowSize, 0.0f, 0.1f); // You have to start the animation at 0.0f
      computerscreentext.getStyle().addTransitionState(StyleParam.glowSize, 0.49f, 0.1f);
      computerscreentext.getStyle().addTransitionState(StyleParam.glowSize, 0.5f, 4f);
      computerscreentext.getStyle().addTransitionState(StyleParam.glowSize, 0.51f, 0.1f);
      computerscreentext.getStyle().addTransitionState(StyleParam.glowSize, 0.60f, 4f);
      computerscreentext.getStyle().addTransitionState(StyleParam.glowSize, 0.61f, 0.1f);
      computerscreentext.getStyle().addTransitionState(StyleParam.glowSize, 0.62f, 4f);
      computerscreentext.getStyle().addTransitionState(StyleParam.glowSize, 0.63f, 0.1f); // You won't need to finish the animation all the way, it fills in the rest automatically. Then it loops back unless overridden.
    
      //set transition time	
      computerscreentext.getStyle().setTransitionLength(10000.0f);
    

demoscreen4

  • Build complex layouts using various panels;

               VerticalPanel overallFrame = new VerticalPanel();
               HorizontalPanel dateandprice = new HorizontalPanel();
    
      Label price = new Label("$1.49");
      Label spacer = new Label(" ~~ ");		
      Label date = new Label("16th Oct");
    
      final Label headline = new Label("Headline",35);
      final Label subheadline = new Label("subheadline",35);
      HorizontalPanel horizontalFrame = new HorizontalPanel();
      Label randomtext1 = new Label("Story text 1 in left column under headline",14);
    
      VerticalPanel rightPanelFrame = new VerticalPanel();
      Image npimage =new Image ("badlogic.jpg");
      npimage.setSizeAs(12, 12);
    
      Label randomtext2 = new Label("Text under image",14);
      //layout
      dateandprice.add(price,spacer,date);
      horizontalFrame.setCellVerticalAlignment(rightPanelFrame, VerticalAlignment.Top);
    
      overallFrame.add(dateandprice,headline,subheadline,horizontalFrame);
      horizontalFrame.add(randomtext1,rightPanelFrame);
      rightPanelFrame.add(npimage,randomtext2);
    

gwtish's People

Contributors

atresica avatar thomaswrobel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.