text: [{"Owner":"Snouto","Date":"2018-03-05T11:47:07Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tYo Microsoft dudes\n_lt_/p_gt_\n\n_lt_p_gt_\n\tQuick question - has anyone experienced scene window resizing issues with Chrome on iOS? I_t_ve been getting reports that when resizing our scene in Chrome iOS that the scene becomes warped_co_ such that it_t_s either too wide_co_ too high_co_ or a scale factor of the two.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI was unable to replicate on my iPhone X but I could replicate on my iPad pro 10_qt_ - the scene loads fine to begin with but as soon as the device is rotated it goes to hell.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tIt_t_s been a right royal pain in the a-hole to debug Chrome on iOS but I did finally get somewhere using Vorlon_co_ such that I can see when rotating the device that in Chrome the canvas width and height values are not the same as with Safari iOS. To some extent - a small extent - this is to be expected given different window chrome_co_ however the difference is substantial e.g. on iOS Safari_co_ where the scene is not warped/stretched_co_ the size of the canvas when in landscape orientation is 2224x1418_co_ however in chrome it_t_s 1668 x 1994_co_ this is despite the actual sizes reported in the layout as being 1112x709 Safari and 1112 x 719 Chrome iOS.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tWhat the smeg is going on? Any idea anyone (paging _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/5733-wingnut/?do_eq_hovercard_qt_ data-mentionid_eq__qt_5733_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/5733-wingnut/_qt_ rel_eq__qt__qt__gt_@Wingnut_lt_/a_gt_ who may have seen this before in the millions of tests he_t_s ran).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tCheers!\n_lt_/p_gt_\n\n_lt_p_gt_\n\tp.s. iOS version 11.2.6_co_ Chrome iOS version 64.0.3282.112\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Deltakosh","Date":"2018-03-05T16:42:40Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tGlad that Vorlon helped you _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt_1_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt__gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThis seems to be really browser related and may need to file a bug in Chrome bug database. \n_lt_/p_gt_\n\n_lt_p_gt_\n\tperhaps you can try to manually force the canvas.width and height to the value of the layout? And then call an engine.resize() ?\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Snouto","Date":"2018-03-05T23:46:30Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tWelp that does indeed seem to solve the issue_co_ at least on my iPad Chrome with the limited testing I_t_ve done so far. For future reference I did this_dd_\n_lt_/p_gt_\n\n_lt_pre_gt_\n_lt_code_gt_window.addEventListener(_qt_resize_qt__co_ function () {\n   // set the canvas width and height according to the size of the window after a resize. This could target only Chrome on iOS using Agent sniffing if required\n   $(_qt_#renderCanvas_qt_).width($( window ).width()).height($( window ).height())_sm_\n   // Now do the usual resize.\n   engine.resize()_sm_\n})_sm__lt_/code_gt__lt_/pre_gt_\n\n_lt_p_gt_\n\tbecause I_t_m far too lazy these days to do this sort of thing without jQuery.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI presume this works because - looking at the BABS code - the resize() method will first take the canvas clientWidth and clientHeight if the canvas already exists_co_ before then applying a hardwareScalingLevel scale factor and updating the canvas HTML element. So if we manually set the clientWidth and clientHeight as above_co_ this will be the value the resize() method works from_co_ thus side-stepping any bugs with Chrome iOS whereby the clientWidth and clientHeight values are being incorrectly reported.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tI_t_ll test this elsewhere and in all the other browsers we_t_re supporting on desktop and mobile and report back if there are any nasty side effects.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tCheers _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/4442-deltakosh/?do_eq_hovercard_qt_ data-mentionid_eq__qt_4442_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/4442-deltakosh/_qt_ rel_eq__qt__qt__gt_@Deltakosh_lt_/a_gt_ and _lt_a contenteditable_eq__qt_false_qt_ data-ipshover_eq__qt__qt_ data-ipshover-target_eq__qt_http_dd_//www.html5gamedevs.com/profile/5733-wingnut/?do_eq_hovercard_qt_ data-mentionid_eq__qt_5733_qt_ href_eq__qt_http_dd_//www.html5gamedevs.com/profile/5733-wingnut/_qt_ rel_eq__qt__qt__gt_@Wingnut_lt_/a_gt__co_ I wouldn_t_t have expected it necessary to do this myself!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2018-03-05T23:51:08Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tLook at that.  I got two _qt_mentions_qt_ and didn_t_t say a word.  _lt_img alt_eq__qt__dd_D_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_biggrin.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/biggrin@2x.png 2x_qt_ title_eq__qt__dd_D_qt_ width_eq__qt_20_qt_ /_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t(I guess we DID do a little chat behind the scenes_co_ but_co_ even there_co_ I was clueless and provided 0 helpful ideas)  heh\n_lt_/p_gt_\n\n_lt_p_gt_\n\t(Wingy hugs Snouto)  _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt_  Thx for showing us that jQuery line-of-magic.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Snouto","Date":"2018-03-05T23:52:20Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_blockquote class_eq__qt_ipsQuote_qt_ data-ipsquote_eq__qt__qt_ data-ipsquote-contentapp_eq__qt_forums_qt_ data-ipsquote-contentclass_eq__qt_forums_Topic_qt_ data-ipsquote-contentcommentid_eq__qt_207148_qt_ data-ipsquote-contentid_eq__qt_36135_qt_ data-ipsquote-contenttype_eq__qt_forums_qt_ data-ipsquote-timestamp_eq__qt_1520293868_qt_ data-ipsquote-userid_eq__qt_5733_qt_ data-ipsquote-username_eq__qt_Wingnut_qt__gt_\n\t_lt_div class_eq__qt_ipsQuote_citation_qt__gt_\n\t\tJust now_co_ Wingnut said_dd_\n\t_lt_/div_gt_\n\n\t_lt_div class_eq__qt_ipsQuote_contents_qt__gt_\n\t\t_lt_p_gt_\n\t\t\tLook at that.  I got two _qt_mentions_qt_ and didn_t_t say a word.  _lt_img alt_eq__qt__dd_D_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_biggrin.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/biggrin@2x.png 2x_qt_ title_eq__qt__dd_D_qt_ width_eq__qt_20_qt_ /_gt_\n\t\t_lt_/p_gt_\n\n\t\t_lt_p_gt_\n\t\t\t(I guess we DID do a little chat behind the scenes_co_ but_co_ even there_co_ I was clueless and provided 0 helpful ideas)  heh\n\t\t_lt_/p_gt_\n\n\t\t_lt_p_gt_\n\t\t\t(Wingy hugs Snouto)  _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt_\n\t\t_lt_/p_gt_\n\t_lt_/div_gt_\n_lt_/blockquote_gt_\n\n_lt_p_gt_\n\tAs ever you were willing to help dude_co_ I always thank those who would offer their time for an internet stranger _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt_\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2018-03-05T23:58:42Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\t_lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt_  thx.  Technically_co_ we_t_re all on _qt_Team Us_qt_... but... you know... capitalism... makes SOME folks distrust the _qt_thems_qt_.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBut not for me.  Snouto_co_ you_t_re another me... one of us... and WE need to keep our projects moving_co_ right?  To assist ONE team project assists ALL team projects.   _lt_img alt_eq__qt__dd_)_qt_ data-emoticon_eq__qt__qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ title_eq__qt__dd_)_qt_ width_eq__qt_20_qt_ /_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\t(I learned this philosophy... from a message I found in a giant fortune cookie.)  heh\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Snouto","Date":"2018-03-06T00:03:15Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tAbsolutely_co_ in fact one of the reasons I chose Babylon for this client project over say Threes or PlayCanvas was the existence of this extremely valuable forum. As a seasoned developer I put a very high value on publicly available resources to turn to when the going gets tough_co_ and even after developing for about 20 years I can comfortably say the coin gets tough in nearly ever project I_t_m involved with (that probably says a lot more about me than I intended!).\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThanks again_co_ I_t_ll be sure to update this thread further if all this back-patting turns out to be premature heh!\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"}]