Ankit Kothari Posted July 16, 2018 Share Posted July 16, 2018 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 Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 16, 2018 Share Posted July 16, 2018 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. Quote Link to comment Share on other sites More sharing options...
DylanD Posted July 16, 2018 Share Posted July 16, 2018 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...? Quote Link to comment Share on other sites More sharing options...
Ankit Kothari Posted July 17, 2018 Author Share Posted July 17, 2018 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. Quote Link to comment Share on other sites More sharing options...
brianzinn Posted July 17, 2018 Share Posted July 17, 2018 Maybe moving the camera instead of changing the size of the ground would work maybe better. If you change the size of the ground then you would need to use scaling or resize all meshes, no? https://www.babylonjs-playground.com/#P6JAWE#11 Good parts taken from here - i just added on before render: Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 17, 2018 Share Posted July 17, 2018 https://www.babylonjs-playground.com/#JFY4WX Ankit Kothari and Hagop 2 Quote Link to comment Share on other sites More sharing options...
Ankit Kothari Posted July 17, 2018 Author Share Posted July 17, 2018 41 minutes ago, Nabroski said: https://www.babylonjs-playground.com/#JFY4WX Yeah i am looking something like this. Can you please help me out more if you have refrence for similiar documentation or examples I created one : https://www.babylonjs-playground.com/#JFY4WX#2 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted July 17, 2018 Share Posted July 17, 2018 Few examples docs: https://doc.babylonjs.com/babylon101/sprites playground: https://doc.babylonjs.com/playground/?code=Sprite https://doc.babylonjs.com/playground/?code=playAnimation Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.