Jump to content

I need to create the 2D background stag of 720*480 and with responsive as per aspect ration of screen


Ankit Kothari
 Share

Recommended Posts

 
wn voFolks, I am currently using phaser js but now i am try to implement babylonjs,

I need to create stage 720*480 static stage that will not transferred into 3D.

Stage should be STILL.

An it is responsive based on the aspect ratio of the browser or the screen.

I tried various option but i didnt get any success.

Thank in ADVANCED

Link to comment
Share on other sites

Hi, Welcome to the forum!!

Sorry, I don't know what a stage is.  I realise these issues don't normally work on a BabylonJS playground (there is a playground site used here for issues/demos).

Did you follow the "resize" info from here?
https://doc.babylonjs.com/babylon101/first
If your canvas has a height/width (attributes on canvas HTML element) set then that is always used - so, may need to use CSS on canvas as per link.

Let us know what you have tried.

Link to comment
Share on other sites

6 hours ago, Ankit Kothari said:
 
wn voFolks, I am currently using phaser js but now i am try to implement babylonjs,

I need to create stage 720*480 static stage that will not transferred into 3D.

Stage should be STILL.

An it is responsive based on the aspect ratio of the browser or the screen.

I tried various option but i didnt get any success.

Thank in ADVANCED

what options...?

Link to comment
Share on other sites

HI, DylanD,

I need to create 2d stage with fullscreen and responsive of the stage.

Auto resize the stag and fit to the screeen.

I am looking for this option.

 

https://www.babylonjs-playground.com/#MJ6YSM#43

In this ineed the ground fit to the screen and resize accordingly when change the screen size.

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.

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...
 Share

  • Recently Browsing   0 members

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