Skip to content

Commit

Permalink
fix: background color not being correctly set
Browse files Browse the repository at this point in the history
  • Loading branch information
lunafromthemoon committed Feb 26, 2024
1 parent 867d948 commit 13e3490
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/RJS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,11 @@ export default class RJS extends Game {
}

async initStory(): Promise<any> {
this.stage.backgroundColor = this.storyConfig.backgroundColor || 0;
if (this.storyConfig.backgroundColor) {
const color = typeof this.storyConfig.backgroundColor === 'string' ? this.storyConfig.backgroundColor : Phaser.Color.fromRGBA(this.storyConfig.backgroundColor).rgba;
this.canvas.style.backgroundColor = color
}

this.userPreferences = new UserPreferences(this,this.storyConfig.userPreferences);

this.managers = {
Expand Down

0 comments on commit 13e3490

Please sign in to comment.