Giter VIP home page Giter VIP logo

libgdx-transitions's People

Contributors

digital-thinking avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

libgdx-transitions's Issues

Visual artifacts while transitioning

I noticed that if a screen contains any semi transparent sprite (i.e. having a color applied with alpha < 1) then visual artifacts will be produced while transitioning.
To reproduce this issue, you can slightly modify your TestCase, adding a line:
actor.setColor(new Color(1f, 1f, 1f, 0.5f));
somewhere inside SimpleScreen's constructor and changing another line to this:
batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
inside the draw method of said actor.

I noticed that you cleverly avoided to use color.a when setting the color to the batch, but this is not a solution because it disables semi transparency for a single sprite. Moreover, Image and many other standard classes extending Actor do use color.a in their draw methods, so using any of these classes would make you prone to get the artifacts.

Font and alpha level of textures are not shown correctly until the transition is finished

While the transition is running, the font of the second screen is not shown correctly. There is only some default font, but not the font from my skin. After the transition is finished, everything looks normal again. The same happens with the alpha level: During the transition, the alpha level of textures is always 100%.
However, this only happens to the second screen.
Maybe I am doing something wrong?

And thank you for publishing the library, its great!

Edit: Oh now it seems to work properly. In the transition class, I removed the following lines:

Gdx.gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

Single black frame during animation

Hi,

thank you for publishing this library, saved me quite some time.

I noticed while testing, in FadingGame.java, Line 95:
There is a missing screen.render() call for the case that the animation is finished.

So the current behaviour is this:

  1. Rendering while the animation plays
  2. Not rendering when the animation is finished and nextStage is switched to stage
  3. Rendering again after that

Which causes a single blank frame to be renderer, causing 'flickering'.

Suggested fix:
Add screen.render() in FadingGame.java Line 95.

Again, thank you for your work!

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.