rezoner / playground

Playground.js is a framework for your javascript based games. It gives you out-of-box access to essentials like mouse, keyboard, sound and well designed architecture that you can expand to your needs.
MIT License
459 stars 50 forks source link

Disable Default Loading Animation #35

Closed unstoppablecarl closed 8 years ago

unstoppablecarl commented 8 years ago

I think this is just a documentation issue. I could not figure out how to disable the loading animation. I did figure out how to shorten it:

create: function() {
    this.transitionDuration = 0;
},

Is there a good way to disable the loading animation?

rezoner commented 8 years ago

When playground is loading it enters PLAYGROUND.LoadingScreen state (the moving progress bar) - it literally does app.setState(PLAYGROUND.LoadingScreen)

You can simply replace it with nothing (or something custom if you want)

PLAYGROUND.LoadingScreen = false;

There is also transition played between states (this animation that splits the screen and new state emerges) - you may want to get rid of it also.

PLAYGROUND.Transitions = false;

If you want to have something custom instead I can elaborate on that.

unstoppablecarl commented 8 years ago

this is all I needed thanks for the fast response!