Sign in to follow this  
cruzlutor

Error on simple phaser 3 cordova app

Recommended Posts

Hello guys, I trying to debug Phaser3 cordova app through Chrome, but I'm getting an error, here is a screehshot.

image.thumb.png.91a9170abc67c9f59eb0c5c6688ca817.png

this happens when I tap the app or click the preview canvas

And other question, Do you guys know how I can see in the debugger what is in the app? as you can see there is a black screen, but the android app actually has an image.

Here is the APP code:

var config = {
  type: Phaser.AUTO,
  width: window.innerWidth,
  height: window.innerHeight,
  scene: {
    preload: preload,
    create: create
  }
};

var game = new Phaser.Game(config);

function preload() {
  this.load.image("red", "red.png");
}

function create() {
  this.add.image(100, 100, "red");
}

 

thanks

Share this post


Link to post
Share on other sites

In terms of debugging, you can connect google chrome to your instance using the remote debugging tool in chrome devtools.

There could be a ton of reasons why you have a blank Cordova app, maybe try WEBGL or CANVAS instead of auto. Or try it on a physical device, or a different emulated platform.

Pay attention to grade errors also, and caching.

Sorry that I can’t be any more help but Cordova can be a dark art.

Share this post


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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.