Jump to content

Complete black screen after calling me.video.renderer.resize


Recommended Posts

Hi, I am trying to make a game where I am using melonjs to render an isometric tilemap but there is a sidebar at the side rendered in HTML so my canvas does not take up the entire screen. When the orientation changes or the browser is resized, I want the canvas to be resized as well.

However, the moment I call me.video.renderer.resize in my window resize handler, the screen irrevocably turns completely black. Calling me.video.renderer.reset does not help. Neither does calling me.game.repaint nor me.game.viewport.resize. I have tried both the WebGL and Canvas renderers, to no avail.

Does anyone know of any way to fix this?

I am using melonjs 7.1.1.

Link to comment
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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...