Nice Guy Posted October 2, 2017 Share Posted October 2, 2017 ScaleManager.SHOW_ALL deleted in phaser 3? Link to comment Share on other sites More sharing options...
rich Posted October 2, 2017 Share Posted October 2, 2017 There is no Scale Manager in Phaser 3 yet. blackhawx and Machine-dev 1 1 Link to comment Share on other sites More sharing options...
Nice Guy Posted October 3, 2017 Author Share Posted October 3, 2017 When it will be? Link to comment Share on other sites More sharing options...
stupot Posted October 6, 2017 Share Posted October 6, 2017 there's a project plan here: https://prod.teamgantt.com/gantt/schedule/?ids=843041&public_keys=eXjoWRdx8pM7&zoom=d100&font_size=11&estimated_hours=0&assigned_resources=0&percent_complete=0&documents=0&comments=0&col_width=255&menu_view=0&resource_filter=0&name_in_bar=0&name_next_to_bar=1&resource_names=0#user=&company=&custom=&date_filter=&hide_completed=false&color_filter=&ids=843041 according to this it's currently (possibly) in development Link to comment Share on other sites More sharing options...
samme Posted November 28, 2017 Share Posted November 28, 2017 You can probably do SHOW_ALL pretty easily in CSS only. Link to comment Share on other sites More sharing options...
andrii.barvynko Posted May 1, 2018 Share Posted May 1, 2018 On 10/3/2017 at 1:10 AM, rich said: There is no Scale Manager in Phaser 3 yet. Hello Still not? Could you please share info when it might be implemented? Or maybe somebody has the well-written plugin for that? Thank you! Link to comment Share on other sites More sharing options...
samme Posted May 1, 2018 Share Posted May 1, 2018 https://codepen.io/samme/pen/paOjMO andrii.barvynko and arkaghosh024 1 1 Link to comment Share on other sites More sharing options...
andrii.barvynko Posted May 1, 2018 Share Posted May 1, 2018 2 hours ago, samme said: https://codepen.io/samme/pen/paOjMO Thank you very much for sharing! I know this way to make resizing with css, but, unfortunately, it is not enough for me I wanna use build in features like it was in phaser 2 to make games fully responsive to all screen sizes I'm aimed to do the best user-friendly and customer loved games, so it would be great to know if it planned to do in phaser 3 or I should it develop by my own Link to comment Share on other sites More sharing options...
samme Posted May 1, 2018 Share Posted May 1, 2018 You'll have to handle resizing yourself. See http://labs.phaser.io/edit.html?src=src\game config\game resize.js andrii.barvynko 1 Link to comment Share on other sites More sharing options...
andrii.barvynko Posted May 1, 2018 Share Posted May 1, 2018 19 minutes ago, samme said: You'll have to handle resizing yourself. See http://labs.phaser.io/edit.html?src=src\game config\game resize.js wow, missed that example Thx! looks like it is what I need. Still not the easy way, like built-in ResizeManager but... Resizing have never been easy thing Link to comment Share on other sites More sharing options...
Antriel Posted May 2, 2018 Share Posted May 2, 2018 I'm using code from that example (game and cameras resize) + some basic css. It could be part of Phaser, but honestly that's all I will ever need. If you want proper responsive game, you have to implement it yourself anyway. This is my custom ScaleManager's initialize method that I call after I create the Game instance (Haxe code). public static function initialize(game:Dynamic):Void { function resize() { var w = js.Browser.window.innerWidth; var h = js.Browser.window.innerHeight; var scale = Math.min(w / Config.DEFAULT_WIDTH, h / Config.DEFAULT_HEIGHT); game.canvas.setAttribute('style', ' -ms-transform: scale(' + scale + '); -webkit-transform: scale3d(' + scale + ', 1);' + ' -moz-transform: scale(' + scale + '); -o-transform: scale(' + scale + '); transform: scale(' + scale + ');' + ' transform-origin: top left;' ); width = w / scale; height = h / scale; game.resize(width, height); game.scene.scenes.forEach(function (scene) { scene.cameras.main.setViewport(0, 0, width, height); }); } js.Browser.window.addEventListener('resize', resize); if(game.isBooted) resize(); else game.events.once('boot', resize); } andrii.barvynko, namklabs, KungFuFlames and 4 others 4 3 Link to comment Share on other sites More sharing options...
andrii.barvynko Posted May 2, 2018 Share Posted May 2, 2018 14 hours ago, Antriel said: This is my custom ScaleManager's initialize method that I call after I create the Game instance (Haxe code). Thanks a lot for sharing this example. Very interesting one! And... On your gif... Is it a browser or some tool? Just interesting Link to comment Share on other sites More sharing options...
Antriel Posted May 3, 2018 Share Posted May 3, 2018 Just a browser window with the game in it. The game will always stretch to fill the whole area it has available as portals iframe it with whatever dimensions they want anyway. Link to comment Share on other sites More sharing options...
Mayjo Antony Posted June 8, 2018 Share Posted June 8, 2018 Posted May 2 I'm using code from that example (game and cameras resize) + some basic css. It could be part of Phaser, but honestly that's all I will ever need. If you want proper responsive game, you have to implement it yourself anyway. Hi Antriel, I'm a beginner in game development, I'm confused where to add that "public static function initialize(game:Dynamic):Void {" function and how to call it. So, Can you help me. Can you please share a sample working code of a resize demo feature. Thanks in Advance. Link to comment Share on other sites More sharing options...
Antriel Posted June 8, 2018 Share Posted June 8, 2018 24 minutes ago, Mayjo Antony said: Hi Antriel, I'm a beginner in game development, I'm confused where to add that "public static function initialize(game:Dynamic):Void {" function and how to call it. So, Can you help me. Can you please share a sample working code of a resize demo feature. Thanks in Advance. It's a snippet from my Haxe code. It's basically a static function I call right after I create a game instance, so you could just copy what's inside. Also `js.Browser.window` is just Haxe's way to get to the global window property, in js you can just access `window` directly I think. Otherwise it should work as is. Link to comment Share on other sites More sharing options...
arvkonstantin Posted March 2, 2019 Share Posted March 2, 2019 @Antriel, Hello! On 5/2/2018 at 10:31 AM, Antriel said: game.resize(width, height); i used phaser 3.16.2 and i dont have resize function, but i create game from example var game = new Phaser.Game(config); Link to comment Share on other sites More sharing options...
Antriel Posted March 3, 2019 Share Posted March 3, 2019 Now it's `this.scale.resize`. The whole scale manager basically does all of this for you. Not entirely what I do though, but you can choose between scale and resizing. Link to comment Share on other sites More sharing options...
shoffa Posted November 21, 2019 Share Posted November 21, 2019 @Antriel, How are you setting the scale and position of your objects to update on resize? Do you have a working example we can check out? Also, what version of Phaser are you using here? Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts