Jump to content

Loop Changing Background Colour While Game Loading?


Recommended Posts

There are some nice features in the Phaser.Color object to allow you to smoothly blend between two colours, for instance you could do something like this:

function loadUpdate() {  var intermedateColor = Phaser.Color.interpolateColor(0xff0000, 0x0000ff, 100, game.load.progress); // get a color between 0xff0000 (red) and 0x0000ff (blue) depending on load progress  game.stage.backgroundColor = intermediateColor;}
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...